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

@@ -159,7 +159,7 @@ public:
struct ScriptedAI : public CreatureAI
{
explicit ScriptedAI(Creature* creature);
virtual ~ScriptedAI() {}
~ScriptedAI() override {}
// *************
//CreatureAI Functions
@@ -168,31 +168,31 @@ struct ScriptedAI : public CreatureAI
void AttackStartNoMove(Unit* target);
// Called at any Damage from any attacker (before damage apply)
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) {}
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override {}
//Called at World update tick
virtual void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
//Called at creature death
void JustDied(Unit* /*killer*/) {}
void JustDied(Unit* /*killer*/) override {}
//Called at creature killing another unit
void KilledUnit(Unit* /*victim*/) {}
void KilledUnit(Unit* /*victim*/) override {}
// Called when the creature summon successfully other creature
void JustSummoned(Creature* /*summon*/) {}
void JustSummoned(Creature* /*summon*/) override {}
// Called when a summoned creature is despawned
void SummonedCreatureDespawn(Creature* /*summon*/) {}
void SummonedCreatureDespawn(Creature* /*summon*/) override {}
// Called when hit by a spell
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) {}
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) override {}
// Called when spell hits a target
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) override {}
//Called at waypoint reached or PointMovement end
void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
void MovementInform(uint32 /*type*/, uint32 /*id*/) override {}
// Called when AI is temporarily replaced or put back when possess is applied or removed
void OnPossess(bool /*apply*/) {}
@@ -212,13 +212,13 @@ struct ScriptedAI : public CreatureAI
// *************
//Called at creature reset either by death or evade
void Reset() {}
void Reset() override {}
//Called at creature aggro either by MoveInLOS or Attack Start
void EnterCombat(Unit* /*victim*/) {}
void EnterCombat(Unit* /*victim*/) override {}
// Called before EnterCombat even before the creature is in combat.
void AttackStart(Unit* /*target*/);
void AttackStart(Unit* /*target*/) override;
// *************
//AI Helper Functions
@@ -364,15 +364,15 @@ class BossAI : public ScriptedAI
{
public:
BossAI(Creature* creature, uint32 bossId);
virtual ~BossAI() {}
~BossAI() override {}
InstanceScript* const instance;
BossBoundaryMap const* GetBoundary() const { return _boundary; }
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
void JustSummoned(Creature* summon) override;
void SummonedCreatureDespawn(Creature* summon) override;
virtual void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
@@ -380,10 +380,10 @@ public:
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/) { }
void Reset() { _Reset(); }
void EnterCombat(Unit* /*who*/) { _EnterCombat(); }
void JustDied(Unit* /*killer*/) { _JustDied(); }
void JustReachedHome() { _JustReachedHome(); }
void Reset() override { _Reset(); }
void EnterCombat(Unit* /*who*/) override { _EnterCombat(); }
void JustDied(Unit* /*killer*/) override { _JustDied(); }
void JustReachedHome() override { _JustReachedHome(); }
protected:
void _Reset();
@@ -415,12 +415,12 @@ class WorldBossAI : public ScriptedAI
{
public:
WorldBossAI(Creature* creature);
virtual ~WorldBossAI() {}
~WorldBossAI() override {}
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
void JustSummoned(Creature* summon) override;
void SummonedCreatureDespawn(Creature* summon) override;
virtual void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
@@ -428,9 +428,9 @@ public:
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/) { }
void Reset() { _Reset(); }
void EnterCombat(Unit* /*who*/) { _EnterCombat(); }
void JustDied(Unit* /*killer*/) { _JustDied(); }
void Reset() override { _Reset(); }
void EnterCombat(Unit* /*who*/) override { _EnterCombat(); }
void JustDied(Unit* /*killer*/) override { _JustDied(); }
protected:
void _Reset();

View File

@@ -40,25 +40,25 @@ struct npc_escortAI : public ScriptedAI
{
public:
explicit npc_escortAI(Creature* creature);
~npc_escortAI() {}
~npc_escortAI() override {}
// CreatureAI functions
void AttackStart(Unit* who);
void AttackStart(Unit* who) override;
void MoveInLineOfSight(Unit* who);
void MoveInLineOfSight(Unit* who) override;
void JustDied(Unit*);
void JustDied(Unit*) override;
void JustRespawned();
void JustRespawned() override;
void ReturnToLastPoint();
void EnterEvadeMode();
void EnterEvadeMode() override;
void UpdateAI(uint32 diff); //the "internal" update, calls UpdateEscortAI()
void UpdateAI(uint32 diff) override; //the "internal" update, calls UpdateEscortAI()
virtual void UpdateEscortAI(uint32 diff); //used when it's needed to add code in update (abilities, scripted events, etc)
void MovementInform(uint32, uint32);
void MovementInform(uint32, uint32) override;
// EscortAI functions
void AddWaypoint(uint32 id, float x, float y, float z, uint32 waitTime = 0); // waitTime is in ms
@@ -83,7 +83,7 @@ public:
void SetEscortPaused(bool on);
bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState); }
virtual bool IsEscorted() { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
bool IsEscorted() override { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
float GetMaxPlayerDistance() { return MaxPlayerDistance; }

View File

@@ -23,23 +23,23 @@ class FollowerAI : public ScriptedAI
{
public:
explicit FollowerAI(Creature* creature);
~FollowerAI() {}
~FollowerAI() override {}
//virtual void WaypointReached(uint32 uiPointId) = 0;
void MovementInform(uint32 motionType, uint32 pointId);
void MovementInform(uint32 motionType, uint32 pointId) override;
void AttackStart(Unit*);
void AttackStart(Unit*) override;
void MoveInLineOfSight(Unit*);
void MoveInLineOfSight(Unit*) override;
void EnterEvadeMode();
void EnterEvadeMode() override;
void JustDied(Unit*);
void JustDied(Unit*) override;
void JustRespawned();
void JustRespawned() override;
void UpdateAI(uint32); //the "internal" update, calls UpdateFollowerAI()
void UpdateAI(uint32) override; //the "internal" update, calls UpdateFollowerAI()
virtual void UpdateFollowerAI(uint32); //used when it's needed to add code in update (abilities, scripted events, etc)
void StartFollow(Player* player, uint32 factionForFollower = 0, const Quest* quest = nullptr);