diff --git a/src/map/clif.c b/src/map/clif.c index 4996dc30377..4960ff325e3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11163,6 +11163,7 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) } if (sd->state.scloaded == 0) { // SC data was not received yet. pc->scdata_received will reinvoke + sd->state.loadendack_before_scloaded = 1; return; } diff --git a/src/map/pc.c b/src/map/pc.c index 8ab8a55c367..8906bcd78bd 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -12016,10 +12016,10 @@ static void pc_scdata_received(struct map_session_data *sd) clif->pLoadEndAck(0,sd); pc->autotrade_populate(sd); pc->autotrade_start(sd); - } else { + } else if (sd->state.loadendack_before_scloaded != 0) { clif->pLoadEndAck(sd->fd, sd); + sd->state.loadendack_before_scloaded = 0; } - } static int pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { diff --git a/src/map/pc.h b/src/map/pc.h index 4f75e717d87..25ca09daf97 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -210,6 +210,7 @@ struct map_session_data { struct { unsigned int active : 1; //Marks active player (not active is logging in/out, or changing map servers) unsigned int scloaded : 1; // Marks sc related data has been loaded for player + unsigned int loadendack_before_scloaded : 1; // Marks that the LoadEndAck packet was received before scloaded unsigned int menu_or_input : 1;// if a script is waiting for feedback from the player unsigned int dead_sit : 2; unsigned int lr_flag : 3;//1: left h. weapon; 2: arrow; 3: shield