diff options
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 68b97e5b2..f3cf7b7b2 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -38,7 +38,7 @@ static const int packet_len_table[0x3d] = { 6,30,-1,10,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, U->2b0a, U->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f 0,-1,10, 6,11,-1, 0, 0, // 2b10-2b17: U->2b10, U->2b11, U->2b12, U->2b13, U->2b14, U->2b15, U->2b16, U->2b17 -1,-1,-1,-1,-1,-1, 2, 7, // 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, U->2b1e, U->2b1f - -1,10,-1,-1,-1,-1,-1,-1, // 2b20-2b27: U->2b20, U->2b21, F->2b22, F->2b23, F->2b24, F->2b25, F->2b26, F->2b27 + -1,10, 8,-1,-1,-1,-1,-1, // 2b20-2b27: U->2b20, U->2b21, U->2b22, U->2b23, F->2b24, F->2b25, F->2b26, F->2b27 }; //Used Packets: @@ -84,7 +84,8 @@ static const int packet_len_table[0x3d] = { //2b1f: Incomming, chrif_disconnectplayer -> 'disconnects a player (aid X) with the message XY ... 0x81 ..' [Sirius] //2b20: Incomming, chrif_removemap -> 'remove maps of a server (sample: its going offline)' [Sirius] //2b21: Incomming, chrif_save_ack. Returned after a character has been "final saved" on the char-server. [Skotlex] -//2b22-2b27: FREE +//2b22: Incomming, chrif_updatefamelist_ack. Updated one position in the fame list. +//2b24-2b27: FREE int chrif_connected = 0; int char_fd = 0; //Using 0 instead of -1 is safer against crashes. [Skotlex] @@ -1192,6 +1193,32 @@ int chrif_recvfamelist(int fd) return 0; } +int chrif_updatefamelist_ack(int fd) +{ + struct fame_list *list; + char index; + RFIFOHEAD(fd); + 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; + default: + return 0; + } + index = RFIFOB(fd, 3); + if (index < 0 || index >= MAX_FAME_LIST) + return 0; + list[(int)index].fame = RFIFOL(fd, 4); + return 1; +} + int chrif_save_scdata(struct map_session_data *sd) { //parses the sc_data of the player and sends it to the char-server for saving. [Skotlex] #ifdef ENABLE_SC_SAVING @@ -1480,6 +1507,7 @@ int chrif_parse(int fd) case 0x2b1f: chrif_disconnectplayer(fd); break; case 0x2b20: chrif_removemap(fd); break; case 0x2b21: chrif_save_ack(fd); break; + case 0x2b22: chrif_updatefamelist_ack(fd); break; default: if (battle_config.error_log) |