summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c16
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;