Core/Server: Add missing overrides

This commit is contained in:
DDuarte
2014-08-09 20:17:40 +01:00
parent 272b9d3d16
commit a394205eca
80 changed files with 656 additions and 656 deletions

View File

@@ -86,32 +86,32 @@ namespace VMAP
VMapManager2();
~VMapManager2(void);
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y);
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override;
void unloadMap(unsigned int mapId, int x, int y);
void unloadMap(unsigned int mapId);
void unloadMap(unsigned int mapId, int x, int y) override;
void unloadMap(unsigned int mapId) override;
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) ;
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) override ;
/**
fill the hit pos and return true, if an object was hit
*/
bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist);
float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist);
bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist) override;
float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist) override;
bool processCommand(char* /*command*/) { return false; } // for debug and extensions
bool processCommand(char* /*command*/) override { return false; } // for debug and extensions
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const;
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const override;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const override;
WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O
virtual std::string getDirFileName(unsigned int mapId, int /*x*/, int /*y*/) const
virtual std::string getDirFileName(unsigned int mapId, int /*x*/, int /*y*/) const override
{
return getMapFileName(mapId);
}
virtual bool existsMap(const char* basePath, unsigned int mapId, int x, int y);
virtual bool existsMap(const char* basePath, unsigned int mapId, int x, int y) override;
public:
void getInstanceMapTree(InstanceTreeMap &instanceMapTree);
};

View File

@@ -30,7 +30,7 @@ class AggressorAI : public CreatureAI
public:
explicit AggressorAI(Creature* c) : CreatureAI(c) { }
void UpdateAI(uint32);
void UpdateAI(uint32) override;
static int Permissible(const Creature*);
};
@@ -41,12 +41,12 @@ class CombatAI : public CreatureAI
public:
explicit CombatAI(Creature* c) : CreatureAI(c) { }
void InitializeAI();
void Reset();
void EnterCombat(Unit* who);
void JustDied(Unit* killer);
void UpdateAI(uint32 diff);
void SpellInterrupted(uint32 spellId, uint32 unTimeMs);
void InitializeAI() override;
void Reset() override;
void EnterCombat(Unit* who) override;
void JustDied(Unit* killer) override;
void UpdateAI(uint32 diff) override;
void SpellInterrupted(uint32 spellId, uint32 unTimeMs) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -59,10 +59,10 @@ class CasterAI : public CombatAI
{
public:
explicit CasterAI(Creature* c) : CombatAI(c) { m_attackDist = MELEE_RANGE; }
void InitializeAI();
void AttackStart(Unit* victim) { AttackStartCaster(victim, m_attackDist); }
void UpdateAI(uint32 diff);
void EnterCombat(Unit* /*who*/);
void InitializeAI() override;
void AttackStart(Unit* victim) override { AttackStartCaster(victim, m_attackDist); }
void UpdateAI(uint32 diff) override;
void EnterCombat(Unit* /*who*/) override;
private:
float m_attackDist;
};
@@ -71,8 +71,8 @@ struct ArcherAI : public CreatureAI
{
public:
explicit ArcherAI(Creature* c);
void AttackStart(Unit* who);
void UpdateAI(uint32 diff);
void AttackStart(Unit* who) override;
void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -84,9 +84,9 @@ struct TurretAI : public CreatureAI
{
public:
explicit TurretAI(Creature* c);
bool CanAIAttack(Unit const* who) const;
void AttackStart(Unit* who);
void UpdateAI(uint32 diff);
bool CanAIAttack(Unit const* who) const override;
void AttackStart(Unit* who) override;
void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -102,10 +102,10 @@ struct VehicleAI : public CreatureAI
public:
explicit VehicleAI(Creature* creature);
void UpdateAI(uint32 diff);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void OnCharmed(bool apply);
void UpdateAI(uint32 diff) override;
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit*) override { }
void OnCharmed(bool apply) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }

View File

@@ -68,7 +68,7 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
void UpdateAI(uint32 /*diff*/) { }
void UpdateAI(uint32 /*diff*/) override { }
static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};

View File

@@ -29,10 +29,10 @@ class GuardAI : public ScriptedAI
explicit GuardAI(Creature* creature);
static int Permissible(Creature const* creature);
bool CanSeeAlways(WorldObject const* obj);
bool CanSeeAlways(WorldObject const* obj) override;
void EnterEvadeMode();
void JustDied(Unit* killer);
void EnterEvadeMode() override;
void JustDied(Unit* killer) override;
};
#endif

View File

@@ -26,9 +26,9 @@ class PassiveAI : public CreatureAI
public:
explicit PassiveAI(Creature* c);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void UpdateAI(uint32);
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit*) override { }
void UpdateAI(uint32) override;
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -38,13 +38,13 @@ class PossessedAI : public CreatureAI
public:
explicit PossessedAI(Creature* c);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit* target);
void UpdateAI(uint32);
void EnterEvadeMode() { }
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit* target) override;
void UpdateAI(uint32) override;
void EnterEvadeMode() override { }
void JustDied(Unit*);
void KilledUnit(Unit* victim);
void JustDied(Unit*) override;
void KilledUnit(Unit* victim) override;
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -54,11 +54,11 @@ class NullCreatureAI : public CreatureAI
public:
explicit NullCreatureAI(Creature* c);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void UpdateAI(uint32) { }
void EnterEvadeMode() { }
void OnCharmed(bool /*apply*/) { }
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit*) override { }
void UpdateAI(uint32) override { }
void EnterEvadeMode() override { }
void OnCharmed(bool /*apply*/) override { }
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -68,15 +68,15 @@ class CritterAI : public PassiveAI
public:
explicit CritterAI(Creature* c) : PassiveAI(c) { }
void DamageTaken(Unit* done_by, uint32& /*damage*/);
void EnterEvadeMode();
void DamageTaken(Unit* done_by, uint32& /*damage*/) override;
void EnterEvadeMode() override;
};
class TriggerAI : public NullCreatureAI
{
public:
explicit TriggerAI(Creature* c) : NullCreatureAI(c) { }
void IsSummonedBy(Unit* summoner);
void IsSummonedBy(Unit* summoner) override;
};
#endif

View File

@@ -31,23 +31,23 @@ class PetAI : public CreatureAI
explicit PetAI(Creature* c);
void UpdateAI(uint32);
void UpdateAI(uint32) override;
static int Permissible(const Creature*);
void KilledUnit(Unit* /*victim*/);
void AttackStart(Unit* target);
void MovementInform(uint32 moveType, uint32 data);
void OwnerAttackedBy(Unit* attacker);
void OwnerAttacked(Unit* target);
void AttackedBy(Unit* attacker);
void ReceiveEmote(Player* player, uint32 textEmote);
void KilledUnit(Unit* /*victim*/) override;
void AttackStart(Unit* target) override;
void MovementInform(uint32 moveType, uint32 data) override;
void OwnerAttackedBy(Unit* attacker) override;
void OwnerAttacked(Unit* target) override;
void AttackedBy(Unit* attacker) override;
void ReceiveEmote(Player* player, uint32 textEmote) override;
// The following aren't used by the PetAI but need to be defined to override
// default CreatureAI functions which interfere with the PetAI
//
void MoveInLineOfSight(Unit* /*who*/) { } // CreatureAI interferes with returning pets
void MoveInLineOfSight(Unit* /*who*/) override { } // CreatureAI interferes with returning pets
void MoveInLineOfSight_Safe(Unit* /*who*/) { } // CreatureAI interferes with returning pets
void EnterEvadeMode() { } // For fleeing, pets don't use this type of Evade mechanic
void EnterEvadeMode() override { } // For fleeing, pets don't use this type of Evade mechanic
private:
bool _isVisible(Unit*) const;

View File

@@ -29,8 +29,8 @@ class ReactorAI : public CreatureAI
explicit ReactorAI(Creature* c) : CreatureAI(c) { }
void MoveInLineOfSight(Unit*) { }
void UpdateAI(uint32 diff);
void MoveInLineOfSight(Unit*) override { }
void UpdateAI(uint32 diff) override;
static int Permissible(const Creature*);
};

View File

@@ -31,11 +31,11 @@ class TotemAI : public CreatureAI
explicit TotemAI(Creature* c);
void MoveInLineOfSight(Unit* who);
void AttackStart(Unit* victim);
void EnterEvadeMode();
void MoveInLineOfSight(Unit* who) override;
void AttackStart(Unit* victim) override;
void EnterEvadeMode() override;
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* creature);
private:

View File

@@ -275,13 +275,13 @@ class PlayerAI : public UnitAI
public:
explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) { }
void OnCharmed(bool apply);
void OnCharmed(bool apply) override;
};
class SimpleCharmedAI : public PlayerAI
{
public:
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
SimpleCharmedAI(Player* player): PlayerAI(player) { }
};

View File

@@ -127,7 +127,7 @@ class CreatureAI : public UnitAI
// Called at waypoint reached or point movement finished
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
void OnCharmed(bool apply);
void OnCharmed(bool apply) override;
// Called at reaching home after evade
virtual void JustReachedHome() { }

View File

@@ -34,9 +34,9 @@ struct CreatureAIFactory : public SelectableAI
{
CreatureAIFactory(const char* name) : SelectableAI(name) { }
CreatureAI* Create(void*) const;
CreatureAI* Create(void*) const override;
int Permit(const Creature* c) const { return REAL_AI::Permissible(c); }
int Permit(const Creature* c) const override { return REAL_AI::Permissible(c); }
};
template<class REAL_AI>
@@ -61,9 +61,9 @@ struct GameObjectAIFactory : public SelectableGameObjectAI
{
GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) { }
GameObjectAI* Create(void*) const;
GameObjectAI* Create(void*) const override;
int Permit(const GameObject* g) const { return REAL_GO_AI::Permissible(g); }
int Permit(const GameObject* g) const override { return REAL_GO_AI::Permissible(g); }
};
template<class REAL_GO_AI>

View File

@@ -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();

View File

@@ -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; }

View File

@@ -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);

View File

@@ -70,94 +70,94 @@ class SmartAI : public CreatureAI
bool IsEscortInvokerInRange();
// Called when creature is spawned or respawned
void JustRespawned();
void JustRespawned() override;
// Called at reaching home after evade, InitializeAI(), EnterEvadeMode() for resetting variables
void JustReachedHome();
void JustReachedHome() override;
// Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
void EnterCombat(Unit* enemy);
void EnterCombat(Unit* enemy) override;
// Called for reaction at stopping attack at no attackers or targets
void EnterEvadeMode();
void EnterEvadeMode() override;
// Called when the creature is killed
void JustDied(Unit* killer);
void JustDied(Unit* killer) override;
// Called when the creature kills a unit
void KilledUnit(Unit* victim);
void KilledUnit(Unit* victim) override;
// Called when the creature summon successfully other creature
void JustSummoned(Creature* creature);
void JustSummoned(Creature* creature) override;
// Tell creature to attack and follow the victim
void AttackStart(Unit* who);
void AttackStart(Unit* who) override;
// Called if IsVisible(Unit* who) is true at each *who move, reaction at visibility zone enter
void MoveInLineOfSight(Unit* who);
void MoveInLineOfSight(Unit* who) override;
// Called when hit by a spell
void SpellHit(Unit* unit, const SpellInfo* spellInfo);
void SpellHit(Unit* unit, const SpellInfo* spellInfo) override;
// Called when spell hits a target
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo);
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override;
// Called at any Damage from any attacker (before damage apply)
void DamageTaken(Unit* doneBy, uint32& damage);
void DamageTaken(Unit* doneBy, uint32& damage) override;
// Called when the creature receives heal
void HealReceived(Unit* doneBy, uint32& addhealth);
void HealReceived(Unit* doneBy, uint32& addhealth) override;
// Called at World update tick
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
// Called at text emote receive from player
void ReceiveEmote(Player* player, uint32 textEmote);
void ReceiveEmote(Player* player, uint32 textEmote) override;
// Called at waypoint reached or point movement finished
void MovementInform(uint32 MovementType, uint32 Data);
void MovementInform(uint32 MovementType, uint32 Data) override;
// Called when creature is summoned by another unit
void IsSummonedBy(Unit* summoner);
void IsSummonedBy(Unit* summoner) override;
// Called at any Damage to any victim (before damage apply)
void DamageDealt(Unit* doneTo, uint32& damage, DamageEffectType /*damagetype*/);
void DamageDealt(Unit* doneTo, uint32& damage, DamageEffectType /*damagetype*/) override;
// Called when a summoned creature dissapears (UnSommoned)
void SummonedCreatureDespawn(Creature* unit);
void SummonedCreatureDespawn(Creature* unit) override;
// called when the corpse of this creature gets removed
void CorpseRemoved(uint32& respawnDelay);
void CorpseRemoved(uint32& respawnDelay) override;
// Called at World update tick if creature is charmed
void UpdateAIWhileCharmed(const uint32 diff);
// Called when a Player/Creature enters the creature (vehicle)
void PassengerBoarded(Unit* who, int8 seatId, bool apply);
void PassengerBoarded(Unit* who, int8 seatId, bool apply) override;
// Called when gets initialized, when creature is added to world
void InitializeAI();
void InitializeAI() override;
// Called when creature gets charmed by another unit
void OnCharmed(bool apply);
void OnCharmed(bool apply) override;
// Called when victim is in line of sight
bool CanAIAttack(const Unit* who) const;
bool CanAIAttack(const Unit* who) const override;
// Used in scripts to share variables
void DoAction(int32 param = 0);
void DoAction(int32 param = 0) override;
// Used in scripts to share variables
uint32 GetData(uint32 id = 0) const;
uint32 GetData(uint32 id = 0) const override;
// Used in scripts to share variables
void SetData(uint32 id, uint32 value);
void SetData(uint32 id, uint32 value) override;
// Used in scripts to share variables
void SetGUID(uint64 guid, int32 id = 0);
void SetGUID(uint64 guid, int32 id = 0) override;
// Used in scripts to share variables
uint64 GetGUID(int32 id = 0) const;
uint64 GetGUID(int32 id = 0) const override;
//core related
static int Permissible(const Creature*);
@@ -174,15 +174,15 @@ class SmartAI : public CreatureAI
void SetInvincibilityHpLevel(uint32 level) { mInvincibilityHpLevel = level; }
void sGossipHello(Player* player);
void sGossipSelect(Player* player, uint32 sender, uint32 action);
void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code);
void sQuestAccept(Player* player, Quest const* quest);
void sGossipHello(Player* player) override;
void sGossipSelect(Player* player, uint32 sender, uint32 action) override;
void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code) override;
void sQuestAccept(Player* player, Quest const* quest) override;
//void sQuestSelect(Player* player, Quest const* quest);
//void sQuestComplete(Player* player, Quest const* quest);
void sQuestReward(Player* player, Quest const* quest, uint32 opt);
bool sOnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex);
void sOnGameEvent(bool start, uint16 eventId);
void sQuestReward(Player* player, Quest const* quest, uint32 opt) override;
bool sOnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex) override;
void sOnGameEvent(bool start, uint16 eventId) override;
uint32 mEscortQuestID;
@@ -193,7 +193,7 @@ class SmartAI : public CreatureAI
}
void StartDespawn() { mDespawnState = 2; }
void OnSpellClick(Unit* clicker, bool& result);
void OnSpellClick(Unit* clicker, bool& result) override;
private:
uint32 mFollowCreditType;
@@ -237,23 +237,23 @@ class SmartGameObjectAI : public GameObjectAI
SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { }
~SmartGameObjectAI() { }
void UpdateAI(uint32 diff);
void InitializeAI();
void Reset();
void UpdateAI(uint32 diff) override;
void InitializeAI() override;
void Reset() override;
SmartScript* GetScript() { return &mScript; }
static int Permissible(const GameObject* g);
bool GossipHello(Player* player);
bool GossipSelect(Player* player, uint32 sender, uint32 action);
bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/);
bool QuestAccept(Player* player, Quest const* quest);
bool QuestReward(Player* player, Quest const* quest, uint32 opt);
void Destroyed(Player* player, uint32 eventId);
void SetData(uint32 id, uint32 value);
bool GossipHello(Player* player) override;
bool GossipSelect(Player* player, uint32 sender, uint32 action) override;
bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) override;
bool QuestAccept(Player* player, Quest const* quest) override;
bool QuestReward(Player* player, Quest const* quest, uint32 opt) override;
void Destroyed(Player* player, uint32 eventId) override;
void SetData(uint32 id, uint32 value) override;
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
void OnGameEvent(bool start, uint16 eventId);
void OnStateChanged(uint32 state, Unit* unit);
void EventInform(uint32 eventId);
void OnGameEvent(bool start, uint16 eventId) override;
void OnStateChanged(uint32 state, Unit* unit) override;
void EventInform(uint32 eventId) override;
private:
SmartScript mScript;

View File

@@ -245,12 +245,12 @@ class Battlefield : public ZoneScript
void HandlePlayerLeaveZone(Player* player, uint32 zone);
// All-purpose data storage 64 bit
virtual uint64 GetData64(uint32 dataId) const { return m_Data64[dataId]; }
virtual void SetData64(uint32 dataId, uint64 value) { m_Data64[dataId] = value; }
virtual uint64 GetData64(uint32 dataId) const override { return m_Data64[dataId]; }
virtual void SetData64(uint32 dataId, uint64 value) override { m_Data64[dataId] = value; }
// All-purpose data storage 32 bit
virtual uint32 GetData(uint32 dataId) const { return m_Data32[dataId]; }
virtual void SetData(uint32 dataId, uint32 value) { m_Data32[dataId] = value; }
virtual uint32 GetData(uint32 dataId) const override { return m_Data32[dataId]; }
virtual void SetData(uint32 dataId, uint32 value) override { m_Data32[dataId] = value; }
virtual void UpdateData(uint32 index, int32 pad) { m_Data32[index] += pad; }
// Battlefield - generic methods

View File

@@ -255,7 +255,7 @@ class WintergraspCapturePoint : public BfCapturePoint
void LinkToWorkshop(WGWorkshop* workshop) { m_Workshop = workshop; }
void ChangeTeam(TeamId oldteam);
void ChangeTeam(TeamId oldteam) override;
TeamId GetTeam() const { return m_team; }
protected:
@@ -276,7 +276,7 @@ class BattlefieldWG : public Battlefield
* - Rebuild tower and wall
* - Invite player to war
*/
void OnBattleStart();
void OnBattleStart() override;
/**
* \brief Called when battle end
@@ -287,13 +287,13 @@ class BattlefieldWG : public Battlefield
* - Remove vehicle
* \param endByTimer : true if battle ended when timer is at 00:00, false if battle ended by clicking on relic
*/
void OnBattleEnd(bool endByTimer);
void OnBattleEnd(bool endByTimer) override;
/**
* \brief Called when grouping starts (15 minutes before battlestart)
* - Invite all player in zone to join queue
*/
void OnStartGrouping();
void OnStartGrouping() override;
/**
* \brief Called when player accept invite to join battle
@@ -303,20 +303,20 @@ class BattlefieldWG : public Battlefield
* - Update tenacity
* \param player: Player who accepted invite
*/
void OnPlayerJoinWar(Player* player);
void OnPlayerJoinWar(Player* player) override;
/**
* \brief Called when player left the battle
* - Update player aura
* \param player : Player who left the battle
*/
void OnPlayerLeaveWar(Player* player);
void OnPlayerLeaveWar(Player* player) override;
/**
* \brief Called when player left the WG zone
* \param player : Player who left the zone
*/
void OnPlayerLeaveZone(Player* player);
void OnPlayerLeaveZone(Player* player) override;
/**
* \brief Called when player enters in WG zone
@@ -324,7 +324,7 @@ class BattlefieldWG : public Battlefield
* - Update worldstate
* \param player : Player who enters the zone
*/
void OnPlayerEnterZone(Player* player);
void OnPlayerEnterZone(Player* player) override;
/**
* \brief Called for update battlefield data
@@ -332,24 +332,24 @@ class BattlefieldWG : public Battlefield
* - Update imunity aura from graveyard
* \param diff : time elapsed since the last call (in ms)
*/
bool Update(uint32 diff);
bool Update(uint32 diff) override;
/**
* \brief Called when a creature is created
* - Update vehicle count
*/
void OnCreatureCreate(Creature* creature);
void OnCreatureCreate(Creature* creature) override;
/**
* \brief Called when a creature is removed
* - Update vehicle count
*/
void OnCreatureRemove(Creature* creature);
void OnCreatureRemove(Creature* creature) override;
/**
* \brief Called when a gameobject is created
*/
void OnGameObjectCreate(GameObject* go);
void OnGameObjectCreate(GameObject* go) override;
/**
* \brief Called when a wall/tower is broken
@@ -370,14 +370,14 @@ class BattlefieldWG : public Battlefield
*/
void UpdatedDestroyedTowerCount(TeamId team);
void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1);
void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1) override;
void RemoveAurasFromPlayer(Player* player);
/**
* \brief Called when battlefield is setup, at server start
*/
bool SetupBattlefield();
bool SetupBattlefield() override;
/// Return pointer to relic object
GameObject* GetRelic() { return GetGameObject(m_titansRelicGUID); }
@@ -395,22 +395,22 @@ class BattlefieldWG : public Battlefield
void UpdateCounterVehicle(bool init);
void SendInitWorldStatesTo(Player* player);
void SendInitWorldStatesToAll();
void FillInitialWorldStates(WorldPacket& data);
void SendInitWorldStatesToAll() override;
void FillInitialWorldStates(WorldPacket& data) override;
void HandleKill(Player* killer, Unit* victim);
void OnUnitDeath(Unit* unit);
void HandleKill(Player* killer, Unit* victim) override;
void OnUnitDeath(Unit* unit) override;
void PromotePlayer(Player* killer);
void UpdateTenacity();
void ProcessEvent(WorldObject* obj, uint32 eventId);
void ProcessEvent(WorldObject* obj, uint32 eventId) override;
bool FindAndRemoveVehicleFromList(Unit* vehicle);
// returns the graveyardId in the specified area.
uint8 GetSpiritGraveyardId(uint32 areaId) const;
uint32 GetData(uint32 data) const;
uint32 GetData(uint32 data) const override;
protected:
bool m_isRelicInteractible;

View File

@@ -28,7 +28,7 @@ struct ArenaScore : public BattlegroundScore
protected:
ArenaScore(uint64 playerGuid, uint32 team) : BattlegroundScore(playerGuid), TeamId(team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE) { }
void AppendToPacket(WorldPacket& data) final
void AppendToPacket(WorldPacket& data) final override
{
data << uint64(PlayerGuid);
@@ -40,7 +40,7 @@ struct ArenaScore : public BattlegroundScore
BuildObjectivesBlock(data);
}
void BuildObjectivesBlock(WorldPacket& data) final
void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(0); // Objectives Count
}

View File

@@ -143,8 +143,8 @@ class BGQueueInviteEvent : public BasicEvent
{ }
virtual ~BGQueueInviteEvent() { }
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
virtual bool Execute(uint64 e_time, uint32 p_time) override;
virtual void Abort(uint64 e_time) override;
private:
uint64 m_PlayerGuid;
uint32 m_BgInstanceGUID;
@@ -167,8 +167,8 @@ class BGQueueRemoveEvent : public BasicEvent
virtual ~BGQueueRemoveEvent() { }
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
virtual bool Execute(uint64 e_time, uint32 p_time) override;
virtual void Abort(uint64 e_time) override;
private:
uint64 m_PlayerGuid;
uint32 m_BgInstanceGUID;

View File

@@ -260,7 +260,7 @@ struct BattlegroundABScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data) final
void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2);
data << uint32(BasesAssaulted);
@@ -277,31 +277,31 @@ class BattlegroundAB : public Battleground
BattlegroundAB();
~BattlegroundAB();
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void Reset();
void EndBattleground(uint32 winner);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void Reset() override;
void EndBattleground(uint32 winner) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/* Scorekeeping */
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
/* Nodes occupying */
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
/* achievement req. */
bool IsAllNodesControlledByTeam(uint32 team) const;
bool CheckAchievementCriteriaMeet(uint32 /*criteriaId*/, Player const* /*player*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0);
bool IsAllNodesControlledByTeam(uint32 team) const override;
bool CheckAchievementCriteriaMeet(uint32 /*criteriaId*/, Player const* /*player*/, Unit const* /*target*/ = nullptr, uint32 /*miscvalue1*/ = 0) override;
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
/* Gameobject spawning/despawning */
void _CreateBanner(uint8 node, uint8 type, uint8 teamIndex, bool delay);
void _DelBanner(uint8 node, uint8 type, uint8 teamIndex);

View File

@@ -1558,7 +1558,7 @@ struct BattlegroundAVScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data) final
void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(5); // Objectives Count
data << uint32(GraveyardsAssaulted);
@@ -1582,37 +1582,37 @@ class BattlegroundAV : public Battleground
~BattlegroundAV();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* player, uint32 trigger);
bool SetupBattleground();
void ResetBGSubclass();
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* player, uint32 trigger) override;
bool SetupBattleground() override;
void ResetBGSubclass() override;
/*general stuff*/
void UpdateScore(uint16 team, int16 points);
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
/*handlestuff*/ //these are functions which get called from extern
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
void HandleKillPlayer(Player* player, Player* killer);
void HandleKillUnit(Creature* unit, Player* killer);
void HandleQuestComplete(uint32 questid, Player* player);
bool CanActivateGO(int32 GOId, uint32 team) const;
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
void HandleKillPlayer(Player* player, Player* killer) override;
void HandleKillUnit(Creature* unit, Player* killer) override;
void HandleQuestComplete(uint32 questid, Player* player) override;
bool CanActivateGO(int32 GOId, uint32 team) const override;
void EndBattleground(uint32 winner);
void EndBattleground(uint32 winner) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
// Achievement: Av perfection and Everything counts
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0);
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = nullptr, uint32 miscvalue1 = 0) override;
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
/* Nodes occupying */
void EventPlayerAssaultsPoint(Player* player, uint32 object);
@@ -1636,7 +1636,7 @@ class BattlegroundAV : public Battleground
void ChangeMineOwner(uint8 mine, uint32 team, bool initial=false);
/*worldstates*/
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
uint8 GetWorldStateType(uint8 state, uint16 team);
void SendMineWorldStates(uint32 mine);
void UpdateNodeWorldState(BG_AV_Nodes node);

View File

@@ -48,11 +48,11 @@ class BattlegroundBE : public Arena
BattlegroundBE();
/* inherited from BattlegroundClass */
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void FillInitialWorldStates(WorldPacket &d);
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void FillInitialWorldStates(WorldPacket &d) override;
};
#endif

View File

@@ -94,15 +94,15 @@ class BattlegroundDS : public Arena
BattlegroundDS();
/* inherited from BattlegroundClass */
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void FillInitialWorldStates(WorldPacket &d);
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void FillInitialWorldStates(WorldPacket &d) override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
EventMap _events;

View File

@@ -343,7 +343,7 @@ struct BattlegroundEYScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data) final
void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(1); // Objectives Count
data << uint32(FlagCaptures);
@@ -359,42 +359,42 @@ class BattlegroundEY : public Battleground
~BattlegroundEY();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
/* BG Flags */
uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return m_FlagKeeper; }
uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const override { return m_FlagKeeper; }
void SetFlagPicker(uint64 guid) { m_FlagKeeper = guid; }
bool IsFlagPickedup() const { return m_FlagKeeper != 0; }
uint8 GetFlagState() const { return m_FlagState; }
void RespawnFlag(bool send_message);
void RespawnFlagAfterDrop();
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleBuffUse(uint64 buff_guid);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void HandleKillPlayer(Player* player, Player* killer);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
bool SetupBattleground();
void Reset();
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
void HandleKillPlayer(Player* player, Player* killer) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
bool SetupBattleground() override;
void Reset() override;
void UpdateTeamScore(uint32 Team);
void EndBattleground(uint32 winner);
void EndBattleground(uint32 winner) override;
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
void FillInitialWorldStates(WorldPacket& data);
void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) { m_DroppedFlagGUID = guid;}
void FillInitialWorldStates(WorldPacket& data) override;
void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) override { m_DroppedFlagGUID = guid;}
uint64 GetDroppedFlagGUID() const { return m_DroppedFlagGUID;}
/* Battleground Events */
void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
void EventPlayerDroppedFlag(Player* Source);
void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) override;
void EventPlayerDroppedFlag(Player* Source) override;
/* achievement req. */
bool IsAllNodesControlledByTeam(uint32 team) const;
bool IsAllNodesControlledByTeam(uint32 team) const override;
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType);
void EventTeamCapturedPoint(Player* Source, uint32 Point);

View File

@@ -871,7 +871,7 @@ struct BattlegroundICScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data) final
void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2); // Objectives Count
data << uint32(BasesAssaulted);
@@ -889,36 +889,36 @@ class BattlegroundIC : public Battleground
~BattlegroundIC();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void PostUpdateImpl(uint32 diff);
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void PostUpdateImpl(uint32 diff) override;
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* player, uint32 trigger);
bool SetupBattleground();
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* player, uint32 trigger) override;
bool SetupBattleground() override;
void SpawnLeader(uint32 teamid);
void HandleKillUnit(Creature* unit, Player* killer);
void HandleKillPlayer(Player* player, Player* killer);
void EndBattleground(uint32 winner);
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/);
void HandleKillUnit(Creature* unit, Player* killer) override;
void HandleKillPlayer(Player* player, Player* killer) override;
void EndBattleground(uint32 winner) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/) override;
void DestroyGate(Player* player, GameObject* go);
void DestroyGate(Player* player, GameObject* go) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/* Scorekeeping */
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
void DoAction(uint32 action, uint64 var);
void DoAction(uint32 action, uint64 var) override;
void HandlePlayerResurrect(Player* player);
void HandlePlayerResurrect(Player* player) override;
uint32 GetNodeState(uint8 nodeType) const { return (uint8)nodePoint[nodeType].nodeState; }
bool IsAllNodesControlledByTeam(uint32 team) const;
bool IsAllNodesControlledByTeam(uint32 team) const override;
bool IsSpellAllowed(uint32 spellId, Player const* player) const;
bool IsSpellAllowed(uint32 spellId, Player const* player) const override;
private:
uint32 closeFortressDoorsTimer;

View File

@@ -43,11 +43,11 @@ class BattlegroundRL : public Arena
BattlegroundRL();
/* inherited from BattlegroundClass */
void FillInitialWorldStates(WorldPacket &d);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void FillInitialWorldStates(WorldPacket &d) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
};
#endif

View File

@@ -96,14 +96,14 @@ class BattlegroundRV : public Arena
BattlegroundRV();
/* inherited from BattlegroundClass */
void StartingEventOpenDoors();
void FillInitialWorldStates(WorldPacket &d);
void StartingEventOpenDoors() override;
void FillInitialWorldStates(WorldPacket &d) override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
void TogglePillarCollision();

View File

@@ -554,27 +554,27 @@ class BattlegroundSA : public Battleground
* -Update timer
* -Round switch
*/
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
/* inherited from BattlegroundClass */
/// Called when a player join battle
void AddPlayer(Player* player);
void AddPlayer(Player* player) override;
/// Called when battle start
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
/// Called for ini battleground, after that the first player be entered
bool SetupBattleground();
void Reset();
bool SetupBattleground() override;
void Reset() override;
/// Called for generate packet contain worldstate data
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
/// Called when a player kill a unit in bg
void HandleKillUnit(Creature* creature, Player* killer);
void HandleKillUnit(Creature* creature, Player* killer) override;
/// Return the nearest graveyard where player can respawn
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/// Called when someone activates an event
void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/, WorldObject* /*invoker*/ = NULL) override;
/// Called when a player click on flag (graveyard flag)
void EventPlayerClickedOnFlag(Player* source, GameObject* go);
void EventPlayerClickedOnFlag(Player* source, GameObject* go) override;
/// Called when a player clicked on relic
void TitanRelicActivated(Player* clicker);
@@ -588,11 +588,11 @@ class BattlegroundSA : public Battleground
}
/// Called on battleground ending
void EndBattleground(uint32 winner);
void EndBattleground(uint32 winner) override;
/// Called when a player leave battleground
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
/* Scorekeeping */
@@ -630,7 +630,7 @@ class BattlegroundSA : public Battleground
* -Update worldstate
* -Delete gameobject in front of door (lighting object, with different colours for each door)
*/
void DestroyGate(Player* player, GameObject* go);
void DestroyGate(Player* player, GameObject* go) override;
/// Update timer worldstate
void SendTime();
/**

View File

@@ -170,7 +170,7 @@ struct BattlegroundWGScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data) final
void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2); // Objectives Count
data << uint32(FlagCaptures);
@@ -189,12 +189,12 @@ class BattlegroundWS : public Battleground
~BattlegroundWS();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
/* BG Flags */
uint64 GetFlagPickerGUID(int32 team) const
uint64 GetFlagPickerGUID(int32 team) const override
{
if (team == TEAM_ALLIANCE || team == TEAM_HORDE)
return m_FlagKeepers[team];
@@ -209,40 +209,40 @@ class BattlegroundWS : public Battleground
uint8 GetFlagState(uint32 team) { return _flagState[GetTeamIndexByTeamId(team)]; }
/* Battleground Events */
void EventPlayerDroppedFlag(Player* player);
void EventPlayerClickedOnFlag(Player* player, GameObject* target_obj);
void EventPlayerDroppedFlag(Player* player) override;
void EventPlayerClickedOnFlag(Player* player, GameObject* target_obj) override;
void EventPlayerCapturedFlag(Player* player);
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* player, uint32 trigger);
void HandleKillPlayer(Player* player, Player* killer);
bool SetupBattleground();
void Reset();
void EndBattleground(uint32 winner);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* player, uint32 trigger) override;
void HandleKillPlayer(Player* player, Player* killer) override;
bool SetupBattleground() override;
void Reset() override;
void EndBattleground(uint32 winner) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
void UpdateFlagState(uint32 team, uint32 value);
void SetLastFlagCapture(uint32 team) { _lastFlagCaptureTeam = team; }
void UpdateTeamScore(uint32 team);
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
void SetDroppedFlagGUID(uint64 guid, int32 team = -1)
void SetDroppedFlagGUID(uint64 guid, int32 team = -1) override
{
if (team == TEAM_ALLIANCE || team == TEAM_HORDE)
m_DroppedFlagGUID[team] = guid;
}
uint64 GetDroppedFlagGUID(uint32 TeamID) { return m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)];}
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
/* Scorekeeping */
void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; }
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
/* Achievements*/
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0);
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = nullptr, uint32 miscvalue1 = 0) override;
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
@@ -260,6 +260,6 @@ class BattlegroundWS : public Battleground
uint8 _flagDebuffState; // 0 - no debuffs, 1 - focused assault, 2 - brutal assault
uint8 _minutesElapsed;
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
};
#endif

View File

@@ -147,14 +147,14 @@ class CliHandler : public ChatHandler
explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) { }
// overwrite functions
const char *GetTrinityString(int32 entry) const;
bool isAvailable(ChatCommand const& cmd) const;
bool HasPermission(uint32 /*permission*/) const { return true; }
void SendSysMessage(const char *str);
std::string GetNameLink() const;
bool needReportToTarget(Player* chr) const;
LocaleConstant GetSessionDbcLocale() const;
int GetSessionDbLocaleIndex() const;
const char *GetTrinityString(int32 entry) const override;
bool isAvailable(ChatCommand const& cmd) const override;
bool HasPermission(uint32 /*permission*/) const override { return true; }
void SendSysMessage(const char *str) override;
std::string GetNameLink() const override;
bool needReportToTarget(Player* chr) const override;
LocaleConstant GetSessionDbcLocale() const override;
int GetSessionDbLocaleIndex() const override;
private:
void* m_callbackArg;

View File

@@ -61,8 +61,8 @@ public:
{
memset(_data, 0, sizeof(_data));
}
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
std::string FormatName(uint8 index, ItemLocale const* locale, char* const* suffixStrings) const;
@@ -77,9 +77,9 @@ protected:
class QuestChatLink : public ChatLink
{
public:
QuestChatLink() : ChatLink(), _quest(NULL), _questLevel(0) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
QuestChatLink() : ChatLink(), _quest(nullptr), _questLevel(0) { }
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
Quest const* _quest;
@@ -90,9 +90,9 @@ protected:
class SpellChatLink : public ChatLink
{
public:
SpellChatLink() : ChatLink(), _spell(NULL) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
SpellChatLink() : ChatLink(), _spell(nullptr) { }
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
SpellInfo const* _spell;
@@ -133,7 +133,7 @@ class TalentChatLink : public SpellChatLink
{
public:
TalentChatLink() : SpellChatLink(), _talentId(0), _rankId(0) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
private:
uint32 _talentId;
@@ -145,7 +145,7 @@ class EnchantmentChatLink : public SpellChatLink
{
public:
EnchantmentChatLink() : SpellChatLink() { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
};
// GlyphChatLink - link to glyph
@@ -153,7 +153,7 @@ class GlyphChatLink : public SpellChatLink
{
public:
GlyphChatLink() : SpellChatLink(), _slotId(0), _glyph(NULL) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
private:
uint32 _slotId;
GlyphPropertiesEntry const* _glyph;

View File

@@ -117,13 +117,13 @@ class HostileReference : public Reference<Unit, ThreatManager>
//=================================================
// Tell our refTo (target) object that we have a link
void targetObjectBuildLink();
void targetObjectBuildLink() override;
// Tell our refTo (taget) object, that the link is cut
void targetObjectDestroyLink();
void targetObjectDestroyLink() override;
// Tell our refFrom (source) object, that the link is cut (Target destroyed)
void sourceObjectDestroyLink();
void sourceObjectDestroyLink() override;
private:
// Inform the source, that the status of that reference was changed
void fireStatusChanged(ThreatRefStatusChangeEvent& threatRefStatusChangeEvent);

View File

@@ -35,9 +35,9 @@ class LFGPlayerScript : public PlayerScript
LFGPlayerScript();
// Player Hooks
void OnLogout(Player* player);
void OnLogin(Player* player, bool loginFirst);
void OnMapChanged(Player* player);
void OnLogout(Player* player) override;
void OnLogin(Player* player, bool loginFirst) override;
void OnMapChanged(Player* player) override;
};
class LFGGroupScript : public GroupScript
@@ -46,11 +46,11 @@ class LFGGroupScript : public GroupScript
LFGGroupScript();
// Group Hooks
void OnAddMember(Group* group, uint64 guid);
void OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, char const* reason);
void OnDisband(Group* group);
void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
void OnInviteMember(Group* group, uint64 guid);
void OnAddMember(Group* group, uint64 guid) override;
void OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, char const* reason) override;
void OnDisband(Group* group) override;
void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid) override;
void OnInviteMember(Group* group, uint64 guid) override;
};
} // namespace lfg

View File

@@ -52,8 +52,8 @@ class Corpse : public WorldObject, public GridObject<Corpse>
explicit Corpse(CorpseType type = CORPSE_BONES);
~Corpse();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
bool Create(uint32 guidlow, Map* map);
bool Create(uint32 guidlow, Player* owner);

View File

@@ -428,11 +428,11 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
explicit Creature(bool isWorldObject = false);
virtual ~Creature();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void SetObjectScale(float scale);
void SetDisplayId(uint32 modelId);
void SetObjectScale(float scale) override;
void SetDisplayId(uint32 modelId) override;
void DisappearAndDie();
@@ -443,8 +443,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
void Update(uint32 time); // overwrited Unit::Update
void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
void Update(uint32 time) override; // overwrited Unit::Update
void GetRespawnPosition(float &x, float &y, float &z, float* ori = nullptr, float* dist =nullptr) const;
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
uint32 GetCorpseDelay() const { return m_corpseDelay; }
@@ -454,7 +454,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool IsGuard() const { return (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD) != 0; }
bool CanWalk() const { return (GetCreatureTemplate()->InhabitType & INHABIT_GROUND) != 0; }
bool CanSwim() const { return (GetCreatureTemplate()->InhabitType & INHABIT_WATER) != 0 || IsPet(); }
bool CanFly() const { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; }
bool CanFly() const override { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; }
void SetReactState(ReactStates st) { m_reactState = st; }
ReactStates GetReactState() { return m_reactState; }
@@ -465,14 +465,14 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
bool isCanTrainingAndResetTalentsOf(Player* player) const;
bool CanCreatureAttack(Unit const* victim, bool force = true) const;
bool IsImmunedToSpell(SpellInfo const* spellInfo) const; // override Unit::IsImmunedToSpell
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // override Unit::IsImmunedToSpellEffect
bool IsImmunedToSpell(SpellInfo const* spellInfo) const override; // override Unit::IsImmunedToSpell
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override; // override Unit::IsImmunedToSpellEffect
bool isElite() const;
bool isWorldBoss() const;
bool IsDungeonBoss() const;
uint8 getLevelForTarget(WorldObject const* target) const; // overwrite Unit::getLevelForTarget for boss level support
uint8 getLevelForTarget(WorldObject const* target) const override; // overwrite Unit::getLevelForTarget for boss level support
bool IsInEvadeMode() const { return HasUnitState(UNIT_STATE_EVADE); }
@@ -481,17 +481,17 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
CreatureAI* AI() const { return (CreatureAI*)i_AI; }
bool SetWalk(bool enable);
bool SetDisableGravity(bool disable, bool packetOnly = false);
bool SetSwim(bool enable);
bool SetCanFly(bool enable);
bool SetWaterWalking(bool enable, bool packetOnly = false);
bool SetFeatherFall(bool enable, bool packetOnly = false);
bool SetHover(bool enable, bool packetOnly = false);
bool SetWalk(bool enable) override;
bool SetDisableGravity(bool disable, bool packetOnly = false) override;
bool SetSwim(bool enable) override;
bool SetCanFly(bool enable) override;
bool SetWaterWalking(bool enable, bool packetOnly = false) override;
bool SetFeatherFall(bool enable, bool packetOnly = false) override;
bool SetHover(bool enable, bool packetOnly = false) override;
uint32 GetShieldBlockValue() const;
uint32 GetShieldBlockValue() const override;
SpellSchoolMask GetMeleeDamageSchoolMask() const { return m_meleeDamageSchoolMask; }
SpellSchoolMask GetMeleeDamageSchoolMask() const override { return m_meleeDamageSchoolMask; }
void SetMeleeDamageSchool(SpellSchools school) { m_meleeDamageSchoolMask = SpellSchoolMask(1 << school); }
void _AddCreatureSpellCooldown(uint32 spell_id, time_t end_time);
@@ -500,21 +500,21 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool HasSpellCooldown(uint32 spell_id) const;
bool HasCategoryCooldown(uint32 spell_id) const;
uint32 GetCreatureSpellCooldownDelay(uint32 spellId) const;
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
bool HasSpell(uint32 spellID) const;
bool HasSpell(uint32 spellID) const override;
bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr);
void UpdateMovementFlags();
bool UpdateStats(Stats stat);
bool UpdateAllStats();
void UpdateResistances(uint32 school);
void UpdateArmor();
void UpdateMaxHealth();
void UpdateMaxPower(Powers power);
void UpdateAttackPowerAndDamage(bool ranged = false);
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void UpdateResistances(uint32 school) override;
void UpdateArmor() override;
void UpdateMaxHealth() override;
void UpdateMaxPower(Powers power) override;
void UpdateAttackPowerAndDamage(bool ranged = false) override;
void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) override;
void SetCanDualWield(bool value) override;
@@ -539,9 +539,9 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint32 GetScriptId() const;
// override WorldObject function for proper name localization
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const;
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override;
void setDeathState(DeathState s); // override virtual Unit::setDeathState
void setDeathState(DeathState s) override; // override virtual Unit::setDeathState
bool LoadFromDB(uint32 guid, Map* map) { return LoadCreatureFromDB(guid, map, false); }
bool LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap = true);
@@ -609,7 +609,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
time_t GetRespawnTimeEx() const;
void SetRespawnTime(uint32 respawn) { m_respawnTime = respawn ? time(NULL) + respawn : 0; }
void Respawn(bool force = false);
void SaveRespawnTime();
void SaveRespawnTime() override;
uint32 GetRespawnDelay() const { return m_respawnDelay; }
void SetRespawnDelay(uint32 delay) { m_respawnDelay = delay; }
@@ -624,8 +624,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void SetInCombatWithZone();
bool hasQuest(uint32 quest_id) const;
bool hasInvolvedQuest(uint32 quest_id) const;
bool hasQuest(uint32 quest_id) const override;
bool hasInvolvedQuest(uint32 quest_id) const override;
bool isRegeneratingHealth() { return m_regenHealth; }
void setRegeneratingHealth(bool regenHealth) { m_regenHealth = regenHealth; }
@@ -676,7 +676,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool m_isTempWorldObject; //true when possessed
// Handling caster facing during spellcast
void SetTarget(uint64 guid);
void SetTarget(uint64 guid) override;
void FocusTarget(Spell const* focusSpell, WorldObject const* target);
void ReleaseFocus(Spell const* focusSpell);
@@ -728,8 +728,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint16 m_LootMode; // Bitmask (default: LOOT_MODE_DEFAULT) that determines what loot will be lootable
bool IsInvisibleDueToDespawn() const;
bool CanAlwaysSee(WorldObject const* obj) const;
bool IsInvisibleDueToDespawn() const override;
bool CanAlwaysSee(WorldObject const* obj) const override;
private:
void ForcedDespawn(uint32 timeMSToDespawn = 0);
@@ -750,7 +750,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();
@@ -764,7 +764,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;

View File

@@ -42,13 +42,13 @@ class TempSummon : public Creature
public:
explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
virtual ~TempSummon() { }
void Update(uint32 time);
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;
Creature* GetSummonerCreatureBase() const;
uint64 GetSummonerGUID() const { return m_summonerGUID; }
@@ -67,10 +67,10 @@ class Minion : public TempSummon
{
public:
Minion(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
void InitStats(uint32 duration);
void RemoveFromWorld();
void InitStats(uint32 duration) override;
void RemoveFromWorld() override;
Unit* GetOwner() const { return m_owner; }
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;} // Ghoul may be guardian or pet
bool IsSpiritWolf() const {return GetEntry() == 29264;} // Spirit wolf from feral spirits
@@ -84,17 +84,17 @@ class Guardian : public Minion
{
public:
Guardian(SummonPropertiesEntry const* properties, Unit* 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 UpdateResistances(uint32 school);
void UpdateArmor();
void UpdateMaxHealth();
void UpdateMaxPower(Powers power);
void UpdateAttackPowerAndDamage(bool ranged = false);
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void UpdateResistances(uint32 school) override;
void UpdateArmor() override;
void UpdateMaxHealth() override;
void UpdateMaxPower(Powers power) override;
void UpdateAttackPowerAndDamage(bool ranged = false) override;
void UpdateDamagePhysical(WeaponAttackType attType) override;
int32 GetBonusDamage() const { return m_bonusSpellDamage; }
@@ -108,17 +108,17 @@ class Puppet : public Minion
{
public:
Puppet(SummonPropertiesEntry const* properties, Unit* 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;
};
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;

View File

@@ -38,11 +38,11 @@ class DynamicObject : public WorldObject, public GridObject<DynamicObject>, publ
DynamicObject(bool isWorldObject);
~DynamicObject();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
bool CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spellId, Position const& pos, float radius, DynamicObjectType type);
void Update(uint32 p_time);
void Update(uint32 p_time) override;
void Remove();
void SetDuration(int32 newDuration);
int32 GetDuration() const;

View File

@@ -635,14 +635,14 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
explicit GameObject();
~GameObject();
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
void AddToWorld();
void RemoveFromWorld();
void CleanupsBeforeDelete(bool finalCleanup = true);
void AddToWorld() override;
void RemoveFromWorld() override;
void CleanupsBeforeDelete(bool finalCleanup = true) override;
bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit = 0);
void Update(uint32 p_time);
void Update(uint32 p_time) override;
static GameObject* GetGameObject(WorldObject& object, uint64 guid);
GameObjectTemplate const* GetGOInfo() const { return m_goInfo; }
GameObjectData const* GetGOData() const { return m_goData; }
@@ -657,7 +657,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f);
// overwrite WorldObject function for proper name localization
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const;
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override;
void SaveToDB();
void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask);
@@ -757,7 +757,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
uint32 GetUseCount() const { return m_usetimes; }
uint32 GetUniqueUseCount() const { return m_unique_users.size(); }
void SaveRespawnTime();
void SaveRespawnTime() override;
Loot loot;
@@ -769,8 +769,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
uint32 m_groupLootTimer; // (msecs)timer used for group loot
uint32 lootingGroupLowGUID; // used to find group which is looting
bool hasQuest(uint32 quest_id) const;
bool hasInvolvedQuest(uint32 quest_id) const;
bool hasQuest(uint32 quest_id) const override;
bool hasInvolvedQuest(uint32 quest_id) const override;
bool ActivateToQuest(Player* target) const;
void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false, Unit* user = NULL);
// 0 = use `gameobject`.`spawntimesecs`
@@ -780,10 +780,10 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
bool IsNeverVisible() const override;
bool IsAlwaysVisibleFor(WorldObject const* seer) const;
bool IsInvisibleDueToDespawn() const;
bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
bool IsInvisibleDueToDespawn() const override;
uint8 getLevelForTarget(WorldObject const* target) const
uint8 getLevelForTarget(WorldObject const* target) const override
{
if (Unit* owner = GetOwner())
return owner->getLevelForTarget(target);
@@ -828,10 +828,10 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
Transport* ToTransport() { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport*>(this); else return NULL; }
Transport const* ToTransport() const { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport const*>(this); else return NULL; }
float GetStationaryX() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
float GetStationaryY() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
float GetStationaryZ() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
float GetStationaryO() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
float GetStationaryX() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
float GetStationaryY() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
float GetStationaryZ() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
float GetStationaryO() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
float GetInteractionDistance();
@@ -873,7 +873,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void SwitchDoorOrButton(bool activate, bool alternative = false);
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const override
{
//! Following check does check 3d distance
return IsInRange(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), dist2compare);

View File

@@ -32,10 +32,10 @@ class Bag : public Item
Bag();
~Bag();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
bool Create(uint32 guidlow, uint32 itemid, Player const* owner);
bool Create(uint32 guidlow, uint32 itemid, Player const* owner) override;
void Clear();
void StoreItem(uint8 slot, Item* pItem, bool update);
@@ -52,13 +52,13 @@ class Bag : public Item
// DB operations
// overwrite virtual Item::SaveToDB
void SaveToDB(SQLTransaction& trans);
void SaveToDB(SQLTransaction& trans) override;
// overwrite virtual Item::LoadFromDB
bool LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry);
bool LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry) override;
// overwrite virtual Item::DeleteFromDB
void DeleteFromDB(SQLTransaction& trans);
void DeleteFromDB(SQLTransaction& trans) override;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
protected:

View File

@@ -324,8 +324,8 @@ class Item : public Object
uState = state;
}
bool hasQuest(uint32 quest_id) const { return GetTemplate()->StartQuest == quest_id; }
bool hasInvolvedQuest(uint32 /*quest_id*/) const { return false; }
bool hasQuest(uint32 quest_id) const override { return GetTemplate()->StartQuest == quest_id; }
bool hasInvolvedQuest(uint32 /*quest_id*/) const override { return false; }
bool IsPotion() const { return GetTemplate()->IsPotion(); }
bool IsWeaponVellum() const { return GetTemplate()->IsWeaponVellum(); }
bool IsArmorVellum() const { return GetTemplate()->IsArmorVellum(); }
@@ -350,7 +350,7 @@ class Item : public Object
void ClearSoulboundTradeable(Player* currentOwner);
bool CheckSoulboundTradeExpire();
void BuildUpdate(UpdateDataMapType&);
void BuildUpdate(UpdateDataMapType&) override;
uint32 GetScriptId() const { return GetTemplate()->ScriptId; }
private:

View File

@@ -580,7 +580,7 @@ class WorldObject : public Object, public WorldLocation
virtual void Update (uint32 /*time_diff*/) { }
void _Create(uint32 guidlow, HighGuid guidhigh, uint32 phaseMask);
virtual void RemoveFromWorld();
virtual void RemoveFromWorld() override;
void GetNearPoint2D(float &x, float &y, float distance, float absAngle) const;
void GetNearPoint(WorldObject const* searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle) const;
@@ -713,7 +713,7 @@ class WorldObject : public Object, public WorldLocation
void DestroyForNearbyPlayers();
virtual void UpdateObjectVisibility(bool forced = true);
void BuildUpdate(UpdateDataMapType&);
void BuildUpdate(UpdateDataMapType&) override;
//relocation and visibility system functions
void AddToNotify(uint16 f) { m_notifyflags |= f;}

View File

@@ -43,10 +43,10 @@ class Pet : public Guardian
explicit Pet(Player* owner, PetType type = MAX_PET_TYPE);
virtual ~Pet();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void SetDisplayId(uint32 modelId);
void SetDisplayId(uint32 modelId) override;
PetType getPetType() const { return m_petType; }
void setPetType(PetType type) { m_petType = type; }
@@ -60,16 +60,16 @@ class Pet : public Guardian
bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner);
bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask);
bool LoadPetFromDB(Player* owner, uint32 petentry = 0, uint32 petnumber = 0, bool current = false);
bool isBeingLoaded() const { return m_loading;}
bool isBeingLoaded() const override { return m_loading;}
void SavePetToDB(PetSaveMode mode);
void Remove(PetSaveMode mode, bool returnreagent = false);
static void DeleteFromDB(uint32 guidlow);
void setDeathState(DeathState s); // overwrite virtual Creature::setDeathState and Unit::setDeathState
void Update(uint32 diff); // overwrite virtual Creature::Update and Unit::Update
void setDeathState(DeathState s) override; // overwrite virtual Creature::setDeathState and Unit::setDeathState
void Update(uint32 diff) override; // overwrite virtual Creature::Update and Unit::Update
uint8 GetPetAutoSpellSize() const { return m_autospells.size(); }
uint32 GetPetAutoSpellOnPos(uint8 pos) const
uint8 GetPetAutoSpellSize() const override { return m_autospells.size(); }
uint32 GetPetAutoSpellOnPos(uint8 pos) const override
{
if (pos >= m_autospells.size())
return 0;
@@ -100,7 +100,7 @@ class Pet : public Guardian
void ToggleAutocast(SpellInfo const* spellInfo, bool apply);
bool HasSpell(uint32 spell) const;
bool HasSpell(uint32 spell) const override;
void LearnPetPassives();
void CastPetAuras(bool current);
@@ -121,7 +121,7 @@ class Pet : public Guardian
bool unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
bool removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
void CleanupActionBar();
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
PetSpellMap m_spells;
AutoSpellList m_autospells;
@@ -129,7 +129,7 @@ class Pet : public Guardian
void InitPetCreateSpells();
bool resetTalents();
static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = NULL);
static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = nullptr);
void InitTalentForLevel();
uint8 GetMaxTalentPointsForLevel(uint8 level);
@@ -159,11 +159,11 @@ class Pet : public Guardian
DeclinedName *m_declinedname;
private:
void SaveToDB(uint32, uint8, uint32) // override of Creature::SaveToDB - must not be called
void SaveToDB(uint32, uint8, uint32) override // override of Creature::SaveToDB - must not be called
{
ASSERT(false);
}
void DeleteFromDB() // override of Creature::DeleteFromDB - must not be called
void DeleteFromDB() override // override of Creature::DeleteFromDB - must not be called
{
ASSERT(false);
}

View File

@@ -1101,12 +1101,12 @@ class Player : public Unit, public GridObject<Player>
explicit Player(WorldSession* session);
~Player();
void CleanupsBeforeDelete(bool finalCleanup = true);
void CleanupsBeforeDelete(bool finalCleanup = true) override;
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void SetObjectScale(float scale)
void SetObjectScale(float scale) override
{
Unit::SetObjectScale(scale);
SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, scale * DEFAULT_WORLD_OBJECT_SIZE);
@@ -1122,14 +1122,14 @@ class Player : public Unit, public GridObject<Player>
bool Create(uint32 guidlow, CharacterCreateInfo* createInfo);
void Update(uint32 time);
void Update(uint32 time) override;
static bool BuildEnumData(PreparedQueryResult result, WorldPacket* data);
void SetInWater(bool apply);
bool IsInWater() const { return m_isInWater; }
bool IsUnderWater() const;
bool IsInWater() const override { return m_isInWater; }
bool IsUnderWater() const override;
bool IsFalling() { return GetPositionZ() < m_lastFallZ; }
void SendInitialPacketsBeforeAddToMap();
@@ -1191,7 +1191,7 @@ class Player : public Unit, public GridObject<Player>
uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; }
uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; }
void setDeathState(DeathState s); // overwrite Unit::setDeathState
void setDeathState(DeathState s) override; // overwrite Unit::setDeathState
void InnEnter(time_t time, uint32 mapid, float x, float y, float z);
@@ -1228,7 +1228,7 @@ class Player : public Unit, public GridObject<Player>
/*********************************************************/
void SetVirtualItemSlot(uint8 i, Item* item);
void SetSheath(SheathState sheathed); // overwrite Unit version
void SetSheath(SheathState sheathed) override; // overwrite Unit version
uint8 FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) const;
uint32 GetItemCount(uint32 item, bool inBankAlso = false, Item* skipItem = NULL) const;
uint32 GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem = NULL) const;
@@ -1671,7 +1671,7 @@ class Player : public Unit, public GridObject<Player>
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
void ModifySpellCooldown(uint32 spellId, int32 cooldown);
void SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId = 0, Spell* spell = NULL, bool setCooldown = true);
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
void RemoveSpellCooldown(uint32 spell_id, bool update = false);
void RemoveSpellCategoryCooldown(uint32 cat, bool update = false);
void SendClearCooldown(uint32 spell_id, Unit* target);
@@ -1779,15 +1779,15 @@ class Player : public Unit, public GridObject<Player>
float GetHealthBonusFromStamina();
float GetManaBonusFromIntellect();
bool UpdateStats(Stats stat);
bool UpdateAllStats();
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void ApplySpellPenetrationBonus(int32 amount, bool apply);
void UpdateResistances(uint32 school);
void UpdateArmor();
void UpdateMaxHealth();
void UpdateMaxPower(Powers power);
void UpdateResistances(uint32 school) override;
void UpdateArmor() override;
void UpdateMaxHealth() override;
void UpdateMaxPower(Powers power) override;
void ApplyFeralAPBonus(int32 amount, bool apply);
void UpdateAttackPowerAndDamage(bool ranged = false);
void UpdateAttackPowerAndDamage(bool ranged = false) override;
void UpdateShieldBlockValue();
void ApplySpellPowerBonus(int32 amount, bool apply);
void UpdateSpellDamageAndHealingBonus();
@@ -1836,8 +1836,8 @@ class Player : public Unit, public GridObject<Player>
WorldSession* GetSession() const { return m_session; }
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
void DestroyForPlayer(Player* target, bool onDeath = false) const;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
void DestroyForPlayer(Player* target, bool onDeath = false) const override;
void SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend = false, float group_rate=1.0f);
// notifiers
@@ -1856,14 +1856,14 @@ class Player : public Unit, public GridObject<Player>
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
void SendResetFailedNotify(uint32 mapid);
virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false);
virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false) override;
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
void UpdateUnderwaterState(Map* m, float x, float y, float z);
void UpdateUnderwaterState(Map* m, float x, float y, float z) override;
void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
void SendMessageToSetInRange(WorldPacket* data, float fist, bool self);// overwrite Object::SendMessageToSetInRange
void SendMessageToSet(WorldPacket* data, bool self) override {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
void SendMessageToSetInRange(WorldPacket* data, float fist, bool self) override;// overwrite Object::SendMessageToSetInRange
void SendMessageToSetInRange(WorldPacket* data, float dist, bool self, bool own_team_only);
void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr);
void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) override;
void SendTeleportAckPacket();
@@ -1980,7 +1980,7 @@ class Player : public Unit, public GridObject<Player>
int32 CalculateCorpseReclaimDelay(bool load = false);
void SendCorpseReclaimDelay(uint32 delay);
uint32 GetShieldBlockValue() const; // overwrite Unit version (virtual)
uint32 GetShieldBlockValue() const override; // overwrite Unit version (virtual)
bool CanParry() const { return m_canParry; }
void SetCanParry(bool value);
bool CanBlock() const { return m_canBlock; }
@@ -2169,12 +2169,12 @@ class Player : public Unit, public GridObject<Player>
bool HaveAtClient(WorldObject const* u) const;
bool IsNeverVisible() const;
bool IsNeverVisible() const override;
bool IsVisibleGloballyFor(Player const* player) const;
void SendInitialVisiblePackets(Unit* target);
void UpdateObjectVisibility(bool forced = true);
void UpdateObjectVisibility(bool forced = true) override;
void UpdateVisibilityForPlayer();
void UpdateVisibilityOf(WorldObject* target);
void UpdateTriggerVisibility();
@@ -2269,8 +2269,8 @@ class Player : public Unit, public GridObject<Player>
MapReference &GetMapRef() { return m_mapRef; }
// Set map to player and add reference
void SetMap(Map* map);
void ResetMap();
void SetMap(Map* map) override;
void ResetMap() override;
bool isAllowedToLoot(const Creature* creature);
@@ -2324,13 +2324,13 @@ class Player : public Unit, public GridObject<Player>
bool IsInWhisperWhiteList(uint64 guid);
void RemoveFromWhisperWhiteList(uint64 guid) { WhisperList.remove(guid); }
bool SetDisableGravity(bool disable, bool packetOnly /* = false */);
bool SetCanFly(bool apply);
bool SetWaterWalking(bool apply, bool packetOnly = false);
bool SetFeatherFall(bool apply, bool packetOnly = false);
bool SetHover(bool enable, bool packetOnly = false);
bool SetDisableGravity(bool disable, bool packetOnly /* = false */) override;
bool SetCanFly(bool apply) override;
bool SetWaterWalking(bool apply, bool packetOnly = false) override;
bool SetFeatherFall(bool apply, bool packetOnly = false) override;
bool SetHover(bool enable, bool packetOnly = false) override;
bool CanFly() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
//! Return collision height sent to client
float GetCollisionHeight(bool mounted) const;
@@ -2594,9 +2594,9 @@ class Player : public Unit, public GridObject<Player>
Runes *m_runes;
EquipmentSets m_EquipmentSets;
bool CanAlwaysSee(WorldObject const* obj) const;
bool CanAlwaysSee(WorldObject const* obj) const override;
bool IsAlwaysDetectableFor(WorldObject const* seer) const;
bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
uint8 m_grantableLevels;

View File

@@ -37,25 +37,25 @@ class Totem : public Minion
public:
Totem(SummonPropertiesEntry const* properties, Unit* owner);
virtual ~Totem() { }
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
void UnSummon(uint32 msTime = 0);
void Update(uint32 time) override;
void InitStats(uint32 duration) override;
void InitSummon() override;
void UnSummon(uint32 msTime = 0) override;
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }
TotemType GetTotemType() const { return m_type; }
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
void UpdateResistances(uint32 /*school*/) { }
void UpdateArmor() { }
void UpdateMaxHealth() { }
void UpdateMaxPower(Powers /*power*/) { }
void UpdateAttackPowerAndDamage(bool /*ranged*/) { }
bool UpdateStats(Stats /*stat*/) override { return true; }
bool UpdateAllStats() override { return true; }
void UpdateResistances(uint32 /*school*/) override { }
void UpdateArmor() override { }
void UpdateMaxHealth() override { }
void UpdateMaxPower(Powers /*power*/) override { }
void UpdateAttackPowerAndDamage(bool /*ranged*/) override { }
void UpdateDamagePhysical(WeaponAttackType /*attType*/) override { }
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override;
protected:
TotemType m_type;

View File

@@ -1284,8 +1284,8 @@ class Unit : public WorldObject
UnitAI* GetAI() { return i_AI; }
void SetAI(UnitAI* newAI) { i_AI = newAI; }
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void CleanupBeforeRemoveFromMap(bool finalCleanup);
void CleanupsBeforeDelete(bool finalCleanup = true) override; // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units)
@@ -1300,7 +1300,7 @@ class Unit : public WorldObject
float GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const;
float GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const;
virtual void Update(uint32 time);
virtual void Update(uint32 time) override;
void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; }
void resetAttackTimer(WeaponAttackType type = BASE_ATTACK);
@@ -1356,7 +1356,7 @@ class Unit : public WorldObject
bool IsVehicle() const { return (m_unitTypeMask & UNIT_MASK_VEHICLE) != 0; }
uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
uint8 getLevelForTarget(WorldObject const* /*target*/) const { return getLevel(); }
uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return getLevel(); }
void SetLevel(uint8 lvl);
uint8 getRace() const { return GetByteValue(UNIT_FIELD_BYTES_0, 0); }
uint32 getRaceMask() const { return 1 << (getRace()-1); }
@@ -1916,8 +1916,8 @@ class Unit : public WorldObject
void SetVisible(bool x);
// common function for visibility checks for player/creatures with detection code
void SetPhaseMask(uint32 newPhaseMask, bool update);// overwrite WorldObject::SetPhaseMask
void UpdateObjectVisibility(bool forced = true);
void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite WorldObject::SetPhaseMask
void UpdateObjectVisibility(bool forced = true) override;
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];
uint32 m_lastSanctuaryTime;
@@ -2104,7 +2104,7 @@ class Unit : public WorldObject
bool IsOnVehicle(const Unit* vehicle) const;
Unit* GetVehicleBase() const;
Creature* GetVehicleCreatureBase() const;
uint64 GetTransGUID() const;
uint64 GetTransGUID() const override;
/// Returns the transport this unit is on directly (if on vehicle and transport, return vehicle)
TransportBase* GetDirectTransport() const;
@@ -2160,7 +2160,7 @@ class Unit : public WorldObject
protected:
explicit Unit (bool isWorldObject);
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
UnitAI* i_AI, *i_disabledAI;
@@ -2229,8 +2229,8 @@ class Unit : public WorldObject
uint32 m_unitTypeMask;
LiquidTypeEntry const* _lastLiquid;
bool IsAlwaysVisibleFor(WorldObject const* seer) const;
bool IsAlwaysDetectableFor(WorldObject const* seer) const;
bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
void DisableSpline();
private:

View File

@@ -89,7 +89,7 @@ class Vehicle : public TransportBase
void InitMovementInfoForBase();
/// This method transforms supplied transport offsets into global coordinates
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const override
{
TransportBase::CalculatePassengerPosition(x, y, z, o,
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
@@ -97,7 +97,7 @@ class Vehicle : public TransportBase
}
/// This method transforms supplied global coordinates into local offsets
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const override
{
TransportBase::CalculatePassengerOffset(x, y, z, o,
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
@@ -126,8 +126,8 @@ class VehicleJoinEvent : public BasicEvent
protected:
VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) { }
~VehicleJoinEvent();
bool Execute(uint64, uint32);
void Abort(uint64);
bool Execute(uint64, uint32) override;
void Abort(uint64) override;
Vehicle* Target;
Unit* Passenger;

View File

@@ -34,24 +34,24 @@ class GridState
class InvalidState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class ActiveState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class IdleState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class RemovalState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
#endif

View File

@@ -129,7 +129,7 @@ class Roll : public LootValidatorRef
~Roll();
void setLoot(Loot* pLoot);
Loot* getLoot();
void targetObjectBuildLink();
void targetObjectBuildLink() override;
uint64 itemGUID;
uint32 itemid;

View File

@@ -28,9 +28,9 @@ class GroupReference : public Reference<Group, Player>
{
protected:
uint8 iSubGroup;
void targetObjectBuildLink();
void targetObjectDestroyLink();
void sourceObjectDestroyLink();
void targetObjectBuildLink() override;
void targetObjectDestroyLink() override;
void sourceObjectDestroyLink() override;
public:
GroupReference() : Reference<Group, Player>(), iSubGroup(0) { }
~GroupReference() { unlink(); }

View File

@@ -394,8 +394,8 @@ private:
~EventLogEntry() { }
void SaveToDB(SQLTransaction& trans) const;
void WritePacket(WorldPacket& data) const;
void SaveToDB(SQLTransaction& trans) const override;
void WritePacket(WorldPacket& data) const override;
private:
GuildEventLogTypes m_eventType;
@@ -426,8 +426,8 @@ private:
~BankEventLogEntry() { }
void SaveToDB(SQLTransaction& trans) const;
void WritePacket(WorldPacket& data) const;
void SaveToDB(SQLTransaction& trans) const override;
void WritePacket(WorldPacket& data) const override;
private:
GuildBankEventLogTypes m_eventType;
@@ -604,13 +604,13 @@ private:
PlayerMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) :
MoveItemData(guild, player, container, slotId) { }
bool IsBank() const { return false; }
bool InitItem();
void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount = 0);
Item* StoreItem(SQLTransaction& trans, Item* pItem);
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const;
bool IsBank() const override { return false; }
bool InitItem() override;
void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount = 0) override;
Item* StoreItem(SQLTransaction& trans, Item* pItem) override;
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const override;
protected:
InventoryResult CanStore(Item* pItem, bool swap);
InventoryResult CanStore(Item* pItem, bool swap) override;
};
class BankMoveItemData : public MoveItemData

View File

@@ -280,8 +280,8 @@ class LootValidatorRef : public Reference<Loot, LootValidatorRef>
{
public:
LootValidatorRef() { }
void targetObjectDestroyLink() { }
void sourceObjectDestroyLink() { }
void targetObjectDestroyLink() override { }
void sourceObjectDestroyLink() override { }
};
//=====================================================

View File

@@ -678,23 +678,23 @@ class InstanceMap : public Map
public:
InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent);
~InstanceMap();
bool AddPlayerToMap(Player*);
void RemovePlayerFromMap(Player*, bool);
void Update(const uint32);
bool AddPlayerToMap(Player*) override;
void RemovePlayerFromMap(Player*, bool) override;
void Update(const uint32) override;
void CreateInstanceData(bool load);
bool Reset(uint8 method);
uint32 GetScriptId() { return i_script_id; }
InstanceScript* GetInstanceScript() { return i_data; }
void PermBindAllPlayers(Player* source);
void UnloadAll();
bool CanEnter(Player* player);
void UnloadAll() override;
bool CanEnter(Player* player) override;
void SendResetWarnings(uint32 timeLeft) const;
void SetResetSchedule(bool on);
uint32 GetMaxPlayers() const;
uint32 GetMaxResetDelay() const;
virtual void InitVisibilityDistance();
virtual void InitVisibilityDistance() override;
private:
bool m_resetAfterUnload;
bool m_unloadWhenEmpty;
@@ -708,14 +708,14 @@ class BattlegroundMap : public Map
BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode);
~BattlegroundMap();
bool AddPlayerToMap(Player*);
void RemovePlayerFromMap(Player*, bool);
bool CanEnter(Player* player);
bool AddPlayerToMap(Player*) override;
void RemovePlayerFromMap(Player*, bool) override;
bool CanEnter(Player* player) override;
void SetUnload();
//void UnloadAll(bool pForce);
void RemoveAllPlayers();
void RemoveAllPlayers() override;
virtual void InitVisibilityDistance();
virtual void InitVisibilityDistance() override;
Battleground* GetBG() { return m_bg; }
void SetBG(Battleground* bg) { m_bg = bg; }
private:

View File

@@ -33,11 +33,11 @@ class MapInstanced : public Map
~MapInstanced() { }
// functions overwrite Map versions
void Update(const uint32);
void DelayedUpdate(const uint32 diff);
void Update(const uint32) override;
void DelayedUpdate(const uint32 diff) override;
//void RelocationNotify();
void UnloadAll();
bool CanEnter(Player* player);
void UnloadAll() override;
bool CanEnter(Player* player) override;
Map* CreateInstanceForPlayer(const uint32 mapId, Player* player);
Map* FindInstanceMap(uint32 instanceId) const
@@ -61,7 +61,7 @@ class MapInstanced : public Map
}
InstancedMaps &GetInstancedMaps() { return m_InstancedMaps; }
virtual void InitVisibilityDistance();
virtual void InitVisibilityDistance() override;
private:
InstanceMap* CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty);

View File

@@ -25,18 +25,18 @@
class MapReference : public Reference<Map, Player>
{
protected:
void targetObjectBuildLink()
void targetObjectBuildLink() override
{
// called from link()
getTarget()->m_mapRefManager.insertFirst(this);
getTarget()->m_mapRefManager.incSize();
}
void targetObjectDestroyLink()
void targetObjectDestroyLink() override
{
// called from unlink()
if (isValid()) getTarget()->m_mapRefManager.decSize();
}
void sourceObjectDestroyLink()
void sourceObjectDestroyLink() override
{
// called from invalidate()
getTarget()->m_mapRefManager.decSize();

View File

@@ -27,8 +27,8 @@ class Unit;
class FollowerReference : public Reference<Unit, TargetedMovementGeneratorBase>
{
protected:
void targetObjectBuildLink();
void targetObjectDestroyLink();
void sourceObjectDestroyLink();
void targetObjectBuildLink() override;
void targetObjectDestroyLink() override;
void sourceObjectDestroyLink() override;
};
#endif

View File

@@ -51,25 +51,25 @@ template<class T, class D>
class MovementGeneratorMedium : public MovementGenerator
{
public:
void Initialize(Unit* u)
void Initialize(Unit* u) override
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoInitialize(static_cast<T*>(u));
}
void Finalize(Unit* u)
void Finalize(Unit* u) override
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoFinalize(static_cast<T*>(u));
}
void Reset(Unit* u)
void Reset(Unit* u) override
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoReset(static_cast<T*>(u));
}
bool Update(Unit* u, uint32 time_diff)
bool Update(Unit* u, uint32 time_diff) override
{
//u->AssertIsType<T>();
return (static_cast<D*>(this))->DoUpdate(static_cast<T*>(u), time_diff);
@@ -86,7 +86,7 @@ struct MovementGeneratorFactory : public SelectableMovement
{
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) { }
MovementGenerator* Create(void *) const;
MovementGenerator* Create(void *) const override;
};
typedef FactoryHolder<MovementGenerator, MovementGeneratorType> MovementGeneratorCreator;

View File

@@ -49,9 +49,9 @@ class TimedFleeingMovementGenerator : public FleeingMovementGenerator<Creature>
FleeingMovementGenerator<Creature>(fright),
i_totalFleeTime(time) { }
MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
bool Update(Unit*, uint32);
void Finalize(Unit*);
MovementGeneratorType GetMovementGeneratorType() override { return TIMED_FLEEING_MOTION_TYPE; }
bool Update(Unit*, uint32) override;
void Finalize(Unit*) override;
private:
TimeTracker i_totalFleeTime;

View File

@@ -38,7 +38,7 @@ class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature
void DoFinalize(Creature*);
void DoReset(Creature*);
bool DoUpdate(Creature*, const uint32);
MovementGeneratorType GetMovementGeneratorType() { return HOME_MOTION_TYPE; }
MovementGeneratorType GetMovementGeneratorType() override { return HOME_MOTION_TYPE; }
private:
void _setTargetLocation(Creature*);

View File

@@ -25,11 +25,11 @@ class IdleMovementGenerator : public MovementGenerator
{
public:
void Initialize(Unit*);
void Finalize(Unit*) { }
void Reset(Unit*);
bool Update(Unit*, uint32) { return true; }
MovementGeneratorType GetMovementGeneratorType() { return IDLE_MOTION_TYPE; }
void Initialize(Unit*) override;
void Finalize(Unit*) override { }
void Reset(Unit*) override;
bool Update(Unit*, uint32) override { return true; }
MovementGeneratorType GetMovementGeneratorType() override { return IDLE_MOTION_TYPE; }
};
extern IdleMovementGenerator si_idleMovement;
@@ -39,11 +39,11 @@ class RotateMovementGenerator : public MovementGenerator
public:
explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(time), m_direction(direction) { }
void Initialize(Unit*);
void Finalize(Unit*);
void Reset(Unit* owner) { Initialize(owner); }
bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return ROTATE_MOTION_TYPE; }
void Initialize(Unit*) override;
void Finalize(Unit*) override;
void Reset(Unit* owner) override { Initialize(owner); }
bool Update(Unit*, uint32) override;
MovementGeneratorType GetMovementGeneratorType() override { return ROTATE_MOTION_TYPE; }
private:
uint32 m_duration, m_maxDuration;
@@ -55,11 +55,11 @@ class DistractMovementGenerator : public MovementGenerator
public:
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) { }
void Initialize(Unit*);
void Finalize(Unit*);
void Reset(Unit* owner) { Initialize(owner); }
bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return DISTRACT_MOTION_TYPE; }
void Initialize(Unit*) override;
void Finalize(Unit*) override;
void Reset(Unit* owner) override { Initialize(owner); }
bool Update(Unit*, uint32) override;
MovementGeneratorType GetMovementGeneratorType() override { return DISTRACT_MOTION_TYPE; }
private:
uint32 m_timer;
@@ -71,8 +71,8 @@ class AssistanceDistractMovementGenerator : public DistractMovementGenerator
AssistanceDistractMovementGenerator(uint32 timer) :
DistractMovementGenerator(timer) { }
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
void Finalize(Unit*);
MovementGeneratorType GetMovementGeneratorType() override { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
void Finalize(Unit*) override;
};
#endif

View File

@@ -55,8 +55,8 @@ class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
AssistanceMovementGenerator(float _x, float _y, float _z) :
PointMovementGenerator<Creature>(0, _x, _y, _z, true) { }
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; }
void Finalize(Unit*);
MovementGeneratorType GetMovementGeneratorType() override { return ASSISTANCE_MOTION_TYPE; }
void Finalize(Unit*) override;
};
// Does almost nothing - just doesn't allows previous movegen interrupt current effect.
@@ -64,11 +64,11 @@ class EffectMovementGenerator : public MovementGenerator
{
public:
explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) { }
void Initialize(Unit*) { }
void Finalize(Unit*);
void Reset(Unit*) { }
bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; }
void Initialize(Unit*) override { }
void Finalize(Unit*) override;
void Reset(Unit*) override { }
bool Update(Unit*, uint32) override;
MovementGeneratorType GetMovementGeneratorType() override { return EFFECT_MOTION_TYPE; }
private:
uint32 m_Id;
};

View File

@@ -72,7 +72,7 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
void MovementInform(Creature*);
MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
MovementGeneratorType GetMovementGeneratorType() override { return WAYPOINT_MOTION_TYPE; }
// now path movement implmementation
void LoadPath(Creature*);
@@ -126,7 +126,7 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig
void DoReset(Player*);
void DoFinalize(Player*);
bool DoUpdate(Player*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
MovementGeneratorType GetMovementGeneratorType() override { return FLIGHT_MOTION_TYPE; }
TaxiPathNodeList const& GetPath() { return *i_path; }
uint32 GetPathAtMapEnd() const;

View File

@@ -218,9 +218,9 @@ class OutdoorPvP : public ZoneScript
// setup stuff
virtual bool SetupOutdoorPvP() {return true;}
void OnGameObjectCreate(GameObject* go);
void OnGameObjectRemove(GameObject* go);
void OnCreatureCreate(Creature*) { }
void OnGameObjectCreate(GameObject* go) override;
void OnGameObjectRemove(GameObject* go) override;
void OnCreatureCreate(Creature*) override { }
// send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);

View File

@@ -197,7 +197,7 @@ class SpellScriptLoader : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Should return a fully valid SpellScript pointer.
virtual SpellScript* GetSpellScript() const { return NULL; }
@@ -355,7 +355,7 @@ class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Gets an InstanceScript object for this instance.
virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return NULL; }
@@ -376,7 +376,7 @@ class ItemScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when a dummy spell effect is triggered on the item.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Item* /*target*/) { return false; }
@@ -425,7 +425,7 @@ class CreatureScript : public UnitScript, public UpdatableScript<Creature>
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when a dummy spell effect is triggered on the creature.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Creature* /*target*/) { return false; }
@@ -466,7 +466,7 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when a dummy spell effect is triggered on the gameobject.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, GameObject* /*target*/) { return false; }
@@ -513,7 +513,7 @@ class AreaTriggerScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when the area trigger is activated by a player.
virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) { return false; }
@@ -527,7 +527,7 @@ class BattlegroundScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Should return a fully valid Battleground object for the type ID.
virtual Battleground* GetBattleground() const = 0;
@@ -541,7 +541,7 @@ class OutdoorPvPScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Should return a fully valid OutdoorPvP object for the type ID.
virtual OutdoorPvP* GetOutdoorPvP() const = 0;
@@ -567,7 +567,7 @@ class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when the weather changes in the zone this script is associated with.
virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { }
@@ -602,7 +602,7 @@ class ConditionScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when a single condition is checked for a player.
virtual bool OnConditionCheck(Condition* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; }
@@ -650,7 +650,7 @@ class TransportScript : public ScriptObject, public UpdatableScript<Transport>
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when a player boards the transport.
virtual void OnAddPassenger(Transport* /*transport*/, Player* /*player*/) { }
@@ -673,7 +673,7 @@ class AchievementCriteriaScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return true; }
bool IsDatabaseBound() const final override { return true; }
// Called when an additional criteria is checked.
virtual bool OnCheck(Player* source, Unit* target) = 0;
@@ -805,7 +805,7 @@ class GuildScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return false; }
bool IsDatabaseBound() const final override { return false; }
// Called when a member is added to the guild.
virtual void OnAddMember(Guild* /*guild*/, Player* /*player*/, uint8& /*plRank*/) { }
@@ -848,7 +848,7 @@ class GroupScript : public ScriptObject
public:
bool IsDatabaseBound() const final { return false; }
bool IsDatabaseBound() const final override { return false; }
// Called when a member is added to a group.
virtual void OnAddMember(Group* /*group*/, uint64 /*guid*/) { }

View File

@@ -153,9 +153,9 @@ public:
explicit MapSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
~MapSessionFilter() { }
virtual bool Process(WorldPacket* packet);
virtual bool Process(WorldPacket* packet) override;
//in Map::Update() we do not process player logout!
virtual bool ProcessLogout() const { return false; }
virtual bool ProcessLogout() const override { return false; }
};
//class used to filer only thread-unsafe packets from queue
@@ -166,7 +166,7 @@ public:
explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
~WorldSessionFilter() { }
virtual bool Process(WorldPacket* packet);
virtual bool Process(WorldPacket* packet) override;
};
// Proxy structure to contain data passed to callback function,

View File

@@ -274,12 +274,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; }
@@ -295,8 +295,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

@@ -752,9 +752,9 @@ class SpellEvent : public BasicEvent
SpellEvent(Spell* spell);
virtual ~SpellEvent();
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
virtual bool IsDeletable() const;
virtual bool Execute(uint64 e_time, uint32 p_time) override;
virtual void Abort(uint64 e_time) override;
virtual bool IsDeletable() const override;
protected:
Spell* m_Spell;
};

View File

@@ -187,7 +187,7 @@ class SpellScript : public _SpellScript
public:
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
std::string ToString();
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
void Call(SpellScript* spellScript, SpellEffIndex effIndex);
private:
SpellEffectFnType pEffectHandlerScript;
@@ -206,7 +206,7 @@ class SpellScript : public _SpellScript
{
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:
@@ -253,7 +253,7 @@ class SpellScript : public _SpellScript
#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)) != 0; }
@@ -509,7 +509,7 @@ class AuraScript : public _SpellScript
public:
EffectBase(uint8 _effIndex, uint16 _effName);
std::string ToString();
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
};
class EffectPeriodicHandler : public EffectBase
{
@@ -630,7 +630,7 @@ class AuraScript : public _SpellScript
public:
AuraScript() : _SpellScript(), m_aura(NULL), m_auraApplication(NULL), 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 = NULL);
void _FinishScriptCall();

View File

@@ -34,13 +34,13 @@ class WardenMac : public Warden
WardenMac();
~WardenMac();
void Init(WorldSession* session, BigNumber* k);
ClientWardenModule* GetModuleForClient();
void InitializeModule();
void RequestHash();
void HandleHashResult(ByteBuffer& buff);
void RequestData();
void HandleData(ByteBuffer& buff);
void Init(WorldSession* session, BigNumber* k) override;
ClientWardenModule* GetModuleForClient() override;
void InitializeModule() override;
void RequestHash() override;
void HandleHashResult(ByteBuffer& buff) override;
void RequestData() override;
void HandleData(ByteBuffer& buff) override;
};
#endif

View File

@@ -76,13 +76,13 @@ class WardenWin : public Warden
WardenWin();
~WardenWin();
void Init(WorldSession* session, BigNumber* K);
ClientWardenModule* GetModuleForClient();
void InitializeModule();
void RequestHash();
void HandleHashResult(ByteBuffer &buff);
void RequestData();
void HandleData(ByteBuffer &buff);
void Init(WorldSession* session, BigNumber* K) override;
ClientWardenModule* GetModuleForClient() override;
void InitializeModule() override;
void RequestHash() override;
void HandleHashResult(ByteBuffer &buff) override;
void RequestData() override;
void HandleData(ByteBuffer &buff) override;
private:
uint32 _serverTicks;

View File

@@ -35,7 +35,7 @@
class PingOperation : public SQLOperation
{
//! Operation for idle delaythreads
bool Execute()
bool Execute() override
{
m_conn->Ping();
return true;

View File

@@ -29,7 +29,7 @@ class CharacterDatabaseConnection : public MySQLConnection
CharacterDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
void DoPrepareStatements() override;
};
typedef DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabaseWorkerPool;

View File

@@ -29,7 +29,7 @@ class LoginDatabaseConnection : public MySQLConnection
LoginDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
void DoPrepareStatements() override;
};
typedef DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabaseWorkerPool;

View File

@@ -29,7 +29,7 @@ class WorldDatabaseConnection : public MySQLConnection
WorldDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
void DoPrepareStatements() override;
};
typedef DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabaseWorkerPool;

View File

@@ -163,7 +163,7 @@ class PreparedStatementTask : public SQLOperation
PreparedStatementTask(PreparedStatement* stmt, bool async = false);
~PreparedStatementTask();
bool Execute();
bool Execute() override;
PreparedQueryResultFuture GetFuture() { return m_result->get_future(); }
protected:

View File

@@ -52,7 +52,7 @@ class SQLQueryHolderTask : public SQLOperation
SQLQueryHolderTask(SQLQueryHolder* holder)
: m_holder(holder) { };
bool Execute();
bool Execute() override;
QueryResultHolderFuture GetFuture() { return m_result.get_future(); }
};

View File

@@ -63,7 +63,7 @@ class TransactionTask : public SQLOperation
~TransactionTask(){ };
protected:
bool Execute();
bool Execute() override;
SQLTransaction m_trans;
};

View File

@@ -51,7 +51,7 @@ class AppenderConsole: public Appender
private:
void SetColor(bool stdout_stream, ColorTypes color);
void ResetColor(bool stdout_stream);
void _write(LogMessage const& message);
void _write(LogMessage const& message) override;
bool _colored;
ColorTypes _colors[MaxLogLevels];
};

View File

@@ -31,7 +31,7 @@ class AppenderDB: public Appender
private:
uint32 realmId;
bool enabled;
void _write(LogMessage const& message);
void _write(LogMessage const& message) override;
};
#endif

View File

@@ -30,7 +30,7 @@ class AppenderFile: public Appender
private:
void CloseFile();
void _write(LogMessage const& message);
void _write(LogMessage const& message) override;
FILE* logfile;
std::string filename;
std::string logDir;

View File

@@ -40,7 +40,7 @@ class ByteBufferException : public std::exception
public:
~ByteBufferException() throw() { }
char const* what() const throw() { return msg_.c_str(); }
char const* what() const throw() override { return msg_.c_str(); }
protected:
std::string & message() throw() { return msg_; }