From a394205eca86d2ea2a8539734df49432189bc73b Mon Sep 17 00:00:00 2001 From: DDuarte Date: Sat, 9 Aug 2014 20:17:40 +0100 Subject: Core/Server: Add missing overrides --- src/server/game/AI/ScriptedAI/ScriptedCreature.h | 50 +++++++++++----------- src/server/game/AI/ScriptedAI/ScriptedEscortAI.h | 16 +++---- src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h | 14 +++--- 3 files changed, 40 insertions(+), 40 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 42a849354ef..788da26ea4a 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -150,31 +150,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*/) { } + void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override { } //Called at World update tick - virtual void UpdateAI(uint32 diff); + virtual 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*/) { } @@ -194,13 +194,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 @@ -348,10 +348,10 @@ class BossAI : public ScriptedAI 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); + virtual void UpdateAI(uint32 diff) override; // Hook used to execute events scheduled into EventMap without the need // to override UpdateAI @@ -359,10 +359,10 @@ class BossAI : public ScriptedAI // 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(); @@ -396,10 +396,10 @@ class WorldBossAI : public ScriptedAI WorldBossAI(Creature* creature); virtual ~WorldBossAI() { } - void JustSummoned(Creature* summon); - void SummonedCreatureDespawn(Creature* summon); + void JustSummoned(Creature* summon) override; + void SummonedCreatureDespawn(Creature* summon) override; - virtual void UpdateAI(uint32 diff); + virtual void UpdateAI(uint32 diff) override; // Hook used to execute events scheduled into EventMap without the need // to override UpdateAI @@ -407,9 +407,9 @@ class WorldBossAI : public ScriptedAI // 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(); diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h index 177810bbbfd..b8c9ee57aeb 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h @@ -56,22 +56,22 @@ struct npc_escortAI : public ScriptedAI ~npc_escortAI() { } // 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 const 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 @@ -94,7 +94,7 @@ struct npc_escortAI : public ScriptedAI void SetEscortPaused(bool on); bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState) != 0; } - virtual bool IsEscorted() { return (m_uiEscortState & STATE_ESCORT_ESCORTING); } + virtual bool IsEscorted() override { return (m_uiEscortState & STATE_ESCORT_ESCORTING); } void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; } float GetMaxPlayerDistance() { return MaxPlayerDistance; } diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h index af7508441b9..adb17ef76b1 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h @@ -40,19 +40,19 @@ class FollowerAI : public ScriptedAI //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 = NULL); -- cgit v1.2.3