mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
refactor(Core): apply clang-tidy modernize-use-override (#3817)
This commit is contained in:
@@ -110,7 +110,7 @@ public:
|
||||
GetUnitOwner()->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, true, SPELL_BLOCK_TYPE_POSITIVE);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
if (m_scriptSpellId != 35661)
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_shadowfiend_scaling_AuraScript::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE);
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_shadowfiend_scaling_AuraScript();
|
||||
}
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
{
|
||||
PrepareSpellScript(spell_pri_circle_of_healing_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING))
|
||||
return false;
|
||||
@@ -166,13 +166,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_circle_of_healing_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ALLY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_circle_of_healing_SpellScript();
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_divine_aegis_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_DIVINE_AEGIS))
|
||||
return false;
|
||||
@@ -215,14 +215,14 @@ public:
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_DIVINE_AEGIS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_divine_aegis_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_divine_aegis_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_divine_aegis_AuraScript();
|
||||
}
|
||||
@@ -251,13 +251,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_divine_hymn_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_divine_hymn_SpellScript();
|
||||
}
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_glyph_of_prayer_of_healing_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL))
|
||||
return false;
|
||||
@@ -289,13 +289,13 @@ public:
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_glyph_of_prayer_of_healing_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_glyph_of_prayer_of_healing_AuraScript();
|
||||
}
|
||||
@@ -313,14 +313,14 @@ public:
|
||||
|
||||
uint32 healPct;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
|
||||
return true;
|
||||
@@ -345,14 +345,14 @@ public:
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_guardian_spirit_AuraScript::CalculateAmount, EFFECT_1, SPELL_AURA_SCHOOL_ABSORB);
|
||||
OnEffectAbsorb += AuraEffectAbsorbFn(spell_pri_guardian_spirit_AuraScript::Absorb, EFFECT_1);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_guardian_spirit_AuraScript();
|
||||
}
|
||||
@@ -382,13 +382,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_hymn_of_hope_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_hymn_of_hope_SpellScript();
|
||||
}
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_ITEM_EFFICIENCY))
|
||||
return false;
|
||||
@@ -426,14 +426,14 @@ public:
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_item_greater_heal_refund_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_item_greater_heal_refund_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_item_greater_heal_refund_AuraScript();
|
||||
}
|
||||
@@ -459,13 +459,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_lightwell_renew_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_lightwell_renew_AuraScript();
|
||||
}
|
||||
@@ -487,13 +487,13 @@ public:
|
||||
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_pri_mana_burn_SpellScript::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_mana_burn_SpellScript;
|
||||
}
|
||||
@@ -509,14 +509,14 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_mana_leech_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_MANA_LEECH_PROC))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
return true;
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_PRIEST_MANA_LEECH_PROC, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_mana_leech_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_mana_leech_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
@@ -544,7 +544,7 @@ public:
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_mana_leech_AuraScript();
|
||||
}
|
||||
@@ -565,13 +565,13 @@ public:
|
||||
unitList.remove_if(acore::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT), true));
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_mind_sear_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_mind_sear_SpellScript();
|
||||
}
|
||||
@@ -598,13 +598,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_pain_and_suffering_proc_SpellScript::HandleEffectScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_pain_and_suffering_proc_SpellScript;
|
||||
}
|
||||
@@ -620,12 +620,12 @@ public:
|
||||
{
|
||||
PrepareSpellScript(spell_pri_penance_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo)
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
SpellInfo const* firstRankSpellInfo = sSpellMgr->GetSpellInfo(SPELL_PRIEST_PENANCE_R1);
|
||||
if (!firstRankSpellInfo)
|
||||
@@ -680,14 +680,14 @@ public:
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_penance_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
OnCheckCast += SpellCheckCastFn(spell_pri_penance_SpellScript::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_penance_SpellScript;
|
||||
}
|
||||
@@ -739,7 +739,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_power_word_shield_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED))
|
||||
return false;
|
||||
@@ -771,14 +771,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_power_word_shield_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_pri_power_word_shield_AuraScript::ReflectDamage, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_power_word_shield_AuraScript();
|
||||
}
|
||||
@@ -806,13 +806,13 @@ public:
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_pri_power_word_shield_SpellScript::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_power_word_shield_SpellScript;
|
||||
}
|
||||
@@ -841,13 +841,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_prayer_of_mending_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_prayer_of_mending_heal_SpellScript();
|
||||
}
|
||||
@@ -863,7 +863,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_renew_AuraScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
@@ -884,13 +884,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_pri_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_renew_AuraScript();
|
||||
}
|
||||
@@ -917,13 +917,13 @@ public:
|
||||
GetCaster()->CastCustomSpell(GetCaster(), SPELL_PRIEST_SHADOW_WORD_DEATH, &damage, 0, 0, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnHit += SpellHitFn(spell_pri_shadow_word_death_SpellScript::HandleDamage);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_shadow_word_death_SpellScript();
|
||||
}
|
||||
@@ -939,7 +939,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_pri_vampiric_touch_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL))
|
||||
return false;
|
||||
@@ -970,7 +970,7 @@ public:
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), 57669, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
AfterDispel += AuraDispelFn(spell_pri_vampiric_touch_AuraScript::HandleDispel);
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_vampiric_touch_AuraScript::CheckProc);
|
||||
@@ -978,7 +978,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pri_vampiric_touch_AuraScript();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user