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

View File

@@ -69,7 +69,7 @@ struct boss_curator : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_KILL);
}

View File

@@ -72,7 +72,7 @@ struct boss_maiden_of_virtue : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_SLAY);
}

View File

@@ -139,7 +139,7 @@ struct boss_attumen : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_KILL);
}

View File

@@ -178,7 +178,7 @@ struct boss_moroes : public BossAI
void KilledUnit(Unit* victim) override
{
if (!_recentlySpoken && victim->GetTypeId() == TYPEID_PLAYER)
if (!_recentlySpoken && victim->IsPlayer())
{
Talk(SAY_KILL);
_recentlySpoken = true;

View File

@@ -149,7 +149,7 @@ struct boss_netherspite : public BossAI
}
}
// buff the target
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
{
target->AddAura(PlayerBuff[j], target);
}
@@ -177,7 +177,7 @@ struct boss_netherspite : public BossAI
}
}
// aggro target if Red Beam
if (j == RED_PORTAL && me->GetVictim() != target && target->GetTypeId() == TYPEID_PLAYER)
if (j == RED_PORTAL && me->GetVictim() != target && target->IsPlayer())
{
me->GetThreatMgr().AddThreat(target, 100000.0f + DoGetThreat(me->GetVictim()));
}

View File

@@ -224,7 +224,7 @@ struct boss_terestian_illhoof : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_SLAY);
}