Fixed aura for GM visibility at login

This commit is contained in:
Yehonal
2017-11-10 15:28:10 +00:00
parent 4bc2124632
commit 9bded96de5
2 changed files with 8 additions and 6 deletions

View File

@@ -3063,14 +3063,21 @@ void Player::SetGameMaster(bool on)
}
void Player::SetGMVisible(bool on)
{
{
const uint32 VISUAL_AURA = 37800;
if (on)
{
if (HasAura(VISUAL_AURA, 0))
RemoveAurasDueToSpell(VISUAL_AURA);
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE; //remove flag
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
}
else
{
AddAura(VISUAL_AURA, this);
m_ExtraFlags |= PLAYER_EXTRA_GM_INVISIBLE; //add flag
SetAcceptWhispers(false);