diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 22 | ||||
-rw-r--r-- | src/map/map.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 3 |
3 files changed, 20 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index ed9f12c72..2eb614780 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -13416,15 +13416,21 @@ int clif_parse(int fd) if ((int)RFIFOREST(fd) < packet_len) return 0; // not enough data received to form the packet - if (packet_db[packet_ver][cmd].func) { - if (sd && sd->bl.prev == NULL && packet_db[packet_ver][cmd].func != clif_parse_LoadEndAck) - ; //Only valid packet when player is not on a map is the finish-loading packet. + if( packet_db[packet_ver][cmd].func == clif_parse_debug ) + packet_db[packet_ver][cmd].func(fd, sd); + else + if( packet_db[packet_ver][cmd].func != NULL ) + { + if( !sd && packet_db[packet_ver][cmd].func != clif_parse_WantToConnection ) + ; //Only valid packet when there is no session + else + if( sd && sd->bl.prev == NULL && packet_db[packet_ver][cmd].func != clif_parse_LoadEndAck ) + ; //Only valid packet when player is not on a map + else + if( sd && session[sd->fd]->flag.eof ) + ; //No more packets accepted else - if ((sd && sd->state.active) - || packet_db[packet_ver][cmd].func == clif_parse_WantToConnection - || packet_db[packet_ver][cmd].func == clif_parse_debug - ) //Only execute the function when there's an active sd (except for debug/wanttoconnect packets) - packet_db[packet_ver][cmd].func(fd, sd); + packet_db[packet_ver][cmd].func(fd, sd); } #if DUMP_UNKNOWN_PACKET else if (battle_config.error_log) diff --git a/src/map/map.c b/src/map/map.c index 8a845c4be..7488a5a15 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1600,6 +1600,10 @@ int map_quit(struct map_session_data *sd) status_change_end(&sd->bl,SC_GUILDAURA,-1); if(sd->sc.data[SC_ENDURE] && sd->sc.data[SC_ENDURE]->val4) status_change_end(&sd->bl,SC_ENDURE,-1); //No need to save infinite endure. + if(sd->sc.data[SC_WEIGHT50]) + status_change_end(&sd->bl,SC_WEIGHT50,-1); + if(sd->sc.data[SC_WEIGHT90]) + status_change_end(&sd->bl,SC_WEIGHT90,-1); if (battle_config.debuff_on_logout&1) { if(sd->sc.data[SC_ORCISH]) status_change_end(&sd->bl,SC_ORCISH,-1); diff --git a/src/map/pc.c b/src/map/pc.c index 72663a5b0..5d94a1942 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1086,7 +1086,7 @@ int pc_reg_received(struct map_session_data *sd) intif_request_questlog(sd); #endif - if (!sd->state.connect_new && sd->fd) + if (sd->state.connect_new == 0 && sd->fd) { //Character already loaded map! Gotta trigger LoadEndAck manually. sd->state.connect_new = 1; clif_parse_LoadEndAck(sd->fd, sd); @@ -7467,6 +7467,7 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr data) save_flag = 2; chrif_save(sd,0); + break; } mapit_free(iter); |