mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-04 00:07:49 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
{
|
||||
if (!target || !spell)
|
||||
return;
|
||||
if (spell->Id == SPELL_PURSUIT && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (spell->Id == SPELL_PURSUIT && target->IsPlayer())
|
||||
{
|
||||
Talk(EMOTE_ICK_CHASE, target);
|
||||
AttackStart(target);
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
if (me->GetReactState() == REACT_PASSIVE)
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
if (Creature* k = GetKrick())
|
||||
k->AI()->Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->IsPlayer())
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
|
||||
@@ -881,7 +881,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == 70827 && pInstance)
|
||||
if (target && spell && target->IsPlayer() && spell->Id == 70827 && pInstance)
|
||||
pInstance->SetData(DATA_ACHIEV_DONT_LOOK_UP, 0);
|
||||
}
|
||||
|
||||
@@ -1185,7 +1185,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if ((spell->Id == SPELL_TELEPORT_JAINA || spell->Id == SPELL_TELEPORT_SYLVANAS) && target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if ((spell->Id == SPELL_TELEPORT_JAINA || spell->Id == SPELL_TELEPORT_SYLVANAS) && target && target->IsPlayer())
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
float dist = urand(1, 4);
|
||||
|
||||
Reference in New Issue
Block a user