chore(Core/Account): move AccountMgr::IsGMAccount() to class WorldSession (#17845)
This commit is contained in:
committed by
GitHub
parent
9da7657147
commit
4c94f62144
@@ -2192,14 +2192,14 @@ void Player::SetGameMaster(bool on)
|
||||
if (on)
|
||||
{
|
||||
m_ExtraFlags |= PLAYER_EXTRA_GM_ON;
|
||||
if (AccountMgr::IsGMAccount(GetSession()->GetSecurity()))
|
||||
if (GetSession()->IsGMAccount())
|
||||
SetFaction(FACTION_FRIENDLY);
|
||||
SetPlayerFlag(PLAYER_FLAGS_GM);
|
||||
SetUnitFlag2(UNIT_FLAG2_ALLOW_CHEAT_SPELLS);
|
||||
|
||||
if (Pet* pet = GetPet())
|
||||
{
|
||||
if (AccountMgr::IsGMAccount(GetSession()->GetSecurity()))
|
||||
if (GetSession()->IsGMAccount())
|
||||
pet->SetFaction(FACTION_FRIENDLY);
|
||||
pet->getHostileRefMgr().setOnlineOfflineState(false);
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void SocialMgr::GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo&
|
||||
friendInfo.Class = 0;
|
||||
|
||||
Player* pFriend = ObjectAccessor::FindConnectedPlayer(friendGUID);
|
||||
if (!pFriend || AccountMgr::IsGMAccount(pFriend->GetSession()->GetSecurity()))
|
||||
if (!pFriend || pFriend->GetSession()->IsGMAccount())
|
||||
return;
|
||||
|
||||
TeamId teamId = player->GetTeamId();
|
||||
|
||||
Reference in New Issue
Block a user