diff options
| author | DDuarte <dnpd.dd@gmail.com> | 2014-08-09 20:17:40 +0100 |
|---|---|---|
| committer | DDuarte <dnpd.dd@gmail.com> | 2014-08-09 20:17:40 +0100 |
| commit | a394205eca86d2ea2a8539734df49432189bc73b (patch) | |
| tree | 124f8f2f15bd6961c91d7e042f941d3222ad50e9 /src/server/game/Entities/Creature | |
| parent | 272b9d3d16cda66abb951596c87eb655d196e354 (diff) | |
Core/Server: Add missing overrides
Diffstat (limited to 'src/server/game/Entities/Creature')
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.h | 76 | ||||
| -rw-r--r-- | src/server/game/Entities/Creature/TemporarySummon.h | 40 |
2 files changed, 58 insertions, 58 deletions
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 1154bc17d1f..ea4da5d5611 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -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; diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h index 1cee6361172..58cc6eb7d0b 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.h +++ b/src/server/game/Entities/Creature/TemporarySummon.h @@ -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; |
