From c613dbb2f7f824d5088b7a8d39cbe4219b8cb2c6 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" <277429+mackal@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:48:23 -0400 Subject: [PATCH] Fix issues with Client::SetHideMe (#2403) Arg was shadowing the member variable and we weren't updating the member variable --- zone/client.cpp | 4 +++- zone/client.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index e57ac1adc..1f580f009 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -3385,10 +3385,12 @@ void Client::SetTint(int16 in_slot, EQ::textures::Tint_Struct& color) { } -void Client::SetHideMe(bool gm_hide_me) +void Client::SetHideMe(bool flag) { EQApplicationPacket app; + gm_hide_me = flag; + if (gm_hide_me) { database.SetHideMe(AccountID(), true); CreateDespawnPacket(&app, false); diff --git a/zone/client.h b/zone/client.h index 3e0436f13..efa64ba96 100644 --- a/zone/client.h +++ b/zone/client.h @@ -348,7 +348,7 @@ public: int GetIPExemption(); void SetIPExemption(int exemption_amount); inline bool GetHideMe() const { return gm_hide_me; } - void SetHideMe(bool hm); + void SetHideMe(bool flag); inline uint16 GetPort() const { return port; } bool IsDead() const { return(dead); } bool IsUnconscious() const { return ((current_hp <= 0) ? true : false); }