From 06df6b04187d6b7ee80876a7af0321ab5619eff6 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 25 Aug 2019 19:30:43 +0200 Subject: Clear the cached guild pointer when the guild id is cleared upon error Signed-off-by: Haru --- src/map/guild.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/guild.c b/src/map/guild.c index 2faf60e2b..3b611bb05 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -565,6 +565,7 @@ static int guild_check_member(const struct guild *g) if (i == INDEX_NOT_FOUND) { sd->status.guild_id=0; sd->guild_emblem_id=0; + sd->guild = NULL; ShowWarning("guild: check_member %d[%s] is not member\n",sd->status.account_id,sd->status.name); } } @@ -581,8 +582,11 @@ static int guild_recv_noinfo(int guild_id) iter = mapit_getallusers(); for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { - if( sd->status.guild_id == guild_id ) + if (sd->status.guild_id == guild_id) { sd->status.guild_id = 0; // erase guild + sd->guild_emblem_id = 0; + sd->guild = NULL; + } } mapit->free(iter); @@ -872,6 +876,8 @@ static void guild_member_joined(struct map_session_data *sd) i = guild->getindex(g, sd->status.account_id, sd->status.char_id); if (i == INDEX_NOT_FOUND) { sd->status.guild_id = 0; + sd->guild_emblem_id = 0; + sd->guild = NULL; } else { g->member[i].sd = sd; sd->guild = g; -- cgit v1.2.3-60-g2f50 From 36cb0a2410671bc940b6cdb0e6ff0716deb24175 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 25 Aug 2019 20:13:58 +0200 Subject: Remove the party name from all affected characters when a party is disbanded Signed-off-by: Haru --- src/map/party.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/map') diff --git a/src/map/party.c b/src/map/party.c index 9fbe915f3..35ffe5636 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -695,6 +695,7 @@ static int party_broken(int party_id) if( p->data[i].sd!=NULL ) { clif->party_withdraw(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10); p->data[i].sd->status.party_id=0; + clif->charnameupdate(p->data[i].sd); } } -- cgit v1.2.3-60-g2f50