Using IsGMAccount instead of direct check
This commit is contained in:
parent
b86f955f8d
commit
cd2417eb2f
7 changed files with 19 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue