mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -231,7 +231,7 @@ class spell_hun_generic_scaling : public AuraScript
|
||||
amount = CalculatePct(std::max<int32>(0, owner->GetTotalAttackPowerValue(RANGED_ATTACK)), modifier);
|
||||
|
||||
// xinef: Update appropriate player field
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
if (owner->IsPlayer())
|
||||
owner->SetUInt32Value(PLAYER_PET_SPELL_POWER, (uint32)amount);
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ class spell_hun_aspect_of_the_beast : public AuraScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
return GetCaster() && GetCaster()->IsPlayer();
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
@@ -655,7 +655,7 @@ class spell_hun_readiness : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
return GetCaster()->IsPlayer();
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
@@ -708,7 +708,7 @@ class spell_hun_scatter_shot : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
return GetCaster()->IsPlayer();
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
@@ -930,7 +930,7 @@ class spell_hun_disengage : public SpellScript
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER && !caster->IsInCombat())
|
||||
if (caster->IsPlayer() && !caster->IsInCombat())
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
Reference in New Issue
Block a user