mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -201,7 +201,7 @@ class spell_rog_deadly_poison : public SpellScript
|
||||
{
|
||||
_stackAmount = 0;
|
||||
// at this point CastItem must already be initialized
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
|
||||
return GetCaster()->IsPlayer() && GetCastItem();
|
||||
}
|
||||
|
||||
void HandleBeforeHit(SpellMissInfo missInfo)
|
||||
@@ -438,7 +438,7 @@ class spell_rog_preparation : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
return GetCaster()->IsPlayer();
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
@@ -505,7 +505,7 @@ class spell_rog_prey_on_the_weak : public AuraScript
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
Unit* victim = target->GetVictim();
|
||||
if (!victim && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (!victim && target->IsPlayer())
|
||||
victim = target->ToPlayer()->GetSelectedUnit();
|
||||
|
||||
if (victim && (target->GetHealthPct() > victim->GetHealthPct()))
|
||||
@@ -534,7 +534,7 @@ class spell_rog_rupture : public AuraScript
|
||||
bool Load() override
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
return caster && caster->GetTypeId() == TYPEID_PLAYER;
|
||||
return caster && caster->IsPlayer();
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
@@ -574,7 +574,7 @@ class spell_rog_shiv : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
return GetCaster()->IsPlayer();
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
|
||||
Reference in New Issue
Block a user