From 53e2d725238f7e20e40e787f9f0535e873e14e0f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Apr 2019 05:53:39 +0300 Subject: Force saving party allow flag on each packet change Also add configuration bit in save_settings flag for control it. --- src/map/clif.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2