fix(CORE): Missing override on various functions (#2602)
This commit is contained in:
@@ -432,11 +432,11 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
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();
|
||||
|
||||
@@ -447,7 +447,7 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
|
||||
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
|
||||
|
||||
void Update(uint32 time); // overwrited Unit::Update
|
||||
void Update(uint32 time) override; // overwrited Unit::Update
|
||||
void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
|
||||
|
||||
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
|
||||
@@ -457,8 +457,8 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
bool IsTrigger() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER; }
|
||||
bool IsGuard() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD; }
|
||||
bool CanWalk() const { return GetCreatureTemplate()->InhabitType & INHABIT_GROUND; }
|
||||
bool CanSwim() const { return (GetCreatureTemplate()->InhabitType & INHABIT_WATER) || IS_PLAYER_GUID(GetOwnerGUID()); }
|
||||
bool CanFly() const { return GetCreatureTemplate()->InhabitType & INHABIT_AIR; }
|
||||
bool CanSwim() const override { return (GetCreatureTemplate()->InhabitType & INHABIT_WATER) || IS_PLAYER_GUID(GetOwnerGUID()); }
|
||||
bool CanFly() const override { return GetCreatureTemplate()->InhabitType & INHABIT_AIR; }
|
||||
|
||||
void SetReactState(ReactStates st) { m_reactState = st; }
|
||||
ReactStates GetReactState() const { return m_reactState; }
|
||||
@@ -469,11 +469,11 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
|
||||
bool isCanTrainingAndResetTalentsOf(Player* player) const;
|
||||
bool CanCreatureAttack(Unit const* victim, bool skipDistCheck = false) const;
|
||||
bool IsImmunedToSpell(SpellInfo const* spellInfo);
|
||||
bool IsImmunedToSpell(SpellInfo const* spellInfo) override;
|
||||
|
||||
bool HasMechanicTemplateImmunity(uint32 mask) const;
|
||||
// redefine Unit::IsImmunedToSpell
|
||||
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
|
||||
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override;
|
||||
// redefine Unit::IsImmunedToSpellEffect
|
||||
bool isElite() const
|
||||
{
|
||||
@@ -496,7 +496,7 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
bool IsImmuneToKnockback() const;
|
||||
bool IsAvoidingAOE() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_AVOID_AOE; }
|
||||
|
||||
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); }
|
||||
|
||||
@@ -505,42 +505,42 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
|
||||
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 packetOnly = false);
|
||||
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, bool packetOnly = false) 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
|
||||
{
|
||||
return (getLevel()/2 + uint32(GetStat(STAT_STRENGTH)/20));
|
||||
}
|
||||
|
||||
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, uint32 end_time);
|
||||
virtual void AddSpellCooldown(uint32 spell_id, uint32 /*itemid*/, uint32 end_time, bool needSendToClient = false, bool forceSendToSpectator = false);
|
||||
virtual bool HasSpellCooldown(uint32 spell_id) const;
|
||||
virtual void AddSpellCooldown(uint32 spell_id, uint32 /*itemid*/, uint32 end_time, bool needSendToClient = false, bool forceSendToSpectator = false) override;
|
||||
virtual bool HasSpellCooldown(uint32 spell_id) const override;
|
||||
uint32 GetSpellCooldown(uint32 spell_id) const;
|
||||
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
|
||||
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
|
||||
bool IsSpellProhibited(SpellSchoolMask idSchoolMask) const;
|
||||
|
||||
bool HasSpell(uint32 spellID) const;
|
||||
bool HasSpell(uint32 spellID) const override;
|
||||
|
||||
bool UpdateEntry(uint32 entry, const CreatureData* data=NULL, bool changelevel=true );
|
||||
bool UpdateStats(Stats stat);
|
||||
bool UpdateAllStats();
|
||||
void UpdateResistances(uint32 school);
|
||||
void UpdateArmor();
|
||||
void UpdateMaxHealth();
|
||||
void UpdateMaxPower(Powers power);
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false);
|
||||
void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage);
|
||||
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);
|
||||
void SetCanDualWield(bool value) override;
|
||||
int8 GetOriginalEquipmentId() const { return m_originalEquipmentId; }
|
||||
uint8 GetCurrentEquipmentId() { return m_equipmentId; }
|
||||
void SetCurrentEquipmentId(uint8 id) { m_equipmentId = id; }
|
||||
@@ -562,9 +562,9 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
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, bool despawn = false); // override virtual Unit::setDeathState
|
||||
void setDeathState(DeathState s, bool despawn = false) override; // override virtual Unit::setDeathState
|
||||
|
||||
bool LoadFromDB(uint32 guid, Map* map) { return LoadCreatureFromDB(guid, map, false, true); }
|
||||
bool LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap = true, bool gridLoad = false);
|
||||
@@ -635,7 +635,7 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
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; }
|
||||
@@ -650,8 +650,8 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
|
||||
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 c) { m_regenHealth = c; }
|
||||
@@ -710,7 +710,7 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
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);
|
||||
|
||||
@@ -768,8 +768,8 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
|
||||
uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, 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);
|
||||
|
||||
Reference in New Issue
Block a user