mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
refactor(Player): replace visibility detection calls with dedicated methods (#23025)
This commit is contained in:
@@ -2243,7 +2243,7 @@ void Player::SetGameMaster(bool on)
|
||||
CombatStopWithPets();
|
||||
|
||||
SetPhaseMask(uint32(PHASEMASK_ANYWHERE), false); // see and visible in all phases
|
||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
|
||||
SetServerSideVisibilityDetect(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2279,7 +2279,7 @@ void Player::SetGameMaster(bool on)
|
||||
UpdateArea(m_areaUpdateId);
|
||||
|
||||
getHostileRefMgr().setOnlineOfflineState(true);
|
||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
|
||||
SetServerSideVisibilityDetect(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
|
||||
}
|
||||
|
||||
UpdateObjectVisibility();
|
||||
@@ -2293,7 +2293,7 @@ void Player::SetGMVisible(bool on)
|
||||
{
|
||||
RemoveAurasDueToSpell(VISUAL_AURA);
|
||||
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE;
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
|
||||
SetServerSideVisibility(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
|
||||
|
||||
getHostileRefMgr().setOnlineOfflineState(false);
|
||||
CombatStopWithPets();
|
||||
@@ -2302,7 +2302,7 @@ void Player::SetGMVisible(bool on)
|
||||
{
|
||||
AddAura(VISUAL_AURA, this);
|
||||
m_ExtraFlags |= PLAYER_EXTRA_GM_INVISIBLE;
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
|
||||
SetServerSideVisibility(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user