mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -142,7 +142,7 @@ struct boss_felblood_kaelthas : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!introSpeak && me->IsWithinDistInMap(who, 40.0f) && who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (!introSpeak && me->IsWithinDistInMap(who, 40.0f) && who->IsPlayer())
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
introSpeak = true;
|
||||
|
||||
@@ -292,7 +292,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
for (ThreatContainer::StorageType::const_iterator itr = tList.begin(); itr != tList.end(); ++itr)
|
||||
{
|
||||
Unit* pUnit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (pUnit && pUnit->GetTypeId() == TYPEID_PLAYER && me->GetThreatMgr().GetThreat(pUnit))
|
||||
if (pUnit && pUnit->IsPlayer() && me->GetThreatMgr().GetThreat(pUnit))
|
||||
{
|
||||
float threatMod = GetThreatMod(me->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth(), pUnit->GetMaxHealth(), pUnit);
|
||||
me->GetThreatMgr().ModifyThreatByPercent(pUnit, -100);
|
||||
|
||||
@@ -116,7 +116,7 @@ struct boss_selin_fireheart : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->IsPlayer())
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ struct boss_vexallus : public BossAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->IsPlayer())
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user