refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
parent
61f3a631c3
commit
643362d697
189 changed files with 783 additions and 775 deletions
|
|
@ -1130,7 +1130,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target->IsPlayer())
|
||||
{
|
||||
if (handler->HasLowerSecurity(target->ToPlayer()))
|
||||
{
|
||||
|
|
@ -2659,7 +2659,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_LIST, (unit->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), unit->GetGUID().ToString());
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_LIST, (unit->IsPlayer() ? "Player" : "Creature"), unit->GetGUID().ToString());
|
||||
|
||||
MotionMaster* motionMaster = unit->GetMotionMaster();
|
||||
float x, y, z;
|
||||
|
|
@ -2694,7 +2694,7 @@ public:
|
|||
case CHASE_MOTION_TYPE:
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
if (unit->GetTypeId() == TYPEID_PLAYER)
|
||||
if (unit->IsPlayer())
|
||||
{
|
||||
target = static_cast<ChaseMovementGenerator<Player> const*>(movementGenerator)->GetTarget();
|
||||
}
|
||||
|
|
@ -2707,7 +2707,7 @@ public:
|
|||
{
|
||||
handler->SendSysMessage(LANG_MOVEGENS_CHASE_NULL);
|
||||
}
|
||||
else if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
else if (target->IsPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName(), target->GetGUID().ToString());
|
||||
}
|
||||
|
|
@ -2720,7 +2720,7 @@ public:
|
|||
case FOLLOW_MOTION_TYPE:
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
if (unit->GetTypeId() == TYPEID_PLAYER)
|
||||
if (unit->IsPlayer())
|
||||
{
|
||||
target = static_cast<FollowMovementGenerator<Player> const*>(movementGenerator)->GetTarget();
|
||||
}
|
||||
|
|
@ -2733,7 +2733,7 @@ public:
|
|||
{
|
||||
handler->SendSysMessage(LANG_MOVEGENS_FOLLOW_NULL);
|
||||
}
|
||||
else if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
else if (target->IsPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName(), target->GetGUID().ToString());
|
||||
}
|
||||
|
|
@ -2809,7 +2809,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target->IsPlayer())
|
||||
{
|
||||
if (handler->HasLowerSecurity(target->ToPlayer()))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue