diff options
-rw-r--r-- | conf/map/map-server.conf | 1 | ||||
-rw-r--r-- | src/map/clif.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/conf/map/map-server.conf b/conf/map/map-server.conf index e1de55edb..dbb343748 100644 --- a/conf/map/map-server.conf +++ b/conf/map/map-server.conf @@ -106,6 +106,7 @@ map_configuration: { // 0x040: After successfully get/delete/complete a quest // 0x080: After every buying store transaction // 0x100: After every bank transaction (deposit/withdraw) + // 0x200: After every allow party flag change // NOTE: These settings decrease the chance of dupes/lost items // when there's a server crash at the expense of increasing the // map/char server lag. If your server rarely crashes, but diff --git a/src/map/clif.c b/src/map/clif.c index 6e2031271..c62d2f8fa 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17267,7 +17267,14 @@ static void clif_parse_PartyTick(int fd, struct map_session_data *sd) __attribut static void clif_parse_PartyTick(int fd, struct map_session_data *sd) { const struct PACKET_CZ_PARTY_CONFIG *const p = RFIFOP(fd, 0); - sd->status.allow_party = p->refuseInvite ? false : true; + const bool newAllowParty = p->refuseInvite ? false : true; + if (newAllowParty != sd->status.allow_party) { + sd->status.allow_party = newAllowParty; + if ((map->save_settings & 512) != 0) + chrif->save(sd, 0); // send to char server + } else { + sd->status.allow_party = newAllowParty; + } clif->partytickack(sd, sd->status.allow_party); } |