refactor(Core): apply clang-tidy modernize-use-override (#3817)

This commit is contained in:
Francesco Borzì
2020-12-06 18:04:55 +01:00
committed by GitHub
parent 9facd81e54
commit d4a58700d4
561 changed files with 9574 additions and 9574 deletions

View File

@@ -82,13 +82,13 @@ public:
return SPELL_CAST_OK;
}
void Register()
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_hun_check_pet_los_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_check_pet_los_SpellScript();
}
@@ -109,13 +109,13 @@ public:
AddPct(amount, aurEff->GetAmount());
}
void Register()
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_cower_AuraScript::CalculateAmount, EFFECT_1, SPELL_AURA_MOD_DECREASE_SPEED);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_cower_AuraScript();
}
@@ -136,13 +136,13 @@ public:
caster->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_HUNTER_WYVERN_STING_DOT, GetSpellInfo()->GetRank()), true);
}
void Register()
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_wyvern_sting_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_wyvern_sting_AuraScript();
}
@@ -165,13 +165,13 @@ public:
amount = animalHandlerEff->GetAmount();
}
void Register()
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_animal_handler_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_ATTACK_POWER_PCT);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_animal_handler_AuraScript();
}
@@ -285,7 +285,7 @@ public:
GetEffect(aurEff->GetEffIndex())->RecalculateAmount();
}
void Register()
void Register() override
{
if (m_scriptSpellId != 34902)
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_generic_scaling_AuraScript::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE);
@@ -301,7 +301,7 @@ public:
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_generic_scaling_AuraScript();
}
@@ -324,13 +324,13 @@ public:
creature->DespawnOrUnsummon(1);
}
void Register()
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_hun_taming_the_beast_AuraScript::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_MOD_CHARM, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_taming_the_beast_AuraScript();
}
@@ -349,12 +349,12 @@ public:
{
PrepareAuraScript(spell_hun_aspect_of_the_beast_AuraScript);
bool Load()
bool Load() override
{
return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET))
return false;
@@ -387,7 +387,7 @@ public:
SetDuration(0);
}
void Register()
void Register() override
{
if (m_scriptSpellId == 13161)
{
@@ -399,7 +399,7 @@ public:
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_aspect_of_the_beast_AuraScript();
}
@@ -417,7 +417,7 @@ public:
{
PrepareAuraScript(spell_hun_ascpect_of_the_viper_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_VIPER_ENERGIZE) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_GLYPH_OF_ASPECT_OF_THE_VIPER) ||
@@ -463,7 +463,7 @@ public:
GetTarget()->RemoveAurasDueToSpell(SPELL_HUNTER_VICIOUS_VIPER);
}
void Register()
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_ascpect_of_the_viper_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_ascpect_of_the_viper_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_OBS_MOD_POWER);
@@ -472,7 +472,7 @@ public:
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_ascpect_of_the_viper_AuraScript();
}
@@ -488,7 +488,7 @@ public:
{
PrepareSpellScript(spell_hun_chimera_shot_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_CHIMERA_SHOT_SERPENT) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_CHIMERA_SHOT_VIPER) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_CHIMERA_SHOT_SCORPID))
return false;
@@ -563,13 +563,13 @@ public:
}
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_chimera_shot_SpellScript();
}
@@ -586,7 +586,7 @@ public:
{
PrepareAuraScript(spell_hun_improved_mend_pet_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_IMPROVED_MEND_PET))
return false;
@@ -604,14 +604,14 @@ public:
GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_IMPROVED_MEND_PET, true, NULL, aurEff);
}
void Register()
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_improved_mend_pet_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_improved_mend_pet_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_improved_mend_pet_AuraScript();
}
@@ -626,7 +626,7 @@ public:
{
PrepareSpellScript(spell_hun_invigoration_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_INVIGORATION_TRIGGERED))
return false;
@@ -641,13 +641,13 @@ public:
unitTarget->CastSpell(unitTarget, SPELL_HUNTER_INVIGORATION_TRIGGERED, true);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_invigoration_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_invigoration_SpellScript();
}
@@ -663,7 +663,7 @@ public:
{
PrepareSpellScript(spell_hun_last_stand_pet_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_LAST_STAND_TRIGGERED))
return false;
@@ -677,13 +677,13 @@ public:
caster->CastCustomSpell(caster, SPELL_HUNTER_PET_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, nullptr, nullptr, true, nullptr);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_last_stand_pet_SpellScript();
}
@@ -699,7 +699,7 @@ public:
{
PrepareSpellScript(spell_hun_masters_call_SpellScript);
bool Validate(SpellInfo const* spellInfo)
bool Validate(SpellInfo const* spellInfo) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_MASTERS_CALL_TRIGGERED) || !sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].CalcValue()) || !sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_1].CalcValue()))
return false;
@@ -725,13 +725,13 @@ public:
}
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_masters_call_SpellScript();
}
@@ -747,7 +747,7 @@ public:
{
PrepareSpellScript(spell_hun_readiness_SpellScript);
bool Load()
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
@@ -779,13 +779,13 @@ public:
}
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_readiness_SpellScript();
}
@@ -801,7 +801,7 @@ public:
{
PrepareSpellScript(spell_hun_scatter_shot_SpellScript);
bool Load()
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
@@ -815,13 +815,13 @@ public:
caster->SendAttackSwingCancelAttack();
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_scatter_shot_SpellScript();
}
@@ -837,7 +837,7 @@ public:
{
PrepareAuraScript(spell_hun_sniper_training_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_R1) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1))
return false;
@@ -872,14 +872,14 @@ public:
}
}
void Register()
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_sniper_training_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_hun_sniper_training_AuraScript::HandleUpdatePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_sniper_training_AuraScript();
}
@@ -895,14 +895,14 @@ public:
{
PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript);
bool Load()
bool Load() override
{
if (!GetCaster()->IsPet())
return false;
return true;
}
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
return false;
@@ -930,14 +930,14 @@ public:
}
}
void Register()
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_pet_heart_of_the_phoenix_SpellScript();
}
@@ -953,14 +953,14 @@ public:
{
PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript);
bool Load()
bool Load() override
{
if (!GetCaster()->IsPet())
return false;
return true;
}
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_CARRION_FEEDER_TRIGGERED))
return false;
@@ -987,14 +987,14 @@ public:
caster->CastSpell(caster, SPELL_HUNTER_PET_CARRION_FEEDER_TRIGGERED, false);
}
void Register()
void Register() override
{
OnEffectHit += SpellEffectFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnCheckCast += SpellCheckCastFn(spell_hun_pet_carrion_feeder_SpellScript::CheckIfCorpseNear);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_pet_carrion_feeder_SpellScript();
}
@@ -1010,7 +1010,7 @@ public:
{
PrepareAuraScript(spell_hun_misdirection_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_MISDIRECTION_PROC))
return false;
@@ -1034,7 +1034,7 @@ public:
GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_MISDIRECTION_PROC, true, NULL, aurEff);
}
void Register()
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
DoCheckProc += AuraCheckProcFn(spell_hun_misdirection_AuraScript::CheckProc);
@@ -1042,7 +1042,7 @@ public:
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_misdirection_AuraScript();
}
@@ -1063,13 +1063,13 @@ public:
GetTarget()->ResetRedirectThreat();
}
void Register()
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_proc_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_misdirection_proc_AuraScript();
}
@@ -1094,13 +1094,13 @@ public:
return SPELL_CAST_OK;
}
void Register()
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_hun_disengage_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_disengage_SpellScript();
}
@@ -1166,13 +1166,13 @@ public:
return SPELL_CAST_OK;
}
void Register()
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_hun_tame_beast_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_hun_tame_beast_SpellScript();
}
@@ -1188,7 +1188,7 @@ public:
{
PrepareAuraScript(spell_hun_viper_attack_speed_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_VIPER) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_VICIOUS_VIPER))
@@ -1208,14 +1208,14 @@ public:
GetTarget()->RemoveAurasDueToSpell(SPELL_HUNTER_VICIOUS_VIPER);
}
void Register()
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_viper_attack_speed_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_viper_attack_speed_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_hun_viper_attack_speed_AuraScript();
}