summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-04-17 05:53:39 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-05 22:22:06 +0300
commit53e2d725238f7e20e40e787f9f0535e873e14e0f (patch)
tree1a5299057529ff93ce8408118e2dd7de3caa2111 /src/map
parentfb489a671b38375f8acecff79b9bdacc265d0abe (diff)
downloadhercules-53e2d725238f7e20e40e787f9f0535e873e14e0f.tar.gz
hercules-53e2d725238f7e20e40e787f9f0535e873e14e0f.tar.bz2
hercules-53e2d725238f7e20e40e787f9f0535e873e14e0f.tar.xz
hercules-53e2d725238f7e20e40e787f9f0535e873e14e0f.zip
Force saving party allow flag on each packet change
Also add configuration bit in save_settings flag for control it.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c9
1 files changed, 8 insertions, 1 deletions
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);
}