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

@@ -71,7 +71,7 @@ struct boss_the_maker : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0, 1))
if (victim->IsPlayer() && urand(0, 1))
{
Talk(SAY_KILL);
}

View File

@@ -100,7 +100,7 @@ struct boss_watchkeeper_gargolmar : public BossAI
{
if (!_taunted)
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
{
_taunted = true;
Talk(SAY_TAUNT);

View File

@@ -226,7 +226,7 @@ struct boss_warbringer_omrogg : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim && victim->GetTypeId() == TYPEID_PLAYER)
if (victim && victim->IsPlayer())
HandleHeadTalk(SAY_ON_KILL);
}

View File

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