diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-03 19:37:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-03 19:37:09 +0300 |
commit | e1453434af18b30119114077dfc52d27ad196cef (patch) | |
tree | 7f342a4bf53777ed740ce6600b0272bb09386e55 /src/map/chrif.c | |
parent | 17420ee563282ba1791a77c55ede9d8f5f504ae5 (diff) | |
parent | 2150e64f1df5f5586274a1fde49029c4444db641 (diff) | |
download | hercules-e1453434af18b30119114077dfc52d27ad196cef.tar.gz hercules-e1453434af18b30119114077dfc52d27ad196cef.tar.bz2 hercules-e1453434af18b30119114077dfc52d27ad196cef.tar.xz hercules-e1453434af18b30119114077dfc52d27ad196cef.zip |
Merge pull request #1522 from HerculesWS/jobclass-mapid-cleanup
Job Class vs Job MapID cleanup
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 6e567a402..bf613b029 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1059,19 +1059,17 @@ int chrif_disconnectplayer(int fd) { /*========================================== * Request/Receive top 10 Fame character list *------------------------------------------*/ -int chrif_updatefamelist(struct map_session_data* sd) { - char type; +int chrif_updatefamelist(struct map_session_data *sd) +{ + int type; nullpo_retr(0, sd); chrif_check(-1); - switch(sd->class_ & MAPID_UPPERMASK) { - case MAPID_BLACKSMITH: type = RANKTYPE_BLACKSMITH; break; - case MAPID_ALCHEMIST: type = RANKTYPE_ALCHEMIST; break; - case MAPID_TAEKWON: type = RANKTYPE_TAEKWON; break; - default: - return 0; - } + type = pc->famelist_type(sd->job); + + if (type == RANKTYPE_UNKNOWN) + return 0; WFIFOHEAD(chrif->fd, 11); WFIFOW(chrif->fd,0) = 0x2b10; |