refactor(Core/Object): adds consistency in the use of type object check (#19671)

This commit is contained in:
Grimdhex
2024-08-25 14:57:37 +02:00
committed by GitHub
parent 61f3a631c3
commit 643362d697
189 changed files with 783 additions and 775 deletions

View File

@@ -355,7 +355,7 @@ class spell_dru_treant_scaling : public AuraScript
amount = CalculatePct(std::max<int32>(0, nature), 15);
// xinef: Update appropriate player field
if (owner->GetTypeId() == TYPEID_PLAYER)
if (owner->IsPlayer())
owner->SetUInt32Value(PLAYER_PET_SPELL_POWER, (uint32)amount);
}
}
@@ -791,7 +791,7 @@ class spell_dru_rip : 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)
@@ -1005,7 +1005,7 @@ class spell_dru_swift_flight_passive : public AuraScript
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
return GetCaster()->IsPlayer();
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
@@ -1063,7 +1063,7 @@ class spell_dru_t10_restoration_4p_bonus : public SpellScript
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
return GetCaster()->IsPlayer();
}
void FilterTargets(std::list<WorldObject*>& targets)
@@ -1151,7 +1151,7 @@ class spell_dru_berserk : public SpellScript
{
Unit* caster = GetCaster();
if (caster->GetTypeId() == TYPEID_PLAYER)
if (caster->IsPlayer())
{
// Remove tiger fury / mangle(bear)
const uint32 TigerFury[6] = { 5217, 6793, 9845, 9846, 50212, 50213 };