refactor(Core/Object): adds consistency in the use of type object check (#19671)

This commit is contained in:
Grimdhex
2024-08-25 14:57:37 +02:00
committed by GitHub
parent 61f3a631c3
commit 643362d697
189 changed files with 783 additions and 775 deletions
@@ -83,7 +83,7 @@ struct boss_exarch_maladaar : public BossAI
void MoveInLineOfSight(Unit* who) override
{
if (!_talked && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 150.0f))
if (!_talked && who->IsPlayer() && me->IsWithinDistInMap(who, 150.0f))
{
_talked = true;
Talk(SAY_INTRO);
@@ -77,7 +77,7 @@ struct boss_nexusprince_shaffar : public BossAI
void MoveInLineOfSight(Unit* who) override
{
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
if (!HasTaunted && who->IsPlayer() && me->IsWithinDistInMap(who, 100.0f))
{
HasTaunted = true;
Talk(SAY_INTRO);
@@ -133,7 +133,7 @@ struct boss_nexusprince_shaffar : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_SLAY);
}
@@ -101,7 +101,7 @@ struct boss_pandemonius : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -97,7 +97,7 @@ struct boss_darkweaver_syth : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_SLAY);
}
@@ -186,7 +186,7 @@ struct boss_grandmaster_vorpil : public BossAI
void MoveInLineOfSight(Unit* who) override
{
ScriptedAI::MoveInLineOfSight(who);
if (!sayIntro && who->GetTypeId() == TYPEID_PLAYER)
if (!sayIntro && who->IsPlayer())
{
Talk(SAY_INTRO);
sayIntro = true;