mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -114,7 +114,7 @@ struct emerald_dragonAI : public WorldBossAI
|
||||
// Target killed during encounter, mark them as suspectible for Aura Of Nature
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
who->CastSpell(who, SPELL_MARK_OF_NATURE, true);
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_DRAW_SPIRIT && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (spell->Id == SPELL_DRAW_SPIRIT && target->IsPlayer())
|
||||
{
|
||||
Position targetPos = target->GetPosition();
|
||||
me->SummonCreature(NPC_SPIRIT_SHADE, targetPos, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 50000);
|
||||
@@ -531,7 +531,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
{
|
||||
who->CastSpell(who, SPELL_PUTRID_MUSHROOM, true);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
else if (banishTimer <= diff)
|
||||
{
|
||||
Unit* temp = me->GetVictim();
|
||||
if (temp && temp->GetTypeId() == TYPEID_PLAYER)
|
||||
if (temp && temp->IsPlayer())
|
||||
{
|
||||
DoCast(temp, SPELL_BANISHED_SHATTRATH_A);
|
||||
banishTimer = 9000;
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
else if (banishTimer <= diff)
|
||||
{
|
||||
Unit* temp = me->GetVictim();
|
||||
if (temp && temp->GetTypeId() == TYPEID_PLAYER)
|
||||
if (temp && temp->IsPlayer())
|
||||
{
|
||||
DoCast(temp, SPELL_BANISHED_SHATTRATH_S);
|
||||
banishTimer = 9000;
|
||||
|
||||
@@ -55,7 +55,7 @@ void NPCStaveQuestAI::StorePlayerGUID()
|
||||
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
if ((*itr)->getTarget()->IsPlayer())
|
||||
{
|
||||
playerGUID = (*itr)->getUnitGuid();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user