Fixed aura for GM visibility at login
This commit is contained in:
@@ -3063,14 +3063,21 @@ void Player::SetGameMaster(bool on)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Player::SetGMVisible(bool on)
|
void Player::SetGMVisible(bool on)
|
||||||
{
|
{
|
||||||
|
const uint32 VISUAL_AURA = 37800;
|
||||||
|
|
||||||
if (on)
|
if (on)
|
||||||
{
|
{
|
||||||
|
if (HasAura(VISUAL_AURA, 0))
|
||||||
|
RemoveAurasDueToSpell(VISUAL_AURA);
|
||||||
|
|
||||||
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE; //remove flag
|
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE; //remove flag
|
||||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
|
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AddAura(VISUAL_AURA, this);
|
||||||
|
|
||||||
m_ExtraFlags |= PLAYER_EXTRA_GM_INVISIBLE; //add flag
|
m_ExtraFlags |= PLAYER_EXTRA_GM_INVISIBLE; //add flag
|
||||||
|
|
||||||
SetAcceptWhispers(false);
|
SetAcceptWhispers(false);
|
||||||
|
|||||||
@@ -191,14 +191,10 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32 VISUAL_AURA = 37800;
|
|
||||||
std::string param = (char*)args;
|
std::string param = (char*)args;
|
||||||
|
|
||||||
if (param == "on")
|
if (param == "on")
|
||||||
{
|
{
|
||||||
if (_player->HasAura(VISUAL_AURA, 0))
|
|
||||||
_player->RemoveAurasDueToSpell(VISUAL_AURA);
|
|
||||||
|
|
||||||
_player->SetGMVisible(true);
|
_player->SetGMVisible(true);
|
||||||
//_player->UpdateObjectVisibility();
|
//_player->UpdateObjectVisibility();
|
||||||
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
|
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
|
||||||
@@ -208,7 +204,6 @@ public:
|
|||||||
|
|
||||||
if (param == "off")
|
if (param == "off")
|
||||||
{
|
{
|
||||||
_player->AddAura(VISUAL_AURA, _player);
|
|
||||||
_player->SetGMVisible(false);
|
_player->SetGMVisible(false);
|
||||||
//_player->UpdateObjectVisibility();
|
//_player->UpdateObjectVisibility();
|
||||||
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
|
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
|
||||||
|
|||||||
Reference in New Issue
Block a user