fix(Scripts/Command): Command gm visible on should not mark you wit… (#14057)

This commit is contained in:
UltraNix
2023-01-28 11:03:46 +01:00
committed by GitHub
parent 562be05d68
commit 1441ae7d7c

View File

@@ -2239,21 +2239,17 @@ void Player::SetGMVisible(bool on)
if (on)
{
if (HasAura(VISUAL_AURA))
RemoveAurasDueToSpell(VISUAL_AURA);
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE; //remove flag
RemoveAurasDueToSpell(VISUAL_AURA);
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE;
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
getHostileRefMgr().setOnlineOfflineState(false);
CombatStopWithPets();
}
else
{
AddAura(VISUAL_AURA, this);
m_ExtraFlags |= PLAYER_EXTRA_GM_INVISIBLE; //add flag
SetAcceptWhispers(false);
SetGameMaster(true);
m_ExtraFlags |= PLAYER_EXTRA_GM_INVISIBLE;
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
}
}