mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -178,7 +178,7 @@ class spell_pal_divine_intervention : public AuraScript
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (!GetTarget()->IsInCombat() && GetTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
if (!GetTarget()->IsInCombat() && GetTarget()->IsPlayer())
|
||||
GetTarget()->RemoveAurasDueToSpell(GetTarget()->ToPlayer()->GetTeamId() == TEAM_ALLIANCE ? 57723 : 57724);
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ private:
|
||||
{
|
||||
healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
|
||||
absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
|
||||
return GetUnitOwner()->IsPlayer();
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
@@ -518,7 +518,7 @@ class spell_pal_divine_sacrifice : public AuraScript
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (caster->IsPlayer())
|
||||
{
|
||||
if (caster->ToPlayer()->GetGroup())
|
||||
groupSize = caster->ToPlayer()->GetGroup()->GetMembersCount();
|
||||
|
||||
Reference in New Issue
Block a user