mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[12070] Add some override correctness
This commit is contained in:
parent
835d1c7479
commit
8c93370a19
81 changed files with 513 additions and 510 deletions
|
|
@ -91,16 +91,16 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
|
|||
~ScriptedAI() {}
|
||||
|
||||
// Called at stopping attack by any attacker
|
||||
void EnterEvadeMode();
|
||||
void EnterEvadeMode() override;
|
||||
|
||||
// Is unit visible for MoveInLineOfSight
|
||||
bool IsVisible(Unit* who) const
|
||||
bool IsVisible(Unit* who) const override
|
||||
{
|
||||
return !who->HasStealthAura() && m_creature->IsWithinDist(who, VISIBLE_RANGE);
|
||||
}
|
||||
|
||||
// Called at World update tick
|
||||
void UpdateAI(const uint32);
|
||||
void UpdateAI(const uint32) override;
|
||||
|
||||
//= Some useful helpers =========================
|
||||
|
||||
|
|
|
|||
|
|
@ -28,21 +28,21 @@ class MANGOS_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, O
|
|||
{
|
||||
protected:
|
||||
|
||||
void targetObjectBuildLink()
|
||||
void targetObjectBuildLink() override
|
||||
{
|
||||
// called from link()
|
||||
this->getTarget()->insertFirst(this);
|
||||
this->getTarget()->incSize();
|
||||
}
|
||||
|
||||
void targetObjectDestroyLink()
|
||||
void targetObjectDestroyLink() override
|
||||
{
|
||||
// called from unlink()
|
||||
if (this->isValid())
|
||||
this->getTarget()->decSize();
|
||||
}
|
||||
|
||||
void sourceObjectDestroyLink()
|
||||
void sourceObjectDestroyLink() override
|
||||
{
|
||||
// called from invalidate()
|
||||
this->getTarget()->decSize();
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace MaNGOS
|
|||
}
|
||||
|
||||
// non-const remove method
|
||||
template<class SPECIFIC_TYPE> bool Remove(ContainerMapList<SPECIFIC_TYPE>& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl)
|
||||
template<class SPECIFIC_TYPE> bool Remove(ContainerMapList<SPECIFIC_TYPE>& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl) override
|
||||
{
|
||||
typename std::map<OBJECT_HANDLE, CountedPtr<SPECIFIC_TYPE> >::iterator iter = elements._element.find(hdl);
|
||||
if (iter != elements._element.end())
|
||||
|
|
@ -145,22 +145,22 @@ namespace MaNGOS
|
|||
return false; // found... terminate the search
|
||||
}
|
||||
|
||||
template<class SPECIFIC_TYPE> bool Remove(ContainerMapList<TypeNull>& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl)
|
||||
template<class SPECIFIC_TYPE> bool Remove(ContainerMapList<TypeNull>& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// this is a missed
|
||||
template<class SPECIFIC_TYPE, class T> bool Remove(ContainerMapList<T>& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl)
|
||||
template<class SPECIFIC_TYPE, class T> bool Remove(ContainerMapList<T>& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class SPECIFIC_TYPE, class T, class H> bool Remove(ContainerMapList<TypeList<H, T> >& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl)
|
||||
template<class SPECIFIC_TYPE, class T, class H> bool Remove(ContainerMapList<TypeList<H, T> >& elements, CountedPtr<SPECIFIC_TYPE>& obj, OBJECT_HANDLE hdl) override
|
||||
{
|
||||
// The head element is bad
|
||||
bool t = Remove(elements._elements, obj, hdl);
|
||||
return (!t ? Remove(elements._TailElements, obj, hdl) : t);
|
||||
bool t = Remove(elements._elements, obj, hdl) override;
|
||||
return (!t ? Remove(elements._TailElements, obj, hdl) : t) override;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ class MANGOS_DLL_DECL AggressorAI : public CreatureAI
|
|||
|
||||
explicit AggressorAI(Creature* c);
|
||||
|
||||
void MoveInLineOfSight(Unit*);
|
||||
void AttackStart(Unit*);
|
||||
void EnterEvadeMode();
|
||||
bool IsVisible(Unit*) const;
|
||||
void MoveInLineOfSight(Unit*) override;
|
||||
void AttackStart(Unit*) override;
|
||||
void EnterEvadeMode() override;
|
||||
bool IsVisible(Unit*) const override;
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
void UpdateAI(const uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -33,10 +33,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);
|
||||
|
|
@ -55,13 +55,13 @@ class Bag : public Item
|
|||
|
||||
// DB operations
|
||||
// overwrite virtual Item::SaveToDB
|
||||
void SaveToDB();
|
||||
void SaveToDB() override;
|
||||
// overwrite virtual Item::LoadFromDB
|
||||
bool LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid = ObjectGuid());
|
||||
bool LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid = ObjectGuid()) override;
|
||||
// overwrite virtual Item::DeleteFromDB
|
||||
void DeleteFromDB();
|
||||
void DeleteFromDB() override;
|
||||
|
||||
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
|
||||
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@ class BattleGroundAA : public BattleGround
|
|||
public:
|
||||
BattleGroundAA();
|
||||
~BattleGroundAA();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* Source, uint32 Trigger);
|
||||
bool SetupBattleGround();
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
|
||||
bool SetupBattleGround() override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -182,24 +182,24 @@ class BattleGroundAB : public BattleGround
|
|||
BattleGroundAB();
|
||||
~BattleGroundAB();
|
||||
|
||||
void Update(uint32 diff);
|
||||
void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
virtual bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
void EndBattleGround(Team winner);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
void Update(uint32 diff) override;
|
||||
void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
virtual bool SetupBattleGround() override;
|
||||
virtual void Reset() override;
|
||||
void EndBattleGround(Team winner) override;
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
|
||||
|
||||
/* Scorekeeping */
|
||||
virtual void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
virtual void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count);
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
|
||||
|
||||
/* Nodes occupying */
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
|
||||
|
||||
/* achievement req. */
|
||||
bool IsAllNodesControlledByTeam(Team team) const; // overwrited
|
||||
|
|
|
|||
|
|
@ -321,34 +321,34 @@ class BattleGroundAV : public BattleGround
|
|||
public:
|
||||
BattleGroundAV();
|
||||
~BattleGroundAV();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
// world states
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count);
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
virtual void Reset();
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
virtual void Reset() override;
|
||||
|
||||
/*general stuff*/
|
||||
void UpdateScore(BattleGroundTeamIndex teamIdx, int32 points);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
|
||||
/*handle stuff*/ // these are functions which get called from extern scripts
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
void HandleKillUnit(Creature* creature, Player* killer);
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
void HandleKillUnit(Creature* creature, Player* killer) override;
|
||||
void HandleQuestComplete(uint32 questid, Player* player);
|
||||
bool PlayerCanDoMineQuest(int32 GOId, Team team);
|
||||
|
||||
void EndBattleGround(Team winner);
|
||||
void EndBattleGround(Team winner) override;
|
||||
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* plr);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* plr) override;
|
||||
|
||||
static BattleGroundAVTeamIndex GetAVTeamIndexByTeamId(Team team) { return BattleGroundAVTeamIndex(GetTeamIndexByTeamId(team)); }
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -34,22 +34,22 @@ class BattleGroundBE : public BattleGround
|
|||
public:
|
||||
BattleGroundBE();
|
||||
~BattleGroundBE();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count);
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
bool HandlePlayerUnderMap(Player* plr);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
bool SetupBattleGround() override;
|
||||
virtual void Reset() override;
|
||||
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
bool HandlePlayerUnderMap(Player* plr) override;
|
||||
|
||||
/* Scorekeeping */
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@ class BattleGroundDS : public BattleGround
|
|||
public:
|
||||
BattleGroundDS();
|
||||
~BattleGroundDS();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
bool SetupBattleGround();
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
bool SetupBattleGround() override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -248,12 +248,12 @@ class BattleGroundEY : public BattleGround
|
|||
public:
|
||||
BattleGroundEY();
|
||||
~BattleGroundEY();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
/* BG Flags */
|
||||
ObjectGuid const& GetFlagPickerGuid() const { return m_FlagKeeper; }
|
||||
|
|
@ -264,29 +264,29 @@ class BattleGroundEY : public BattleGround
|
|||
void RespawnFlag(bool send_message);
|
||||
void RespawnFlagAfterDrop();
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
virtual bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
|
||||
virtual bool SetupBattleGround() override;
|
||||
virtual void Reset() override;
|
||||
void UpdateTeamScore(Team team);
|
||||
void EndBattleGround(Team winner);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count);
|
||||
void EndBattleGround(Team winner) override;
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
|
||||
void SetDroppedFlagGuid(ObjectGuid guid) { m_DroppedFlagGuid = guid;}
|
||||
void ClearDroppedFlagGuid() { m_DroppedFlagGuid.Clear();}
|
||||
ObjectGuid const& GetDroppedFlagGuid() const { return m_DroppedFlagGuid;}
|
||||
|
||||
/* Battleground Events */
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
|
||||
virtual void EventPlayerDroppedFlag(Player* source);
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
|
||||
virtual void EventPlayerDroppedFlag(Player* source) override;
|
||||
|
||||
/* achievement req. */
|
||||
bool IsAllNodesControlledByTeam(Team team) const;
|
||||
|
||||
private:
|
||||
void EventPlayerCapturedFlag(Player* source, BG_EY_Nodes node);
|
||||
void EventPlayerCapturedFlag(Player* source, BG_EY_Nodes node); // NOTE: virtual BattleGround::EventPlayerCapturedFlag has different parameters list
|
||||
void EventTeamCapturedPoint(Player* source, uint32 point);
|
||||
void EventTeamLostPoint(Player* source, uint32 point);
|
||||
void UpdatePointsCount(Team team);
|
||||
|
|
|
|||
|
|
@ -35,19 +35,19 @@ class BattleGroundIC : public BattleGround
|
|||
public:
|
||||
BattleGroundIC();
|
||||
~BattleGroundIC();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
// bool SetupBattleGround();
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
// bool SetupBattleGround() override;
|
||||
|
||||
/* Scorekeeping */
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
|
|||
|
|
@ -150,8 +150,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:
|
||||
ObjectGuid m_PlayerGuid;
|
||||
uint32 m_BgInstanceGUID;
|
||||
|
|
@ -174,8 +174,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:
|
||||
ObjectGuid m_PlayerGuid;
|
||||
uint32 m_BgInstanceGUID;
|
||||
|
|
|
|||
|
|
@ -35,19 +35,19 @@ class BattleGroundNA : public BattleGround
|
|||
public:
|
||||
BattleGroundNA();
|
||||
~BattleGroundNA();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count);
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
bool HandlePlayerUnderMap(Player* plr);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
bool SetupBattleGround() override;
|
||||
virtual void Reset() override;
|
||||
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
bool HandlePlayerUnderMap(Player* plr) override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,19 +35,19 @@ class BattleGroundRB : public BattleGround
|
|||
public:
|
||||
BattleGroundRB();
|
||||
~BattleGroundRB();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
// bool SetupBattleGround();
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
// bool SetupBattleGround() override;
|
||||
|
||||
/* Scorekeeping */
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,19 +35,19 @@ class BattleGroundRL : public BattleGround
|
|||
public:
|
||||
BattleGroundRL();
|
||||
~BattleGroundRL();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void Reset();
|
||||
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void Reset() override;
|
||||
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
bool SetupBattleGround();
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
bool HandlePlayerUnderMap(Player* plr);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
bool SetupBattleGround() override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
bool HandlePlayerUnderMap(Player* plr) override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@ class BattleGroundRV : public BattleGround
|
|||
public:
|
||||
BattleGroundRV();
|
||||
~BattleGroundRV();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
bool SetupBattleGround();
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
bool SetupBattleGround() override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,19 +38,19 @@ class BattleGroundSA : public BattleGround
|
|||
public:
|
||||
BattleGroundSA();
|
||||
~BattleGroundSA();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
// bool SetupBattleGround();
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
// bool SetupBattleGround() override;
|
||||
|
||||
/* Scorekeeping */
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
|
|||
|
|
@ -102,12 +102,12 @@ class BattleGroundWS : public BattleGround
|
|||
/* Construction */
|
||||
BattleGroundWS();
|
||||
~BattleGroundWS();
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player* plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual void AddPlayer(Player* plr) override;
|
||||
virtual void StartingEventCloseDoors() override;
|
||||
virtual void StartingEventOpenDoors() override;
|
||||
|
||||
/* BG Flags */
|
||||
ObjectGuid GetAllianceFlagPickerGuid() const { return m_FlagKeepers[BG_TEAM_ALLIANCE]; }
|
||||
|
|
@ -123,26 +123,26 @@ class BattleGroundWS : public BattleGround
|
|||
uint8 GetFlagState(Team team) { return m_FlagState[GetTeamIndexByTeamId(team)]; }
|
||||
|
||||
/* Battleground Events */
|
||||
virtual void EventPlayerDroppedFlag(Player* source);
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
|
||||
virtual void EventPlayerCapturedFlag(Player* source);
|
||||
virtual void EventPlayerDroppedFlag(Player* source) override;
|
||||
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
|
||||
virtual void EventPlayerCapturedFlag(Player* source) override;
|
||||
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid);
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger);
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
void EndBattleGround(Team winner);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
void RemovePlayer(Player* plr, ObjectGuid guid) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger) override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
bool SetupBattleGround() override;
|
||||
virtual void Reset() override;
|
||||
void EndBattleGround(Team winner) override;
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
|
||||
uint32 GetRemainingTimeInMinutes() { return m_EndTimer ? (m_EndTimer - 1) / (MINUTE * IN_MILLISECONDS) + 1 : 0; }
|
||||
|
||||
void UpdateFlagState(Team team, uint32 value);
|
||||
void UpdateTeamScore(Team team);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value);
|
||||
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
|
||||
void SetDroppedFlagGuid(ObjectGuid guid, Team team) { m_DroppedFlagGuid[GetTeamIndexByTeamId(team)] = guid;}
|
||||
void ClearDroppedFlagGuid(Team team) { m_DroppedFlagGuid[GetTeamIndexByTeamId(team)].Clear();}
|
||||
ObjectGuid const& GetDroppedFlagGuid(Team team) const { return m_DroppedFlagGuid[GetTeamIndexByTeamId(team)];}
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count);
|
||||
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
|
||||
|
||||
/* Scorekeeping */
|
||||
uint32 GetTeamScore(Team team) const { return m_TeamScores[GetTeamIndexByTeamId(team)]; }
|
||||
|
|
|
|||
|
|
@ -720,15 +720,15 @@ class CliHandler : public ChatHandler
|
|||
: m_accountId(accountId), m_loginAccessLevel(accessLevel), m_callbackArg(callbackArg), m_print(zprint) {}
|
||||
|
||||
// overwrite functions
|
||||
const char* GetMangosString(int32 entry) const;
|
||||
uint32 GetAccountId() const;
|
||||
AccountTypes GetAccessLevel() const;
|
||||
bool isAvailable(ChatCommand const& cmd) const;
|
||||
void SendSysMessage(const char* str);
|
||||
std::string GetNameLink() const;
|
||||
bool needReportToTarget(Player* chr) const;
|
||||
LocaleConstant GetSessionDbcLocale() const;
|
||||
int GetSessionDbLocaleIndex() const;
|
||||
const char* GetMangosString(int32 entry) const override;
|
||||
uint32 GetAccountId() const override;
|
||||
AccountTypes GetAccessLevel() const override;
|
||||
bool isAvailable(ChatCommand const& cmd) const override;
|
||||
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:
|
||||
uint32 m_accountId;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ class Corpse : public WorldObject
|
|||
explicit Corpse(CorpseType type = CORPSE_BONES);
|
||||
~Corpse();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
bool Create(uint32 guidlow);
|
||||
bool Create(uint32 guidlow, Player* owner);
|
||||
|
|
@ -71,13 +71,13 @@ class Corpse : public WorldObject
|
|||
void ResetGhostTime() { m_time = time(NULL); }
|
||||
CorpseType GetType() const { return m_type; }
|
||||
|
||||
bool IsHostileTo(Unit const* unit) const;
|
||||
bool IsFriendlyTo(Unit const* unit) const;
|
||||
bool IsHostileTo(Unit const* unit) const override;
|
||||
bool IsFriendlyTo(Unit const* unit) const override;
|
||||
|
||||
GridPair const& GetGrid() const { return m_grid; }
|
||||
void SetGrid(GridPair const& grid) { m_grid = grid; }
|
||||
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const;
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const override;
|
||||
|
||||
Loot loot; // remove insignia ONLY at BG
|
||||
Player* lootRecipient;
|
||||
|
|
|
|||
|
|
@ -447,8 +447,8 @@ enum TemporaryFactionFlags // Used at real fact
|
|||
{
|
||||
TEMPFACTION_NONE = 0x00, // When no flag is used in temporary faction change, faction will be persistent. It will then require manual change back to default/another faction when changed once
|
||||
TEMPFACTION_RESTORE_RESPAWN = 0x01, // Default faction will be restored at respawn
|
||||
TEMPFACTION_RESTORE_COMBAT_STOP = 0x02, // ... at CombatStop() (happens at creature death, at evade or custom scripte among others)
|
||||
TEMPFACTION_RESTORE_REACH_HOME = 0x04, // ... at reaching home in home movement (evade), if not already done at CombatStop()
|
||||
TEMPFACTION_RESTORE_COMBAT_STOP = 0x02, // ... at CombatStop() (happens at creature death, at evade or custom scripte among others) override
|
||||
TEMPFACTION_RESTORE_REACH_HOME = 0x04, // ... at reaching home in home movement (evade), if not already done at CombatStop() override
|
||||
TEMPFACTION_ALL,
|
||||
};
|
||||
|
||||
|
|
@ -461,8 +461,8 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
explicit Creature(CreatureSubtype subtype = CREATURE_SUBTYPE_GENERIC);
|
||||
virtual ~Creature();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
bool Create(uint32 guidlow, CreatureCreatePos& cPos, CreatureInfo const* cinfo, Team team = TEAM_NONE, const CreatureData* data = NULL, GameEventCreatureData const* eventData = NULL);
|
||||
bool LoadCreatureAddon(bool reload);
|
||||
|
|
@ -502,9 +502,9 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
bool IsOutOfThreatArea(Unit* pVictim) const;
|
||||
void FillGuidsListFromThreatList(GuidVector& guids, uint32 maxamount = 0);
|
||||
|
||||
bool IsImmuneToSpell(SpellEntry const* spellInfo);
|
||||
bool IsImmuneToSpell(SpellEntry const* spellInfo) override;
|
||||
// redefine Unit::IsImmuneToSpell
|
||||
bool IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const;
|
||||
bool IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const override;
|
||||
// redefine Unit::IsImmuneToSpellEffect
|
||||
bool IsElite() const
|
||||
{
|
||||
|
|
@ -523,7 +523,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
return GetCreatureInfo()->rank == CREATURE_ELITE_WORLDBOSS;
|
||||
}
|
||||
|
||||
uint32 GetLevelForTarget(Unit const* target) const; // overwrite Unit::GetLevelForTarget for boss level support
|
||||
uint32 GetLevelForTarget(Unit const* target) const override; // overwrite Unit::GetLevelForTarget for boss level support
|
||||
|
||||
uint8 getRace() const override;
|
||||
|
||||
|
|
@ -536,12 +536,12 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
void SetWalk(bool enable);
|
||||
void SetLevitate(bool enable);
|
||||
|
||||
uint32 GetShieldBlockValue() const // dunno mob block value
|
||||
uint32 GetShieldBlockValue() const override // dunno mob block value
|
||||
{
|
||||
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, time_t end_time);
|
||||
|
|
@ -550,19 +550,19 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
bool HasSpellCooldown(uint32 spell_id) const;
|
||||
bool HasCategoryCooldown(uint32 spell_id) const;
|
||||
|
||||
bool HasSpell(uint32 spellID) const;
|
||||
bool HasSpell(uint32 spellID) const override;
|
||||
|
||||
bool UpdateEntry(uint32 entry, Team team = ALLIANCE, const CreatureData* data = NULL, GameEventCreatureData const* eventData = NULL, bool preserveHPAndPower = true);
|
||||
|
||||
void ApplyGameEventSpells(GameEventCreatureData const* eventData, bool activated);
|
||||
bool UpdateStats(Stats stat);
|
||||
bool UpdateAllStats();
|
||||
void UpdateResistances(uint32 school);
|
||||
void UpdateArmor();
|
||||
void UpdateMaxHealth();
|
||||
void UpdateMaxPower(Powers power);
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false);
|
||||
void UpdateDamagePhysical(WeaponAttackType attType);
|
||||
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;
|
||||
uint32 GetCurrentEquipmentId() { return m_equipmentId; }
|
||||
float GetSpellDamageMod(int32 Rank);
|
||||
|
||||
|
|
@ -584,9 +584,9 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
uint32 GetScriptId() const;
|
||||
|
||||
// overwrite WorldObject function for proper name localization
|
||||
const char* GetNameForLocaleIdx(int32 locale_idx) const;
|
||||
const char* GetNameForLocaleIdx(int32 locale_idx) const override;
|
||||
|
||||
void SetDeathState(DeathState s); // overwrite virtual Unit::SetDeathState
|
||||
void SetDeathState(DeathState s) override; // overwrite virtual Unit::SetDeathState
|
||||
|
||||
bool LoadFromDB(uint32 guid, Map* map);
|
||||
void SaveToDB();
|
||||
|
|
@ -638,7 +638,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
Cell const& GetCurrentCell() const { return m_currentCell; }
|
||||
void SetCurrentCell(Cell const& cell) { m_currentCell = cell; }
|
||||
|
||||
bool IsVisibleInGridForPlayer(Player* pl) const;
|
||||
bool IsVisibleInGridForPlayer(Player* pl) const override;
|
||||
|
||||
void RemoveCorpse();
|
||||
bool IsDeadByDefault() const { return m_isDeadByDefault; };
|
||||
|
|
@ -649,7 +649,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
time_t GetRespawnTimeEx() const;
|
||||
void SetRespawnTime(uint32 respawn) { m_respawnTime = respawn ? time(NULL) + respawn : 0; }
|
||||
void Respawn();
|
||||
void SaveRespawnTime();
|
||||
void SaveRespawnTime() override;
|
||||
|
||||
uint32 GetRespawnDelay() const { return m_respawnDelay; }
|
||||
void SetRespawnDelay(uint32 delay) { m_respawnDelay = delay; }
|
||||
|
|
@ -661,7 +661,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
static void AddToRemoveListInMaps(uint32 db_guid, CreatureData const* data);
|
||||
static void SpawnInMaps(uint32 db_guid, CreatureData const* data);
|
||||
|
||||
void StartGroupLoot(Group* group, uint32 timer);
|
||||
void StartGroupLoot(Group* group, uint32 timer) override;
|
||||
|
||||
void SendZoneUnderAttackMessage(Player* attacker);
|
||||
|
||||
|
|
@ -670,8 +670,8 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
Unit* SelectAttackingTarget(AttackingTarget target, uint32 position, uint32 uiSpellEntry, uint32 selectFlags = 0) const;
|
||||
Unit* SelectAttackingTarget(AttackingTarget target, uint32 position, SpellEntry const* pSpellInfo = NULL, uint32 selectFlags = 0) const;
|
||||
|
||||
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;
|
||||
|
||||
GridReference<Creature>& GetGridRef() { return m_gridRef; }
|
||||
bool IsRegeneratingHealth() { return m_regenHealth; }
|
||||
|
|
@ -708,7 +708,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
|
||||
uint32 m_groupLootTimer; // (msecs)timer used for group loot
|
||||
uint32 m_groupLootId; // used to find group which is looting corpse
|
||||
void StopGroupLoot();
|
||||
void StopGroupLoot() override;
|
||||
|
||||
// vendor items
|
||||
VendorItemCounts m_vendorItemCounts;
|
||||
|
|
@ -763,7 +763,7 @@ class AssistDelayEvent : public BasicEvent
|
|||
public:
|
||||
AssistDelayEvent(ObjectGuid victim, Unit& owner, std::list<Creature*> const& assistants);
|
||||
|
||||
bool Execute(uint64 e_time, uint32 p_time);
|
||||
bool Execute(uint64 e_time, uint32 p_time) override;
|
||||
private:
|
||||
AssistDelayEvent();
|
||||
|
||||
|
|
@ -776,7 +776,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;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class MANGOS_DLL_SPEC CreatureAI
|
|||
///== Reactions At =================================
|
||||
|
||||
/**
|
||||
* Called if IsVisible(Unit* pWho) is true at each (relative) pWho move, reaction at visibility zone enter
|
||||
* Called if IsVisible(Unit* pWho) is true at each (relative) override pWho move, reaction at visibility zone enter
|
||||
* Note: The Unit* pWho can be out of Line of Sight, usually this is only visibiliy (by state) and range dependendend
|
||||
* Note: This function is not called for creatures who are in evade mode
|
||||
* @param pWho Unit* who moved in the visibility range and is visisble
|
||||
|
|
@ -280,7 +280,7 @@ 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); }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
|
||||
namespace AIRegistry
|
||||
{
|
||||
void Initialize(void);
|
||||
void Initialize(void) override;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -582,25 +582,25 @@ class MANGOS_DLL_SPEC CreatureEventAI : public CreatureAI
|
|||
m_CreatureEventAIList.clear();
|
||||
}
|
||||
|
||||
void GetAIInformation(ChatHandler& reader);
|
||||
void GetAIInformation(ChatHandler& reader) override;
|
||||
|
||||
void JustRespawned();
|
||||
void JustRespawned() override;
|
||||
void Reset();
|
||||
void JustReachedHome();
|
||||
void EnterCombat(Unit* enemy);
|
||||
void EnterEvadeMode();
|
||||
void JustDied(Unit* killer);
|
||||
void KilledUnit(Unit* victim);
|
||||
void JustSummoned(Creature* pUnit);
|
||||
void AttackStart(Unit* who);
|
||||
void MoveInLineOfSight(Unit* who);
|
||||
void SpellHit(Unit* pUnit, const SpellEntry* pSpell);
|
||||
void DamageTaken(Unit* done_by, uint32& damage);
|
||||
void UpdateAI(const uint32 diff);
|
||||
bool IsVisible(Unit*) const;
|
||||
void ReceiveEmote(Player* pPlayer, uint32 text_emote);
|
||||
void SummonedCreatureJustDied(Creature* unit);
|
||||
void SummonedCreatureDespawn(Creature* unit);
|
||||
void JustReachedHome() override;
|
||||
void EnterCombat(Unit* enemy) override;
|
||||
void EnterEvadeMode() override;
|
||||
void JustDied(Unit* killer) override;
|
||||
void KilledUnit(Unit* victim) override;
|
||||
void JustSummoned(Creature* pUnit) override;
|
||||
void AttackStart(Unit* who) override;
|
||||
void MoveInLineOfSight(Unit* who) override;
|
||||
void SpellHit(Unit* pUnit, const SpellEntry* pSpell) override;
|
||||
void DamageTaken(Unit* done_by, uint32& damage) override;
|
||||
void UpdateAI(const uint32 diff) override;
|
||||
bool IsVisible(Unit*) const override;
|
||||
void ReceiveEmote(Player* pPlayer, uint32 text_emote) override;
|
||||
void SummonedCreatureJustDied(Creature* unit) override;
|
||||
void SummonedCreatureDespawn(Creature* unit) override;
|
||||
|
||||
static int Permissible(const Creature*);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ class DynamicObject : public WorldObject
|
|||
public:
|
||||
explicit DynamicObject();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
bool Create(uint32 guidlow, Unit* caster, uint32 spellId, SpellEffectIndex effIndex, float x, float y, float z, int32 duration, float radius, DynamicObjectType type);
|
||||
void Update(uint32 update_diff, uint32 p_time) override;
|
||||
|
|
@ -55,15 +55,15 @@ class DynamicObject : public WorldObject
|
|||
void RemoveAffected(Unit* unit) { m_affected.erase(unit->GetObjectGuid()); }
|
||||
void Delay(int32 delaytime);
|
||||
|
||||
bool IsHostileTo(Unit const* unit) const;
|
||||
bool IsFriendlyTo(Unit const* unit) const;
|
||||
bool IsHostileTo(Unit const* unit) const override;
|
||||
bool IsFriendlyTo(Unit const* unit) const override;
|
||||
|
||||
float GetObjectBoundingRadius() const // overwrite WorldObject version
|
||||
float GetObjectBoundingRadius() const override // overwrite WorldObject version
|
||||
{
|
||||
return 0.0f; // dynamic object not have real interact size
|
||||
}
|
||||
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const;
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const override;
|
||||
|
||||
GridReference<DynamicObject>& GetGridRef() { return m_gridRef; }
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class MANGOS_DLL_SPEC FleeingMovementGenerator
|
|||
void Reset(T&);
|
||||
bool Update(T&, const uint32&);
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return FLEEING_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return FLEEING_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
void _setTargetLocation(T& owner);
|
||||
|
|
@ -53,9 +53,9 @@ class MANGOS_DLL_SPEC TimedFleeingMovementGenerator
|
|||
FleeingMovementGenerator<Creature>(fright),
|
||||
i_totalFleeTime(time) {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return TIMED_FLEEING_MOTION_TYPE; }
|
||||
bool Update(Unit&, const uint32&);
|
||||
void Finalize(Unit&);
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return TIMED_FLEEING_MOTION_TYPE; }
|
||||
bool Update(Unit&, const uint32&) override;
|
||||
void Finalize(Unit&) override;
|
||||
|
||||
private:
|
||||
TimeTracker i_totalFleeTime;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ class Unit;
|
|||
class MANGOS_DLL_SPEC FollowerReference : public Reference<Unit, TargetedMovementGeneratorBase>
|
||||
{
|
||||
protected:
|
||||
void targetObjectBuildLink();
|
||||
void targetObjectDestroyLink();
|
||||
void sourceObjectDestroyLink();
|
||||
void targetObjectBuildLink() override;
|
||||
void targetObjectDestroyLink() override;
|
||||
void sourceObjectDestroyLink() override;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -630,8 +630,8 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
explicit GameObject();
|
||||
~GameObject();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang,
|
||||
QuaternionData rotation = QuaternionData(), uint8 animprogress = GO_ANIMPROGRESS_DEFAULT, GOState go_state = GO_STATE_READY);
|
||||
|
|
@ -649,7 +649,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
int64 GetPackedWorldRotation() const { return m_packedRotation; }
|
||||
|
||||
// overwrite WorldObject function for proper name localization
|
||||
const char* GetNameForLocaleIdx(int32 locale_idx) const;
|
||||
const char* GetNameForLocaleIdx(int32 locale_idx) const override;
|
||||
|
||||
void SaveToDB();
|
||||
void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask);
|
||||
|
|
@ -713,7 +713,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); }
|
||||
void SetDisplayId(uint32 modelId);
|
||||
|
||||
float GetObjectBoundingRadius() const; // overwrite WorldObject version
|
||||
float GetObjectBoundingRadius() const override; // overwrite WorldObject version
|
||||
|
||||
void Use(Unit* user);
|
||||
|
||||
|
|
@ -737,12 +737,12 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
uint32 GetUseCount() const { return m_useTimes; }
|
||||
uint32 GetUniqueUseCount() const { return m_UniqueUsers.size(); }
|
||||
|
||||
void SaveRespawnTime();
|
||||
void SaveRespawnTime() override;
|
||||
|
||||
// Loot System
|
||||
Loot loot;
|
||||
void getFishLoot(Loot* loot, Player* loot_owner);
|
||||
void StartGroupLoot(Group* group, uint32 timer);
|
||||
void StartGroupLoot(Group* group, uint32 timer) override;
|
||||
|
||||
ObjectGuid GetLootRecipientGuid() const { return m_lootRecipientGuid; }
|
||||
uint32 GetLootGroupRecipientId() const { return m_lootGroupRecipientId; }
|
||||
|
|
@ -753,20 +753,20 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
void SetLootRecipient(Unit* pUnit);
|
||||
Player* GetOriginalLootRecipient() const; // ignore group changes/etc, not for 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* pTarget) const;
|
||||
void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false);
|
||||
// 0 = use `gameobject`.`spawntimesecs`
|
||||
void ResetDoorOrButton();
|
||||
|
||||
bool IsHostileTo(Unit const* unit) const;
|
||||
bool IsFriendlyTo(Unit const* unit) const;
|
||||
bool IsHostileTo(Unit const* unit) const override;
|
||||
bool IsFriendlyTo(Unit const* unit) const override;
|
||||
|
||||
void SummonLinkedTrapIfAny();
|
||||
void TriggerLinkedGameObject(Unit* target);
|
||||
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const;
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const override;
|
||||
|
||||
GameObject* LookupFishingHoleAround(float range);
|
||||
|
||||
|
|
@ -803,7 +803,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
// Loot System
|
||||
uint32 m_groupLootTimer; // (msecs)timer used for group loot
|
||||
uint32 m_groupLootId; // used to find group which is looting
|
||||
void StopGroupLoot();
|
||||
void StopGroupLoot() override;
|
||||
ObjectGuid m_lootRecipientGuid; // player who will have rights for looting if m_lootGroupRecipient==0 or group disbanded
|
||||
uint32 m_lootGroupRecipientId; // group who will have rights for looting if set and exist
|
||||
|
||||
|
|
|
|||
|
|
@ -32,28 +32,28 @@ class MANGOS_DLL_DECL InvalidState : public GridState
|
|||
{
|
||||
public:
|
||||
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const;
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const override;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_DECL ActiveState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const;
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const override;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_DECL IdleState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const;
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const override;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_DECL RemovalState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const;
|
||||
void Update(Map&, NGridType&, GridInfo&, const uint32& x, const uint32& y, const uint32& t_diff) const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class Roll : public LootValidatorRef
|
|||
~Roll() { }
|
||||
void setLoot(Loot* pLoot) { link(pLoot, this); }
|
||||
Loot* getLoot() { return getTarget(); }
|
||||
void targetObjectBuildLink();
|
||||
void targetObjectBuildLink() override;
|
||||
|
||||
void CalculateCommonVoteMask(uint32 max_enchanting_skill);
|
||||
RollVoteMask GetVoteMaskFor(Player* player) const;
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ class MANGOS_DLL_SPEC 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(); }
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ class MANGOS_DLL_DECL GuardAI : public CreatureAI
|
|||
|
||||
explicit GuardAI(Creature* c);
|
||||
|
||||
void MoveInLineOfSight(Unit*);
|
||||
void AttackStart(Unit*);
|
||||
void EnterEvadeMode();
|
||||
void JustDied(Unit*);
|
||||
bool IsVisible(Unit*) const;
|
||||
void MoveInLineOfSight(Unit*) override;
|
||||
void AttackStart(Unit*) override;
|
||||
void EnterEvadeMode() override;
|
||||
void JustDied(Unit*) override;
|
||||
bool IsVisible(Unit*) const override;
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
void UpdateAI(const uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class MANGOS_DLL_SPEC HomeMovementGenerator<Creature>
|
|||
void Interrupt(Creature&) {}
|
||||
void Reset(Creature&);
|
||||
bool Update(Creature&, const uint32&);
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return HOME_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return HOME_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
void _setTargetLocation(Creature&);
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ class MANGOS_DLL_SPEC IdleMovementGenerator : public MovementGenerator
|
|||
{
|
||||
public:
|
||||
|
||||
void Initialize(Unit&) {}
|
||||
void Finalize(Unit&) {}
|
||||
void Interrupt(Unit&) {}
|
||||
void Reset(Unit&);
|
||||
bool Update(Unit&, const uint32&) { return true; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return IDLE_MOTION_TYPE; }
|
||||
void Initialize(Unit&) override {}
|
||||
void Finalize(Unit&) override {}
|
||||
void Interrupt(Unit&) override {}
|
||||
void Reset(Unit&) override;
|
||||
bool Update(Unit&, const uint32&) override { return true; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return IDLE_MOTION_TYPE; }
|
||||
};
|
||||
|
||||
extern IdleMovementGenerator si_idleMovement;
|
||||
|
|
@ -40,12 +40,12 @@ class MANGOS_DLL_SPEC DistractMovementGenerator : public MovementGenerator
|
|||
public:
|
||||
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {}
|
||||
|
||||
void Initialize(Unit& owner);
|
||||
void Finalize(Unit& owner);
|
||||
void Interrupt(Unit&);
|
||||
void Reset(Unit&);
|
||||
bool Update(Unit& owner, const uint32& time_diff);
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return DISTRACT_MOTION_TYPE; }
|
||||
void Initialize(Unit& owner) override;
|
||||
void Finalize(Unit& owner) override;
|
||||
void Interrupt(Unit&) override;
|
||||
void Reset(Unit&) override;
|
||||
bool Update(Unit& owner, const uint32& time_diff) override;
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return DISTRACT_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
uint32 m_timer;
|
||||
|
|
@ -57,8 +57,8 @@ class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovem
|
|||
AssistanceDistractMovementGenerator(uint32 timer) :
|
||||
DistractMovementGenerator(timer) {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
|
||||
void Finalize(Unit& unit);
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
|
||||
void Finalize(Unit& unit) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -99,4 +99,5 @@ class MANGOS_DLL_SPEC InstanceData
|
|||
// This is used for such things are heroic loot
|
||||
virtual bool CheckConditionCriteriaMeet(Player const* source, uint32 map_id, uint32 instance_condition_id);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -374,14 +374,14 @@ class MANGOS_DLL_SPEC Item : public Object
|
|||
uState = state;
|
||||
}
|
||||
|
||||
bool HasQuest(uint32 quest_id) const { return GetProto()->StartQuest == quest_id; }
|
||||
bool HasInvolvedQuest(uint32 /*quest_id*/) const { return false; }
|
||||
bool HasQuest(uint32 quest_id) const override { return GetProto()->StartQuest == quest_id; }
|
||||
bool HasInvolvedQuest(uint32 /*quest_id*/) const override { return false; }
|
||||
bool IsPotion() const { return GetProto()->IsPotion(); }
|
||||
bool IsConjuredConsumable() const { return GetProto()->IsConjuredConsumable(); }
|
||||
|
||||
void AddToClientUpdateList();
|
||||
void RemoveFromClientUpdateList();
|
||||
void BuildUpdateData(UpdateDataMapType& update_players);
|
||||
void AddToClientUpdateList() override;
|
||||
void RemoveFromClientUpdateList() override;
|
||||
void BuildUpdateData(UpdateDataMapType& update_players) override;
|
||||
private:
|
||||
std::string m_text;
|
||||
uint8 m_slot;
|
||||
|
|
|
|||
|
|
@ -206,8 +206,8 @@ class LootValidatorRef : public Reference<Loot, LootValidatorRef>
|
|||
{
|
||||
public:
|
||||
LootValidatorRef() {}
|
||||
void targetObjectDestroyLink() {}
|
||||
void sourceObjectDestroyLink() {}
|
||||
void targetObjectDestroyLink() override {}
|
||||
void sourceObjectDestroyLink() override {}
|
||||
};
|
||||
|
||||
//=====================================================
|
||||
|
|
|
|||
|
|
@ -378,20 +378,20 @@ class MANGOS_DLL_SPEC DungeonMap : public Map
|
|||
public:
|
||||
DungeonMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode);
|
||||
~DungeonMap();
|
||||
bool Add(Player*);
|
||||
void Remove(Player*, bool);
|
||||
void Update(const uint32&);
|
||||
bool Add(Player*) override;
|
||||
void Remove(Player*, bool) override;
|
||||
void Update(const uint32&) override;
|
||||
bool Reset(InstanceResetMethod method);
|
||||
void PermBindAllPlayers(Player* player);
|
||||
void UnloadAll(bool pForce);
|
||||
bool CanEnter(Player* player);
|
||||
void UnloadAll(bool pForce) override;
|
||||
bool CanEnter(Player* player) override;
|
||||
void SendResetWarnings(uint32 timeLeft) const;
|
||||
void SetResetSchedule(bool on);
|
||||
|
||||
// can't be NULL for loaded map
|
||||
DungeonPersistentState* GetPersistanceState() const;
|
||||
|
||||
virtual void InitVisibilityDistance();
|
||||
virtual void InitVisibilityDistance() override;
|
||||
private:
|
||||
bool m_resetAfterUnload;
|
||||
bool m_unloadWhenEmpty;
|
||||
|
|
@ -405,14 +405,14 @@ class MANGOS_DLL_SPEC BattleGroundMap : public Map
|
|||
BattleGroundMap(uint32 id, time_t, uint32 InstanceId, uint8 spawnMode);
|
||||
~BattleGroundMap();
|
||||
|
||||
void Update(const uint32&);
|
||||
bool Add(Player*);
|
||||
void Remove(Player*, bool);
|
||||
bool CanEnter(Player* player);
|
||||
void Update(const uint32&) override;
|
||||
bool Add(Player*) override;
|
||||
void Remove(Player*, bool) override;
|
||||
bool CanEnter(Player* player) override;
|
||||
void SetUnload();
|
||||
void UnloadAll(bool pForce);
|
||||
void UnloadAll(bool pForce) override;
|
||||
|
||||
virtual void InitVisibilityDistance();
|
||||
virtual void InitVisibilityDistance() override;
|
||||
BattleGround* GetBG() { return m_bg; }
|
||||
void SetBG(BattleGround* bg) { m_bg = bg; }
|
||||
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ class WorldPersistentState : public MapPersistentState
|
|||
|
||||
~WorldPersistentState() {}
|
||||
|
||||
SpawnedPoolData& GetSpawnedPoolData() { return m_sharedSpawnedPoolData; }
|
||||
SpawnedPoolData& GetSpawnedPoolData() override { return m_sharedSpawnedPoolData; }
|
||||
protected:
|
||||
bool CanBeUnload() const; // overwrite MapPersistentState::CanBeUnload
|
||||
bool CanBeUnload() const override; // overwrite MapPersistentState::CanBeUnload
|
||||
|
||||
private:
|
||||
static SpawnedPoolData m_sharedSpawnedPoolData; // Pools spawns state for map, shared by all non-instanced maps
|
||||
|
|
@ -184,7 +184,7 @@ class DungeonPersistentState : public MapPersistentState
|
|||
|
||||
~DungeonPersistentState();
|
||||
|
||||
SpawnedPoolData& GetSpawnedPoolData() { return m_spawnedPoolData; }
|
||||
SpawnedPoolData& GetSpawnedPoolData() override { return m_spawnedPoolData; }
|
||||
|
||||
InstanceTemplate const* GetTemplate() const;
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ class DungeonPersistentState : public MapPersistentState
|
|||
void DeleteRespawnTimes();
|
||||
|
||||
protected:
|
||||
bool CanBeUnload() const; // overwrite MapPersistentState::CanBeUnload
|
||||
bool CanBeUnload() const override; // overwrite MapPersistentState::CanBeUnload
|
||||
bool HasBounds() const { return !m_playerList.empty() || !m_groupList.empty(); }
|
||||
|
||||
private:
|
||||
|
|
@ -257,9 +257,9 @@ class BattleGroundPersistentState : public MapPersistentState
|
|||
|
||||
~BattleGroundPersistentState() {}
|
||||
|
||||
SpawnedPoolData& GetSpawnedPoolData() { return m_spawnedPoolData; }
|
||||
SpawnedPoolData& GetSpawnedPoolData() override { return m_spawnedPoolData; }
|
||||
protected:
|
||||
bool CanBeUnload() const; // overwrite MapPersistentState::CanBeUnload
|
||||
bool CanBeUnload() const override; // overwrite MapPersistentState::CanBeUnload
|
||||
|
||||
private:
|
||||
SpawnedPoolData m_spawnedPoolData; // Pools spawns state for map copy
|
||||
|
|
|
|||
|
|
@ -25,18 +25,18 @@
|
|||
class MANGOS_DLL_SPEC 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();
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ enum MMCleanFlag
|
|||
{
|
||||
MMCF_NONE = 0,
|
||||
MMCF_UPDATE = 1, // Clear or Expire called from update
|
||||
MMCF_RESET = 2 // Flag if need top()->Reset()
|
||||
MMCF_RESET = 2 // Flag if need top()->Reset() override
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC MotionMaster : private std::stack<MovementGenerator*>
|
||||
|
|
|
|||
|
|
@ -66,38 +66,38 @@ template<class T, class D>
|
|||
class MANGOS_DLL_SPEC MovementGeneratorMedium : public MovementGenerator
|
||||
{
|
||||
public:
|
||||
void Initialize(Unit& u)
|
||||
void Initialize(Unit& u) override
|
||||
{
|
||||
// u->AssertIsType<T>();
|
||||
(static_cast<D*>(this))->Initialize(*((T*)&u));
|
||||
}
|
||||
void Finalize(Unit& u)
|
||||
void Finalize(Unit& u) override
|
||||
{
|
||||
// u->AssertIsType<T>();
|
||||
(static_cast<D*>(this))->Finalize(*((T*)&u));
|
||||
}
|
||||
void Interrupt(Unit& u)
|
||||
void Interrupt(Unit& u) override
|
||||
{
|
||||
// u->AssertIsType<T>();
|
||||
(static_cast<D*>(this))->Interrupt(*((T*)&u));
|
||||
}
|
||||
void Reset(Unit& u)
|
||||
void Reset(Unit& u) override
|
||||
{
|
||||
// u->AssertIsType<T>();
|
||||
(static_cast<D*>(this))->Reset(*((T*)&u));
|
||||
}
|
||||
bool Update(Unit& u, const uint32& time_diff)
|
||||
bool Update(Unit& u, const uint32& time_diff) override
|
||||
{
|
||||
// u->AssertIsType<T>();
|
||||
return (static_cast<D*>(this))->Update(*((T*)&u), time_diff);
|
||||
}
|
||||
bool GetResetPosition(Unit& u, float& x, float& y, float& z)
|
||||
bool GetResetPosition(Unit& u, float& x, float& y, float& z) override
|
||||
{
|
||||
// u->AssertIsType<T>();
|
||||
return (static_cast<D*>(this))->GetResetPosition(*((T*)&u), x, y, z);
|
||||
}
|
||||
public:
|
||||
// will not link if not overridden in the generators
|
||||
// Will not link if not overridden in the generators
|
||||
void Initialize(T& u);
|
||||
void Finalize(T& u);
|
||||
void Interrupt(T& u);
|
||||
|
|
@ -118,7 +118,7 @@ struct MovementGeneratorFactory : public SelectableMovement
|
|||
{
|
||||
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) {}
|
||||
|
||||
MovementGenerator* Create(void*) const;
|
||||
MovementGenerator* Create(void*) const override;
|
||||
};
|
||||
|
||||
typedef FactoryHolder<MovementGenerator, MovementGeneratorType> MovementGeneratorCreator;
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ class MANGOS_DLL_DECL NullCreatureAI : public CreatureAI
|
|||
explicit NullCreatureAI(Creature* c) : CreatureAI(c) {}
|
||||
~NullCreatureAI();
|
||||
|
||||
void MoveInLineOfSight(Unit*) {}
|
||||
void AttackStart(Unit*) {}
|
||||
void AttackedBy(Unit*) {}
|
||||
void EnterEvadeMode() {}
|
||||
void MoveInLineOfSight(Unit*) override {}
|
||||
void AttackStart(Unit*) override {}
|
||||
void AttackedBy(Unit*) override {}
|
||||
void EnterEvadeMode() override {}
|
||||
|
||||
bool IsVisible(Unit*) const { return false; }
|
||||
bool IsVisible(Unit*) const override { return false; }
|
||||
|
||||
void UpdateAI(const uint32) {}
|
||||
void UpdateAI(const uint32) override {}
|
||||
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
public:
|
||||
|
||||
// class is used to manipulate with WorldUpdateCounter
|
||||
// it is needed in order to get time diff between two object's Update() calls
|
||||
// it is needed in order to get time diff between two object's Update() override calls
|
||||
class MANGOS_DLL_SPEC UpdateHelper
|
||||
{
|
||||
public:
|
||||
|
|
@ -577,9 +577,9 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
// obtain terrain data for map where this object belong...
|
||||
TerrainInfo const* GetTerrain() const;
|
||||
|
||||
void AddToClientUpdateList();
|
||||
void RemoveFromClientUpdateList();
|
||||
void BuildUpdateData(UpdateDataMapType&);
|
||||
void AddToClientUpdateList() override;
|
||||
void RemoveFromClientUpdateList() override;
|
||||
void BuildUpdateData(UpdateDataMapType&) override;
|
||||
|
||||
Creature* SummonCreature(uint32 id, float x, float y, float z, float ang, TempSummonType spwtype, uint32 despwtime, bool asActiveObject = false);
|
||||
|
||||
|
|
@ -597,7 +597,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
explicit WorldObject();
|
||||
|
||||
// these functions are used mostly for Relocate() and Corpse/Player specific stuff...
|
||||
// use them ONLY in LoadFromDB()/Create() funcs and nowhere else!
|
||||
// use them ONLY in LoadFromDB()/Create() override override funcs and nowhere else!
|
||||
// mapId/instanceId should be set in SetMap() function!
|
||||
void SetLocationMapId(uint32 _mapId) { m_mapId = _mapId; }
|
||||
void SetLocationInstanceId(uint32 _instanceId) { m_InstanceId = _instanceId; }
|
||||
|
|
|
|||
|
|
@ -106,4 +106,5 @@ class MANGOS_DLL_DECL ObjectGridStoper
|
|||
};
|
||||
|
||||
typedef GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> GridLoaderType;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1363,7 +1363,7 @@ enum PacketProcessing
|
|||
{
|
||||
PROCESS_INPLACE = 0, // process packet whenever we receive it - mostly for non-handled or non-implemented packets
|
||||
PROCESS_THREADUNSAFE, // packet is not thread-safe - process it in World::UpdateSessions()
|
||||
PROCESS_THREADSAFE // packet is thread-safe - process it in Map::Update()
|
||||
PROCESS_THREADSAFE // packet is thread-safe - process it in Map::Update() override
|
||||
};
|
||||
|
||||
class WorldPacket;
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ class MANGOS_DLL_SPEC Pet : public Creature
|
|||
explicit Pet(PetType type = MAX_PET_TYPE);
|
||||
virtual ~Pet();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
PetType getPetType() const { return m_petType; }
|
||||
void setPetType(PetType type) { m_petType = type; }
|
||||
|
|
@ -156,11 +156,11 @@ class MANGOS_DLL_SPEC Pet : public Creature
|
|||
void Unsummon(PetSaveMode mode, Unit* owner = NULL);
|
||||
static void DeleteFromDB(uint32 guidlow, bool separate_transaction = true);
|
||||
|
||||
void SetDeathState(DeathState s); // overwrite virtual Creature::SetDeathState and Unit::SetDeathState
|
||||
void SetDeathState(DeathState s) override; // overwrite virtual Creature::SetDeathState and Unit::SetDeathState
|
||||
void Update(uint32 update_diff, uint32 diff) override; // overwrite virtual Creature::Update and Unit::Update
|
||||
|
||||
uint8 GetPetAutoSpellSize() const { return m_autospells.size(); }
|
||||
uint32 GetPetAutoSpellOnPos(uint8 pos) const
|
||||
uint32 GetPetAutoSpellOnPos(uint8 pos) const override
|
||||
{
|
||||
if (pos >= m_autospells.size())
|
||||
return 0;
|
||||
|
|
@ -168,7 +168,7 @@ class MANGOS_DLL_SPEC Pet : public Creature
|
|||
return m_autospells[pos];
|
||||
}
|
||||
|
||||
void RegenerateAll(uint32 update_diff); // overwrite Creature::RegenerateAll
|
||||
void RegenerateAll(uint32 update_diff) override; // overwrite Creature::RegenerateAll
|
||||
void Regenerate(Powers power);
|
||||
void LooseHappiness();
|
||||
HappinessState GetHappinessState();
|
||||
|
|
@ -183,14 +183,14 @@ class MANGOS_DLL_SPEC Pet : public Creature
|
|||
int32 GetBonusDamage() { return m_bonusdamage; }
|
||||
void SetBonusDamage(int32 damage) { m_bonusdamage = damage; }
|
||||
|
||||
bool UpdateStats(Stats stat);
|
||||
bool UpdateAllStats();
|
||||
void UpdateResistances(uint32 school);
|
||||
void UpdateArmor();
|
||||
void UpdateMaxHealth();
|
||||
void UpdateMaxPower(Powers power);
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false);
|
||||
void UpdateDamagePhysical(WeaponAttackType attType);
|
||||
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;
|
||||
|
||||
bool CanTakeMoreActiveSpells(uint32 SpellIconID);
|
||||
void ToggleAutocast(uint32 spellid, bool apply);
|
||||
|
|
@ -198,7 +198,7 @@ class MANGOS_DLL_SPEC Pet : public Creature
|
|||
void ApplyModeFlags(PetModeFlags mode, bool apply);
|
||||
PetModeFlags GetModeFlags() const { return m_petModeFlags; }
|
||||
|
||||
bool HasSpell(uint32 spell) const;
|
||||
bool HasSpell(uint32 spell) const override;
|
||||
|
||||
void LearnPetPassives();
|
||||
void CastPetAuras(bool current);
|
||||
|
|
@ -261,11 +261,11 @@ class MANGOS_DLL_SPEC Pet : public Creature
|
|||
private:
|
||||
PetModeFlags m_petModeFlags;
|
||||
|
||||
void SaveToDB(uint32, uint8, uint32) // overwrited of Creature::SaveToDB - don't must be called
|
||||
void SaveToDB(uint32, uint8, uint32) override // overwrite of Creature::SaveToDB - don't must be called
|
||||
{
|
||||
MANGOS_ASSERT(false);
|
||||
}
|
||||
void DeleteFromDB() // overwrited of Creature::DeleteFromDB - don't must be called
|
||||
void DeleteFromDB() override // overwrite of Creature::DeleteFromDB - don't must be called
|
||||
{
|
||||
MANGOS_ASSERT(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ class MANGOS_DLL_DECL PetAI : public CreatureAI
|
|||
|
||||
explicit PetAI(Creature* c);
|
||||
|
||||
void MoveInLineOfSight(Unit*);
|
||||
void AttackStart(Unit*);
|
||||
void EnterEvadeMode();
|
||||
void AttackedBy(Unit*);
|
||||
bool IsVisible(Unit*) const;
|
||||
void MoveInLineOfSight(Unit*) override;
|
||||
void AttackStart(Unit*) override;
|
||||
void EnterEvadeMode() override;
|
||||
void AttackedBy(Unit*) override;
|
||||
bool IsVisible(Unit*) const override;
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
void UpdateAI(const uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1030,13 +1030,13 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
explicit Player(WorldSession* session);
|
||||
~Player();
|
||||
|
||||
void CleanupsBeforeDelete();
|
||||
void CleanupsBeforeDelete() override;
|
||||
|
||||
static UpdateMask updateVisualBits;
|
||||
static void InitVisibleBits();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options = 0);
|
||||
|
||||
|
|
@ -1065,8 +1065,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
void SetInWater(bool apply);
|
||||
|
||||
bool IsInWater() const { return m_isInWater; }
|
||||
bool IsUnderWater() const;
|
||||
bool IsInWater() const override { return m_isInWater; }
|
||||
bool IsUnderWater() const override;
|
||||
|
||||
void SendInitialPacketsBeforeAddToMap();
|
||||
void SendInitialPacketsAfterAddToMap();
|
||||
|
|
@ -1136,7 +1136,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void ResetTimeSync();
|
||||
void SendTimeSync();
|
||||
|
||||
void SetDeathState(DeathState s); // overwrite Unit::SetDeathState
|
||||
void SetDeathState(DeathState s) override; // overwrite Unit::SetDeathState
|
||||
|
||||
float GetRestBonus() const { return m_rest_bonus; }
|
||||
void SetRestBonus(float rest_bonus_new);
|
||||
|
|
@ -1162,7 +1162,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
/*********************************************************/
|
||||
|
||||
void SetVirtualItemSlot(uint8 i, Item* item);
|
||||
void SetSheath(SheathState sheathed); // overwrite Unit version
|
||||
void SetSheath(SheathState sheathed) override; // overwrite Unit version
|
||||
uint8 FindEquipSlot(ItemPrototype 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;
|
||||
|
|
@ -1578,12 +1578,12 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void PossessSpellInitialize();
|
||||
void RemovePetActionBar();
|
||||
|
||||
bool HasSpell(uint32 spell) const;
|
||||
bool HasSpell(uint32 spell) const override;
|
||||
bool HasActiveSpell(uint32 spell) const; // show in spellbook
|
||||
TrainerSpellState GetTrainerSpellState(TrainerSpell const* trainer_spell, uint32 reqLevel) const;
|
||||
bool IsSpellFitByClassAndRace(uint32 spell_id, uint32* pReqlevel = NULL) const;
|
||||
bool IsNeedCastPassiveLikeSpellAtLearn(SpellEntry const* spellInfo) const;
|
||||
bool IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const;
|
||||
bool IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const override;
|
||||
|
||||
void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask);
|
||||
void SendInitialSpells();
|
||||
|
|
@ -1657,7 +1657,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 itemId, Spell* spell = NULL, bool infinityCooldown = false);
|
||||
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
|
||||
void SendCooldownEvent(SpellEntry const* spellInfo, uint32 itemId = 0, Spell* spell = NULL);
|
||||
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);
|
||||
|
|
@ -1784,16 +1784,16 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
float GetHealthBonusFromStamina();
|
||||
float GetManaBonusFromIntellect();
|
||||
|
||||
bool UpdateStats(Stats stat);
|
||||
bool UpdateAllStats();
|
||||
void UpdateResistances(uint32 school);
|
||||
void UpdateArmor();
|
||||
void UpdateMaxHealth();
|
||||
void UpdateMaxPower(Powers power);
|
||||
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 ApplyFeralAPBonus(int32 amount, bool apply);
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false);
|
||||
void UpdateAttackPowerAndDamage(bool ranged = false) override;
|
||||
void UpdateShieldBlockValue();
|
||||
void UpdateDamagePhysical(WeaponAttackType attType);
|
||||
void UpdateDamagePhysical(WeaponAttackType attType) override;
|
||||
void ApplySpellPowerBonus(int32 amount, bool apply);
|
||||
void UpdateSpellDamageAndHealingBonus();
|
||||
void ApplyRatingMod(CombatRating cr, int32 value, bool apply);
|
||||
|
|
@ -1837,8 +1837,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
WorldSession* GetSession() const { return m_session; }
|
||||
void SetSession(WorldSession* s) { m_session = s; }
|
||||
|
||||
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
|
||||
void DestroyForPlayer(Player* target, bool anim = false) const;
|
||||
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
|
||||
void DestroyForPlayer(Player* target, bool anim = false) const override;
|
||||
void SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 RestXP);
|
||||
|
||||
uint8 LastSwingErrorMsg() const { return m_swingErrorMsg; }
|
||||
|
|
@ -1863,8 +1863,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
bool SetPosition(float x, float y, float z, float orientation, bool teleport = false);
|
||||
void UpdateUnderwaterState(Map* m, float x, float y, float z);
|
||||
|
||||
void SendMessageToSet(WorldPacket* data, bool self);// overwrite Object::SendMessageToSet
|
||||
void SendMessageToSetInRange(WorldPacket* data, float fist, bool self);
|
||||
void SendMessageToSet(WorldPacket* data, bool self) override;// 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);
|
||||
|
||||
|
|
@ -1976,7 +1976,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void UpdateCorpseReclaimDelay();
|
||||
void SendCorpseReclaimDelay(bool load = false);
|
||||
|
||||
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; }
|
||||
|
|
@ -2239,7 +2239,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
bool HaveAtClient(WorldObject const* u) { return u == this || m_clientGUIDs.find(u->GetObjectGuid()) != m_clientGUIDs.end(); }
|
||||
|
||||
bool IsVisibleInGridForPlayer(Player* pl) const;
|
||||
bool IsVisibleInGridForPlayer(Player* pl) const override;
|
||||
bool IsVisibleGloballyFor(Player* pl) const;
|
||||
|
||||
void UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* target);
|
||||
|
|
@ -2252,7 +2252,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
Camera& GetCamera() { return m_camera; }
|
||||
|
||||
virtual void SetPhaseMask(uint32 newPhaseMask, bool update);// overwrite Unit::SetPhaseMask
|
||||
virtual void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite Unit::SetPhaseMask
|
||||
|
||||
uint8 m_forced_speed_changes[MAX_MOVE_TYPE];
|
||||
|
||||
|
|
@ -2431,8 +2431,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void _SaveTalents();
|
||||
void _SaveStats();
|
||||
|
||||
void _SetCreateBits(UpdateMask* updateMask, Player* target) const;
|
||||
void _SetUpdateBits(UpdateMask* updateMask, Player* target) const;
|
||||
void _SetCreateBits(UpdateMask* updateMask, Player* target) const override;
|
||||
void _SetUpdateBits(UpdateMask* updateMask, Player* target) const override;
|
||||
|
||||
/*********************************************************/
|
||||
/*** ENVIRONMENTAL SYSTEM ***/
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class MANGOS_DLL_SPEC PointMovementGenerator
|
|||
|
||||
void MovementInform(T&);
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return POINT_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return POINT_MOTION_TYPE; }
|
||||
|
||||
bool GetDestination(float& x, float& y, float& z) const { x = i_x; y = i_y; z = i_z; return true; }
|
||||
private:
|
||||
|
|
@ -55,8 +55,8 @@ class MANGOS_DLL_SPEC AssistanceMovementGenerator
|
|||
AssistanceMovementGenerator(float _x, float _y, float _z) :
|
||||
PointMovementGenerator<Creature>(0, _x, _y, _z, true) {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return ASSISTANCE_MOTION_TYPE; }
|
||||
void Finalize(Unit&);
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return ASSISTANCE_MOTION_TYPE; }
|
||||
void Finalize(Unit&) override;
|
||||
};
|
||||
|
||||
// Does almost nothing - just doesn't allows previous movegen interrupt current effect. Can be reused for charge effect
|
||||
|
|
@ -64,12 +64,12 @@ class EffectMovementGenerator : public MovementGenerator
|
|||
{
|
||||
public:
|
||||
explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) {}
|
||||
void Initialize(Unit&) {}
|
||||
void Finalize(Unit& unit);
|
||||
void Interrupt(Unit&) {}
|
||||
void Reset(Unit&) {}
|
||||
bool Update(Unit& u, const uint32&);
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return EFFECT_MOTION_TYPE; }
|
||||
void Initialize(Unit&) override {}
|
||||
void Finalize(Unit& unit) override;
|
||||
void Interrupt(Unit&) override {}
|
||||
void Reset(Unit&) override {}
|
||||
bool Update(Unit& u, const uint32&) override;
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return EFFECT_MOTION_TYPE; }
|
||||
private:
|
||||
uint32 m_Id;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class MANGOS_DLL_SPEC RandomMovementGenerator
|
|||
void Interrupt(T&);
|
||||
void Reset(T&);
|
||||
bool Update(T&, const uint32&);
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return RANDOM_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return RANDOM_MOTION_TYPE; }
|
||||
private:
|
||||
ShortTimeTracker i_nextMoveTime;
|
||||
float i_x, i_y, i_z;
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ class MANGOS_DLL_DECL ReactorAI : public CreatureAI
|
|||
|
||||
explicit ReactorAI(Creature* c) : CreatureAI(c) {}
|
||||
|
||||
void MoveInLineOfSight(Unit*);
|
||||
void AttackStart(Unit*);
|
||||
void EnterEvadeMode();
|
||||
bool IsVisible(Unit*) const;
|
||||
void MoveInLineOfSight(Unit*) override;
|
||||
void AttackStart(Unit*) override;
|
||||
void EnterEvadeMode() override;
|
||||
bool IsVisible(Unit*) const override;
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
void UpdateAI(const uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -897,9 +897,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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ class MANGOS_DLL_SPEC AreaAura : public Aura
|
|||
AreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = NULL, Item* castItem = NULL);
|
||||
~AreaAura();
|
||||
protected:
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
private:
|
||||
float m_radius;
|
||||
AreaAuraType m_areaAuraType;
|
||||
|
|
@ -508,7 +508,7 @@ class MANGOS_DLL_SPEC PersistentAreaAura : public Aura
|
|||
PersistentAreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = NULL, Item* castItem = NULL);
|
||||
~PersistentAreaAura();
|
||||
protected:
|
||||
void Update(uint32 diff);
|
||||
void Update(uint32 diff) override;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC SingleEnemyTargetAura : public Aura
|
||||
|
|
@ -517,7 +517,7 @@ class MANGOS_DLL_SPEC SingleEnemyTargetAura : public Aura
|
|||
|
||||
public:
|
||||
~SingleEnemyTargetAura();
|
||||
Unit* GetTriggerTarget() const;
|
||||
Unit* GetTriggerTarget() const override;
|
||||
|
||||
protected:
|
||||
SingleEnemyTargetAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = NULL, Item* castItem = NULL);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class MANGOS_DLL_SPEC TargetedMovementGeneratorMedium
|
|||
Unit* GetTarget() const { return i_target.getTarget(); }
|
||||
|
||||
void unitSpeedChanged() { i_recalculateTravel = true; }
|
||||
void UpdateFinalDistance(float fDistance);
|
||||
void UpdateFinalDistance(float fDistance) override;
|
||||
|
||||
protected:
|
||||
void _setTargetLocation(T&);
|
||||
|
|
@ -81,7 +81,7 @@ class MANGOS_DLL_SPEC ChaseMovementGenerator : public TargetedMovementGeneratorM
|
|||
: TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target, offset, angle) {}
|
||||
~ChaseMovementGenerator() {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return CHASE_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return CHASE_MOTION_TYPE; }
|
||||
|
||||
void Initialize(T&);
|
||||
void Finalize(T&);
|
||||
|
|
@ -105,7 +105,7 @@ class MANGOS_DLL_SPEC FollowMovementGenerator : public TargetedMovementGenerator
|
|||
: TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target, offset, angle) {}
|
||||
~FollowMovementGenerator() {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return FOLLOW_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return FOLLOW_MOTION_TYPE; }
|
||||
|
||||
void Initialize(T&);
|
||||
void Finalize(T&);
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ class TemporarySummon : public Creature
|
|||
ObjectGuid const& GetSummonerGuid() const { return m_summoner ; }
|
||||
Unit* GetSummoner() const { return ObjectAccessor::GetUnit(*this, m_summoner); }
|
||||
private:
|
||||
void SaveToDB(uint32, uint8, uint32) // overwrited of Creature::SaveToDB - don't must be called
|
||||
void SaveToDB(uint32, uint8, uint32) override // overwrited of Creature::SaveToDB - don't must be called
|
||||
{
|
||||
MANGOS_ASSERT(false);
|
||||
}
|
||||
void DeleteFromDB() // overwrited of Creature::DeleteFromDB - don't must be called
|
||||
void DeleteFromDB() override // overwrited of Creature::DeleteFromDB - don't must be called
|
||||
{
|
||||
MANGOS_ASSERT(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,13 +111,13 @@ class MANGOS_DLL_SPEC 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& pThreatRefStatusChangeEvent);
|
||||
|
|
|
|||
|
|
@ -45,16 +45,16 @@ class Totem : public Creature
|
|||
void SetDuration(uint32 dur) { m_duration = dur; }
|
||||
void SetOwner(Unit* owner);
|
||||
|
||||
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*/) {}
|
||||
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
|
||||
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 IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const;
|
||||
bool IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const override;
|
||||
|
||||
protected:
|
||||
TotemType m_type;
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@ class MANGOS_DLL_DECL TotemAI : public CreatureAI
|
|||
|
||||
explicit TotemAI(Creature* c);
|
||||
|
||||
void MoveInLineOfSight(Unit*);
|
||||
void AttackStart(Unit*);
|
||||
void EnterEvadeMode();
|
||||
bool IsVisible(Unit*) const;
|
||||
void MoveInLineOfSight(Unit*) override;
|
||||
void AttackStart(Unit*) override;
|
||||
void EnterEvadeMode() override;
|
||||
bool IsVisible(Unit*) const override;
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
void UpdateAI(const uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
protected:
|
||||
Totem& getTotem();
|
||||
|
|
|
|||
|
|
@ -1093,12 +1093,12 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
|
||||
virtual ~Unit();
|
||||
|
||||
void AddToWorld();
|
||||
void RemoveFromWorld();
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
void CleanupsBeforeDelete(); // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units)
|
||||
void CleanupsBeforeDelete() override; // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units)
|
||||
|
||||
float GetObjectBoundingRadius() const // overwrite WorldObject version
|
||||
float GetObjectBoundingRadius() const override // overwrite WorldObject version
|
||||
{
|
||||
return m_floatValues[UNIT_FIELD_BOUNDINGRADIUS];
|
||||
}
|
||||
|
|
@ -1142,7 +1142,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
if (itr == m_attackers.end())
|
||||
m_attackers.insert(pAttacker);
|
||||
}
|
||||
void _removeAttacker(Unit* pAttacker) // must be called only from Unit::AttackStop()
|
||||
void _removeAttacker(Unit* pAttacker) // must be called only from Unit::AttackStop() override
|
||||
{
|
||||
m_attackers.erase(pAttacker);
|
||||
}
|
||||
|
|
@ -1228,9 +1228,9 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
uint32 getFaction() const { return GetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE); }
|
||||
void setFaction(uint32 faction) { SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction); }
|
||||
FactionTemplateEntry const* getFactionTemplateEntry() const;
|
||||
bool IsHostileTo(Unit const* unit) const;
|
||||
bool IsHostileTo(Unit const* unit) const override;
|
||||
bool IsHostileToPlayers() const;
|
||||
bool IsFriendlyTo(Unit const* unit) const;
|
||||
bool IsFriendlyTo(Unit const* unit) const override;
|
||||
bool IsNeutralToAll() const;
|
||||
bool IsContestedGuard() const
|
||||
{
|
||||
|
|
@ -1653,15 +1653,15 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
// Visibility system
|
||||
UnitVisibility GetVisibility() const { return m_Visibility; }
|
||||
void SetVisibility(UnitVisibility x);
|
||||
void UpdateVisibilityAndView(); // overwrite WorldObject::UpdateVisibilityAndView()
|
||||
void UpdateVisibilityAndView() override; // overwrite WorldObject::UpdateVisibilityAndView()
|
||||
|
||||
// common function for visibility checks for player/creatures with detection code
|
||||
bool isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, bool detect, bool inVisibleList = false, bool is3dDistance = true) const;
|
||||
bool canDetectInvisibilityOf(Unit const* u) const;
|
||||
void SetPhaseMask(uint32 newPhaseMask, bool update);// overwrite WorldObject::SetPhaseMask
|
||||
void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite WorldObject::SetPhaseMask
|
||||
|
||||
// virtual functions for all world objects types
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const;
|
||||
bool isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const override;
|
||||
// function for low level grid visibility checks in player/creature cases
|
||||
virtual bool IsVisibleInGridForPlayer(Player* pl) const = 0;
|
||||
bool isInvisibleForAlive() const;
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ class MANGOS_DLL_SPEC WaypointMovementGenerator<Creature>
|
|||
|
||||
private:
|
||||
|
||||
void Stop(int32 time) { i_nextMoveTime.Reset(time);}
|
||||
void Stop(int32 time) { i_nextMoveTime.Reset(time); }
|
||||
|
||||
bool Stopped() { return !i_nextMoveTime.Passed();}
|
||||
bool Stopped() { return !i_nextMoveTime.Passed(); }
|
||||
|
||||
bool CanMove(int32 diff)
|
||||
{
|
||||
|
|
@ -126,7 +126,7 @@ class MANGOS_DLL_SPEC FlightPathMovementGenerator
|
|||
void Interrupt(Player&);
|
||||
void Reset(Player&);
|
||||
bool Update(Player&, const uint32&);
|
||||
MovementGeneratorType GetMovementGeneratorType() const { return FLIGHT_MOTION_TYPE; }
|
||||
MovementGeneratorType GetMovementGeneratorType() const override { return FLIGHT_MOTION_TYPE; }
|
||||
|
||||
TaxiPathNodeList const& GetPath() { return *i_path; }
|
||||
uint32 GetPathAtMapEnd() const;
|
||||
|
|
@ -136,4 +136,5 @@ class MANGOS_DLL_SPEC FlightPathMovementGenerator
|
|||
void DoEventIfAny(Player& player, TaxiPathNodeEntry const& node, bool departure);
|
||||
bool GetResetPosition(Player&, float& x, float& y, float& z);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -207,9 +207,9 @@ class MapSessionFilter : public PacketFilter
|
|||
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
|
||||
|
|
@ -220,7 +220,7 @@ class WorldSessionFilter : public PacketFilter
|
|||
explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) {}
|
||||
~WorldSessionFilter() {}
|
||||
|
||||
virtual bool Process(WorldPacket* packet);
|
||||
virtual bool Process(WorldPacket* packet) override;
|
||||
};
|
||||
|
||||
/// Player session in the World
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> WorldHandler;
|
|||
* scale well to allocate memory for every. When something is
|
||||
* written to the output buffer the socket is not immediately
|
||||
* activated for output (again for the same reason), there
|
||||
* is 10ms celling (thats why there is Update() method).
|
||||
* is 10ms celling (thats why there is Update() override method).
|
||||
* This concept is similar to TCP_CORK, but TCP_CORK
|
||||
* uses 200ms celling. As result overhead generated by
|
||||
* sending packets from "producer" threads is minimal,
|
||||
|
|
@ -131,16 +131,16 @@ class WorldSocket : protected WorldHandler
|
|||
virtual ~WorldSocket(void);
|
||||
|
||||
/// Called on open ,the void* is the acceptor.
|
||||
virtual int open(void*);
|
||||
virtual int open(void*) override;
|
||||
|
||||
/// Called on failures inside of the acceptor, don't call from your code.
|
||||
virtual int close(int);
|
||||
|
||||
/// Called when we can read from the socket.
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE) override;
|
||||
|
||||
/// Called when the socket can write.
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE) override;
|
||||
|
||||
/// Called when connection is closed or error happens.
|
||||
virtual int handle_close(ACE_HANDLE = ACE_INVALID_HANDLE,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace VMAP
|
|||
InstanceTreeMap iInstanceMapTrees;
|
||||
|
||||
bool _loadMap(uint32 pMapId, const std::string& basePath, uint32 tileX, uint32 tileY);
|
||||
/* void _unloadMap(uint32 pMapId, uint32 x, uint32 y); */
|
||||
/* void _unloadMap(uint32 pMapId, uint32 x, uint32 y) override override; */
|
||||
|
||||
public:
|
||||
// public for debug
|
||||
|
|
@ -80,32 +80,32 @@ namespace VMAP
|
|||
VMapManager2();
|
||||
~VMapManager2(void);
|
||||
|
||||
VMAPLoadResult loadMap(const char* pBasePath, unsigned int pMapId, int x, int y);
|
||||
VMAPLoadResult loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) override;
|
||||
|
||||
void unloadMap(unsigned int pMapId, int x, int y);
|
||||
void unloadMap(unsigned int pMapId);
|
||||
void unloadMap(unsigned int pMapId, int x, int y) override;
|
||||
void unloadMap(unsigned int pMapId) override;
|
||||
|
||||
bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2) ;
|
||||
bool isInLineOfSight(unsigned int pMapId, 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 pMapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float pModifyDist);
|
||||
float getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist);
|
||||
bool getObjectHitPos(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float pModifyDist) override;
|
||||
float getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist) override;
|
||||
|
||||
bool processCommand(char* pCommand) { return false; } // for debug and extensions
|
||||
bool processCommand(char* pCommand) 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 pMapId, int x, int y) const
|
||||
virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const override
|
||||
{
|
||||
return getMapFileName(pMapId);
|
||||
}
|
||||
virtual bool existsMap(const char* pBasePath, unsigned int pMapId, int x, int y);
|
||||
virtual bool existsMap(const char* pBasePath, unsigned int pMapId, int x, int y) override;
|
||||
|
||||
#ifdef MMAP_GENERATOR
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
class CliRunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
void run();
|
||||
void run() override;
|
||||
};
|
||||
#endif
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class MaNGOSsoapRunnable: public ACE_Based::Runnable
|
|||
{
|
||||
public:
|
||||
MaNGOSsoapRunnable() { }
|
||||
void run();
|
||||
void run() override;
|
||||
void setListenArguments(std::string host, uint16 port)
|
||||
{
|
||||
m_host = host;
|
||||
|
|
@ -52,7 +52,7 @@ class SOAPWorkingThread : public ACE_Task<ACE_MT_SYNCH>
|
|||
SOAPWorkingThread()
|
||||
{ }
|
||||
|
||||
virtual int svc(void)
|
||||
virtual int svc(void) override
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,16 +51,16 @@ class RASocket: protected RAHandler
|
|||
virtual ~RASocket(void);
|
||||
|
||||
/// Called on open ,the void* is the acceptor.
|
||||
virtual int open(void*);
|
||||
virtual int open(void*) override;
|
||||
|
||||
/// Called on failures inside of the acceptor, don't call from your code.
|
||||
virtual int close(int);
|
||||
|
||||
/// Called when we can read from the socket.
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE) override;
|
||||
|
||||
/// Called when the socket can write.
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE) override;
|
||||
|
||||
/// Called when connection is closed or error happens.
|
||||
virtual int handle_close(ACE_HANDLE = ACE_INVALID_HANDLE,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
class WorldRunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
void run();
|
||||
void run() override;
|
||||
};
|
||||
#endif
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class AuthSocket: public BufferedSocket
|
|||
AuthSocket();
|
||||
~AuthSocket();
|
||||
|
||||
void OnAccept();
|
||||
void OnRead();
|
||||
void OnAccept() override;
|
||||
void OnRead() override;
|
||||
void SendProof(Sha1Hash sha);
|
||||
void LoadRealmlist(ByteBuffer& pkt, uint32 acctid);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ class BufferedSocket: public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
|
|||
|
||||
const std::string& get_remote_address(void) const;
|
||||
|
||||
virtual int open(void*);
|
||||
virtual int open(void*) override;
|
||||
|
||||
void close_connection(void);
|
||||
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE) override;
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE) override;
|
||||
|
||||
virtual int handle_close(ACE_HANDLE = ACE_INVALID_HANDLE,
|
||||
ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ class PatchHandler: public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
|
|||
PatchHandler(ACE_HANDLE socket, ACE_HANDLE patch);
|
||||
virtual ~PatchHandler();
|
||||
|
||||
int open(void* = 0);
|
||||
int open(void* = 0) override;
|
||||
|
||||
protected:
|
||||
virtual int svc(void);
|
||||
virtual int svc(void) override;
|
||||
|
||||
private:
|
||||
ACE_HANDLE patch_fd_;
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ class MANGOS_DLL_SPEC MySqlPreparedStatement : public SqlPreparedStatement
|
|||
~MySqlPreparedStatement();
|
||||
|
||||
// prepare statement
|
||||
virtual bool prepare();
|
||||
virtual bool prepare() override;
|
||||
|
||||
// bind input parameters
|
||||
virtual void bind(const SqlStmtParameters& holder);
|
||||
virtual void bind(const SqlStmtParameters& holder) override;
|
||||
|
||||
// execute DML statement
|
||||
virtual bool execute();
|
||||
virtual bool execute() override;
|
||||
|
||||
protected:
|
||||
// bind parameters
|
||||
|
|
@ -74,20 +74,20 @@ class MANGOS_DLL_SPEC MySQLConnection : public SqlConnection
|
|||
|
||||
//! Initializes Mysql and connects to a server.
|
||||
/*! infoString should be formated like hostname;username;password;database. */
|
||||
bool Initialize(const char* infoString);
|
||||
bool Initialize(const char* infoString) override;
|
||||
|
||||
QueryResult* Query(const char* sql);
|
||||
QueryNamedResult* QueryNamed(const char* sql);
|
||||
bool Execute(const char* sql);
|
||||
QueryResult* Query(const char* sql) override;
|
||||
QueryNamedResult* QueryNamed(const char* sql) override;
|
||||
bool Execute(const char* sql) override;
|
||||
|
||||
unsigned long escape_string(char* to, const char* from, unsigned long length);
|
||||
|
||||
bool BeginTransaction();
|
||||
bool CommitTransaction();
|
||||
bool RollbackTransaction();
|
||||
bool BeginTransaction() override;
|
||||
bool CommitTransaction() override;
|
||||
bool RollbackTransaction() override;
|
||||
|
||||
protected:
|
||||
SqlPreparedStatement* CreateStatement(const std::string& fmt);
|
||||
SqlPreparedStatement* CreateStatement(const std::string& fmt) override;
|
||||
|
||||
private:
|
||||
bool _TransactionCmd(const char* sql);
|
||||
|
|
@ -105,12 +105,12 @@ class MANGOS_DLL_SPEC DatabaseMysql : public Database
|
|||
~DatabaseMysql();
|
||||
|
||||
// must be call before first query in thread
|
||||
void ThreadStart();
|
||||
void ThreadStart() override;
|
||||
// must be call before finish thread run
|
||||
void ThreadEnd();
|
||||
void ThreadEnd() override;
|
||||
|
||||
protected:
|
||||
virtual SqlConnection* CreateConnection();
|
||||
virtual SqlConnection* CreateConnection() override;
|
||||
|
||||
private:
|
||||
static size_t db_count;
|
||||
|
|
|
|||
|
|
@ -40,21 +40,21 @@ class MANGOS_DLL_SPEC PostgreSQLConnection : public SqlConnection
|
|||
PostgreSQLConnection() : mPGconn(NULL) {}
|
||||
~PostgreSQLConnection();
|
||||
|
||||
bool Initialize(const char* infoString);
|
||||
bool Initialize(const char* infoString) override;
|
||||
|
||||
QueryResult* Query(const char* sql);
|
||||
QueryNamedResult* QueryNamed(const char* sql);
|
||||
bool Execute(const char* sql);
|
||||
QueryResult* Query(const char* sql) override;
|
||||
QueryNamedResult* QueryNamed(const char* sql) override;
|
||||
bool Execute(const char* sql) override;
|
||||
|
||||
unsigned long escape_string(char* to, const char* from, unsigned long length);
|
||||
|
||||
bool BeginTransaction();
|
||||
bool CommitTransaction();
|
||||
bool RollbackTransaction();
|
||||
bool BeginTransaction() override;
|
||||
bool CommitTransaction() override;
|
||||
bool RollbackTransaction() override;
|
||||
|
||||
private:
|
||||
bool _TransactionCmd(const char* sql);
|
||||
bool _Query(const char* sql, PGresult** pResult, uint64* pRowCount, uint32* pFieldCount);
|
||||
bool _Query(const char* sql, PGresult** pResult, uint64* pRowCount, uint32* pFieldCount) override;
|
||||
|
||||
PGconn* mPGconn;
|
||||
};
|
||||
|
|
@ -71,7 +71,7 @@ class MANGOS_DLL_SPEC DatabasePostgre : public Database
|
|||
/*! infoString should be formated like hostname;username;password;database. */
|
||||
|
||||
protected:
|
||||
virtual SqlConnection* CreateConnection();
|
||||
virtual SqlConnection* CreateConnection() override;
|
||||
|
||||
private:
|
||||
static size_t db_count;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ class MySQLDelayThread : public SqlDelayThread
|
|||
{
|
||||
public:
|
||||
MySQLDelayThread(Database* db) : SqlDelayThread(db) {}
|
||||
void Stop() { SqlDelayThread::Stop(); }
|
||||
void Stop() { SqlDelayThread::Stop() override; }
|
||||
};
|
||||
#endif //__MYSQLDELAYTHREAD_H
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ class PGSQLDelayThread : public SqlDelayThread
|
|||
{
|
||||
public:
|
||||
PGSQLDelayThread(Database* db) : SqlDelayThread(db) {}
|
||||
void Stop() { SqlDelayThread::Stop(); }
|
||||
void Stop() { SqlDelayThread::Stop() override; }
|
||||
};
|
||||
#endif //__PGSQLDELAYTHREAD_H
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class QueryResultMysql : public QueryResult
|
|||
|
||||
~QueryResultMysql();
|
||||
|
||||
bool NextRow();
|
||||
bool NextRow() override;
|
||||
|
||||
private:
|
||||
enum Field::DataTypes ConvertNativeType(enum_field_types mysqlType) const;
|
||||
|
|
|
|||
|
|
@ -78,11 +78,11 @@ class QueryResultPostgre : public QueryResult
|
|||
|
||||
~QueryResultPostgre();
|
||||
|
||||
bool NextRow();
|
||||
bool NextRow() override;
|
||||
|
||||
private:
|
||||
enum Field::DataTypes ConvertNativeType(Oid pOid) const;
|
||||
void EndQuery();
|
||||
void EndQuery() override;
|
||||
|
||||
PGresult* mResult;
|
||||
uint32 mTableIndex;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class SqlPlainRequest : public SqlOperation
|
|||
public:
|
||||
SqlPlainRequest(const char* sql) : m_sql(mangos_strdup(sql)) {}
|
||||
~SqlPlainRequest() { char* tofree = const_cast<char*>(m_sql); delete [] tofree; }
|
||||
bool Execute(SqlConnection* conn);
|
||||
bool Execute(SqlConnection* conn) override;
|
||||
};
|
||||
|
||||
class SqlTransaction : public SqlOperation
|
||||
|
|
@ -62,9 +62,9 @@ class SqlTransaction : public SqlOperation
|
|||
SqlTransaction() {}
|
||||
~SqlTransaction();
|
||||
|
||||
void DelayExecute(SqlOperation* sql) { m_queue.push_back(sql); }
|
||||
void DelayExecute(SqlOperation* sql) { m_queue.push_back(sql); }
|
||||
|
||||
bool Execute(SqlConnection* conn);
|
||||
bool Execute(SqlConnection* conn) override;
|
||||
};
|
||||
|
||||
class SqlPreparedRequest : public SqlOperation
|
||||
|
|
@ -73,7 +73,7 @@ class SqlPreparedRequest : public SqlOperation
|
|||
SqlPreparedRequest(int nIndex, SqlStmtParameters* arg);
|
||||
~SqlPreparedRequest();
|
||||
|
||||
bool Execute(SqlConnection* conn);
|
||||
bool Execute(SqlConnection* conn) override;
|
||||
|
||||
private:
|
||||
const int m_nIndex;
|
||||
|
|
@ -105,7 +105,7 @@ class SqlQuery : public SqlOperation
|
|||
SqlQuery(const char* sql, MaNGOS::IQueryCallback* callback, SqlResultQueue* queue)
|
||||
: m_sql(mangos_strdup(sql)), m_callback(callback), m_queue(queue) {}
|
||||
~SqlQuery() { char* tofree = const_cast<char*>(m_sql); delete [] tofree; }
|
||||
bool Execute(SqlConnection* conn);
|
||||
bool Execute(SqlConnection* conn) override;
|
||||
};
|
||||
|
||||
class SqlQueryHolder
|
||||
|
|
@ -134,6 +134,6 @@ class SqlQueryHolderEx : public SqlOperation
|
|||
public:
|
||||
SqlQueryHolderEx(SqlQueryHolder* holder, MaNGOS::IQueryCallback* callback, SqlResultQueue* queue)
|
||||
: m_holder(holder), m_callback(callback), m_queue(queue) {}
|
||||
bool Execute(SqlConnection* conn);
|
||||
bool Execute(SqlConnection* conn) override;
|
||||
};
|
||||
#endif //__SQLOPERATIONS_H
|
||||
|
|
|
|||
|
|
@ -334,12 +334,12 @@ class MANGOS_DLL_SPEC SqlPlainPreparedStatement : public SqlPreparedStatement
|
|||
~SqlPlainPreparedStatement() {}
|
||||
|
||||
// this statement is always prepared
|
||||
virtual bool prepare() { return true; }
|
||||
virtual bool prepare() override { return true; }
|
||||
|
||||
// we should replace all '?' symbols with substrings with proper format
|
||||
virtual void bind(const SqlStmtParameters& holder);
|
||||
virtual void bind(const SqlStmtParameters& holder) override;
|
||||
|
||||
virtual bool execute();
|
||||
virtual bool execute() override;
|
||||
|
||||
protected:
|
||||
void DataToString(const SqlStmtFieldData& data, std::ostringstream& fmt);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12069"
|
||||
#define REVISION_NR "12070"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue