mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -108,7 +108,7 @@ struct boss_high_astromancer_solarian : public BossAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
if (victim->IsPlayer() && roll_chance_i(50))
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ struct boss_kaelthas : public BossAI
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (_phase == PHASE_NONE && who->GetTypeId() == TYPEID_PLAYER && me->IsValidAttackTarget(who))
|
||||
if (_phase == PHASE_NONE && who->IsPlayer() && me->IsValidAttackTarget(who))
|
||||
{
|
||||
_phase = PHASE_SINGLE_ADVISOR;
|
||||
me->SetInCombatWithZone();
|
||||
@@ -345,7 +345,7 @@ struct boss_kaelthas : public BossAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->IsPlayer())
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
@@ -1270,7 +1270,7 @@ class spell_kaelthas_nether_beam : public SpellScript
|
||||
for (ThreatContainer::StorageType::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetUnit(*GetCaster(), (*itr)->getUnitGuid());
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target && target->IsPlayer())
|
||||
targetList.push_back(target);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user