mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
Using IsGMAccount instead of direct check
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "WorldSession.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "DynamicVisibility.h"
|
||||
#include "AccountMgr.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -19146,7 +19147,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
|
||||
else if (index == UNIT_FIELD_FLAGS)
|
||||
{
|
||||
uint32 appendValue = m_uint32Values[UNIT_FIELD_FLAGS];
|
||||
if (target->IsGameMaster() && target->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
|
||||
if (target->IsGameMaster() && AccountMgr::IsGMAccount(target->GetSession()->GetSecurity()))
|
||||
appendValue &= ~UNIT_FLAG_NOT_SELECTABLE;
|
||||
|
||||
fieldBuffer << uint32(appendValue);
|
||||
@@ -19171,7 +19172,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
|
||||
|
||||
if (cinfo->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
|
||||
{
|
||||
if (target->IsGameMaster() && target->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
|
||||
if (target->IsGameMaster() && AccountMgr::IsGMAccount(target->GetSession()->GetSecurity()))
|
||||
{
|
||||
if (cinfo->Modelid1)
|
||||
displayId = cinfo->Modelid1; // Modelid1 is a visible model for gms
|
||||
@@ -19294,4 +19295,4 @@ void Unit::setRace(uint8 race)
|
||||
{
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
m_race = race;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user