[Bug Fix] Fix for random disconnects when a large number of guild members zone or disconnect (#4402)

This commit is contained in:
Mitch Freeman 2024-07-10 02:10:33 -03:00 committed by GitHub
parent c7a88af11a
commit 1e41c5517e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -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);