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