summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-19 17:12:27 +0200
committerHaru <haru@dotalux.com>2013-09-19 17:12:27 +0200
commit556834d0508101b70660c5904b24adacacced3e0 (patch)
treeab9e552032ae4d9bccd8a2d66b6d0a388015098b /src/map/chrif.c
parent257fd1a8f0aa0b26aa8331b390315567344f4e2b (diff)
downloadhercules-556834d0508101b70660c5904b24adacacced3e0.tar.gz
hercules-556834d0508101b70660c5904b24adacacced3e0.tar.bz2
hercules-556834d0508101b70660c5904b24adacacced3e0.tar.xz
hercules-556834d0508101b70660c5904b24adacacced3e0.zip
Cleaned up and de-duplicated ranklist-related code
Follow-up to 6cf032d. Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 524286da1..c79cf9e4a 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1073,9 +1073,9 @@ int chrif_updatefamelist(struct map_session_data* sd) {
chrif_check(-1);
switch(sd->class_ & MAPID_UPPERMASK) {
- case MAPID_BLACKSMITH: type = 1; break;
- case MAPID_ALCHEMIST: type = 2; break;
- case MAPID_TAEKWON: type = 3; break;
+ case MAPID_BLACKSMITH: type = RANKTYPE_BLACKSMITH; break;
+ case MAPID_ALCHEMIST: type = RANKTYPE_ALCHEMIST; break;
+ case MAPID_TAEKWON: type = RANKTYPE_TAEKWON; break;
default:
return 0;
}
@@ -1104,9 +1104,9 @@ int chrif_recvfamelist(int fd) {
int num, size;
int total = 0, len = 8;
- memset (smith_fame_list, 0, sizeof(smith_fame_list));
- memset (chemist_fame_list, 0, sizeof(chemist_fame_list));
- memset (taekwon_fame_list, 0, sizeof(taekwon_fame_list));
+ memset(smith_fame_list, 0, sizeof(smith_fame_list));
+ memset(chemist_fame_list, 0, sizeof(chemist_fame_list));
+ memset(taekwon_fame_list, 0, sizeof(taekwon_fame_list));
size = RFIFOW(fd, 6); //Blacksmith block size
@@ -1147,9 +1147,9 @@ int chrif_updatefamelist_ack(int fd) {
uint8 index;
switch (RFIFOB(fd,2)) {
- case 1: list = smith_fame_list; break;
- case 2: list = chemist_fame_list; break;
- case 3: list = taekwon_fame_list; break;
+ case RANKTYPE_BLACKSMITH: list = smith_fame_list; break;
+ case RANKTYPE_ALCHEMIST: list = chemist_fame_list; break;
+ case RANKTYPE_TAEKWON: list = taekwon_fame_list; break;
default: return 0;
}