refactor(Core): apply clang-tidy modernize-use-override (#3817)
This commit is contained in:
@@ -430,7 +430,7 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
public:
|
||||
|
||||
explicit Creature(bool isWorldObject = false);
|
||||
virtual ~Creature();
|
||||
~Creature() override;
|
||||
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
@@ -523,8 +523,8 @@ public:
|
||||
void SetMeleeDamageSchool(SpellSchools school) { m_meleeDamageSchoolMask = SpellSchoolMask(1 << school); }
|
||||
|
||||
void _AddCreatureSpellCooldown(uint32 spell_id, uint32 end_time);
|
||||
virtual void AddSpellCooldown(uint32 spell_id, uint32 /*itemid*/, uint32 end_time, bool needSendToClient = false, bool forceSendToSpectator = false) override;
|
||||
virtual bool HasSpellCooldown(uint32 spell_id) const override;
|
||||
void AddSpellCooldown(uint32 spell_id, uint32 /*itemid*/, uint32 end_time, bool needSendToClient = false, bool forceSendToSpectator = false) override;
|
||||
bool HasSpellCooldown(uint32 spell_id) const override;
|
||||
uint32 GetSpellCooldown(uint32 spell_id) const;
|
||||
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
|
||||
bool IsSpellProhibited(SpellSchoolMask idSchoolMask) const;
|
||||
@@ -799,7 +799,7 @@ class AssistDelayEvent : public BasicEvent
|
||||
public:
|
||||
AssistDelayEvent(uint64 victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { }
|
||||
|
||||
bool Execute(uint64 e_time, uint32 p_time);
|
||||
bool Execute(uint64 e_time, uint32 p_time) override;
|
||||
void AddAssistant(uint64 guid) { m_assistants.push_back(guid); }
|
||||
private:
|
||||
AssistDelayEvent();
|
||||
@@ -813,7 +813,7 @@ class ForcedDespawnDelayEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
ForcedDespawnDelayEvent(Creature& owner) : BasicEvent(), m_owner(owner) { }
|
||||
bool Execute(uint64 e_time, uint32 p_time);
|
||||
bool Execute(uint64 e_time, uint32 p_time) override;
|
||||
|
||||
private:
|
||||
Creature& m_owner;
|
||||
|
||||
@@ -29,14 +29,14 @@ class TempSummon : public Creature
|
||||
{
|
||||
public:
|
||||
explicit TempSummon(SummonPropertiesEntry const* properties, uint64 owner, bool isWorldObject);
|
||||
virtual ~TempSummon() {}
|
||||
void Update(uint32 time);
|
||||
~TempSummon() override {}
|
||||
void Update(uint32 time) override;
|
||||
virtual void InitStats(uint32 lifetime);
|
||||
virtual void InitSummon();
|
||||
virtual void UnSummon(uint32 msTime = 0);
|
||||
void RemoveFromWorld();
|
||||
void RemoveFromWorld() override;
|
||||
void SetTempSummonType(TempSummonType type);
|
||||
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
|
||||
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) override {}
|
||||
Unit* GetSummoner() const;
|
||||
uint64 GetSummonerGUID() { return m_summonerGUID; }
|
||||
TempSummonType const& GetSummonType() { return m_type; }
|
||||
@@ -55,14 +55,14 @@ class Minion : public TempSummon
|
||||
{
|
||||
public:
|
||||
Minion(SummonPropertiesEntry const* properties, uint64 owner, bool isWorldObject);
|
||||
void InitStats(uint32 duration);
|
||||
void RemoveFromWorld();
|
||||
void InitStats(uint32 duration) override;
|
||||
void RemoveFromWorld() override;
|
||||
Unit* GetOwner() const;
|
||||
float GetFollowAngle() const { return m_followAngle; }
|
||||
float GetFollowAngle() const override { return m_followAngle; }
|
||||
void SetFollowAngle(float angle) { m_followAngle = angle; }
|
||||
bool IsPetGhoul() const {return GetEntry() == 26125 /*normal ghoul*/ || GetEntry() == 30230 /*Raise Ally ghoul*/;} // Ghoul may be guardian or pet
|
||||
bool IsGuardianPet() const;
|
||||
void setDeathState(DeathState s, bool despawn = false); // override virtual Unit::setDeathState
|
||||
void setDeathState(DeathState s, bool despawn = false) override; // override virtual Unit::setDeathState
|
||||
protected:
|
||||
const uint64 m_owner;
|
||||
float m_followAngle;
|
||||
@@ -72,27 +72,27 @@ class Guardian : public Minion
|
||||
{
|
||||
public:
|
||||
Guardian(SummonPropertiesEntry const* properties, uint64 owner, bool isWorldObject);
|
||||
void InitStats(uint32 duration);
|
||||
void InitStats(uint32 duration) override;
|
||||
bool InitStatsForLevel(uint8 level);
|
||||
void InitSummon();
|
||||
void InitSummon() override;
|
||||
|
||||
bool UpdateStats(Stats stat);
|
||||
bool UpdateAllStats();
|
||||
void UpdateArmor();
|
||||
void UpdateMaxHealth();
|
||||
void UpdateMaxPower(Powers power);
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false);
|
||||
void UpdateDamagePhysical(WeaponAttackType attType);
|
||||
bool UpdateStats(Stats stat) override;
|
||||
bool UpdateAllStats() override;
|
||||
void UpdateArmor() override;
|
||||
void UpdateMaxHealth() override;
|
||||
void UpdateMaxPower(Powers power) override;
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false) override;
|
||||
void UpdateDamagePhysical(WeaponAttackType attType) override;
|
||||
};
|
||||
|
||||
class Puppet : public Minion
|
||||
{
|
||||
public:
|
||||
Puppet(SummonPropertiesEntry const* properties, uint64 owner);
|
||||
void InitStats(uint32 duration);
|
||||
void InitSummon();
|
||||
void Update(uint32 time);
|
||||
void RemoveFromWorld();
|
||||
void InitStats(uint32 duration) override;
|
||||
void InitSummon() override;
|
||||
void Update(uint32 time) override;
|
||||
void RemoveFromWorld() override;
|
||||
protected:
|
||||
Player* GetOwner() const;
|
||||
const uint64 m_owner;
|
||||
@@ -102,7 +102,7 @@ class ForcedUnsummonDelayEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
ForcedUnsummonDelayEvent(TempSummon& owner) : BasicEvent(), m_owner(owner) { }
|
||||
bool Execute(uint64 e_time, uint32 p_time);
|
||||
bool Execute(uint64 e_time, uint32 p_time) override;
|
||||
|
||||
private:
|
||||
TempSummon& m_owner;
|
||||
|
||||
Reference in New Issue
Block a user