From 1e41c5517e90912f168f63080e6b37296f4d0c83 Mon Sep 17 00:00:00 2001 From: Mitch Freeman <65987027+neckkola@users.noreply.github.com> Date: Wed, 10 Jul 2024 02:10:33 -0300 Subject: [PATCH] [Bug Fix] Fix for random disconnects when a large number of guild members zone or disconnect (#4402) --- zone/client.cpp | 9 +++++++-- zone/client.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index 983b7e731..59213c2d6 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -215,6 +215,7 @@ Client::Client(EQStreamInterface *ieqs) : Mob( guild_id = GUILD_NONE; guildrank = 0; guild_tribute_opt_in = 0; + SetGuildListDirty(false); GuildBanker = false; memset(lskey, 0, sizeof(lskey)); strcpy(account_name, ""); @@ -410,8 +411,12 @@ Client::~Client() { zone->ClearEXPModifier(this); } - if(IsInAGuild()) - guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), 0, time(nullptr)); + if (!IsZoning()) { + if(IsInAGuild()) { + guild_mgr.UpdateDbMemberOnline(CharacterID(), false); + guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), 0, time(nullptr)); + } + } Mob* horse = entity_list.GetMob(CastToClient()->GetHorseId()); if (horse) diff --git a/zone/client.h b/zone/client.h index 3709fe530..d06ae2a35 100644 --- a/zone/client.h +++ b/zone/client.h @@ -739,6 +739,7 @@ public: void GoToDeath(); inline const int32 GetInstanceID() const { return zone->GetInstanceID(); } void SetZoning(bool in) { bZoning = in; } + bool IsZoning() { return bZoning; } void ShowSpells(Client* c, ShowSpellType show_spell_type);