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

@@ -262,12 +262,12 @@ class UnitAura : public Aura
protected:
explicit UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
public:
void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication* aurApp);
void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* aurApp);
void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication* aurApp) override;
void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* aurApp) override;
void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) override;
void FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster);
void FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster) override;
// Allow Apply Aura Handler to modify and access m_AuraDRGroup
void SetDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; }
@@ -283,8 +283,8 @@ class DynObjAura : public Aura
protected:
explicit DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
public:
void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) override;
void FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster);
void FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster) override;
};
#endif

View File

@@ -789,11 +789,11 @@ class SpellEvent : public BasicEvent
{
public:
SpellEvent(Spell* spell);
virtual ~SpellEvent();
~SpellEvent() override;
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
virtual bool IsDeletable() const;
bool Execute(uint64 e_time, uint32 p_time) override;
void Abort(uint64 e_time) override;
bool IsDeletable() const override;
protected:
Spell* m_Spell;
};
@@ -802,7 +802,7 @@ class ReflectEvent : public BasicEvent
{
public:
ReflectEvent(uint64 casterGUID, uint64 targetGUID, const SpellInfo* spellInfo) : _casterGUID(casterGUID), _targetGUID(targetGUID), _spellInfo(spellInfo) { }
virtual bool Execute(uint64 e_time, uint32 p_time);
bool Execute(uint64 e_time, uint32 p_time) override;
protected:
uint64 _casterGUID;

View File

@@ -176,7 +176,7 @@ public:
public:
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
std::string ToString();
bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex);
bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex) override;
void Call(SpellScript* spellScript, SpellEffIndex effIndex);
private:
SpellEffectFnType pEffectHandlerScript;
@@ -195,7 +195,7 @@ public:
{
public:
TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area, bool _dest);
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
std::string ToString();
uint16 GetTarget() const { return targetType; }
protected:
@@ -242,7 +242,7 @@ public:
#define PrepareSpellScript(CLASSNAME) SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
public:
bool _Validate(SpellInfo const* entry);
bool _Validate(SpellInfo const* entry) override;
bool _Load(Spell* spell);
void _InitHit();
bool _IsEffectPrevented(SpellEffIndex effIndex) { return m_hitPreventEffectMask & (1 << effIndex); }
@@ -500,7 +500,7 @@ public:
public:
EffectBase(uint8 _effIndex, uint16 _effName);
std::string ToString();
bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex);
bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex) override;
};
class EffectPeriodicHandler : public EffectBase
{
@@ -621,7 +621,7 @@ public:
public:
AuraScript() : _SpellScript(), m_aura(nullptr), m_auraApplication(nullptr), m_defaultActionPrevented(false)
{}
bool _Validate(SpellInfo const* entry);
bool _Validate(SpellInfo const* entry) override;
bool _Load(Aura* aura);
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const* aurApp = nullptr);
void _FinishScriptCall();