From b453e124231a90321fe79fbf3a62acdcfa54a691 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 4 Jun 2017 01:00:45 +0200 Subject: Core/Game: Include cleanup part 5 * ObjectMgr.h * Player.h * Unit.h * G3D should no longer propagate everywhere from Spline/MotionMaster --- src/server/game/Scripting/ScriptSystem.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/server/game/Scripting/ScriptSystem.h') diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h index 304275e87c7..af29bf1fdec 100644 --- a/src/server/game/Scripting/ScriptSystem.h +++ b/src/server/game/Scripting/ScriptSystem.h @@ -21,11 +21,11 @@ #include "Define.h" #include "Hash.h" -#include "SplineChain.h" #include #include class Creature; +struct SplineChainLink; #define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available @@ -68,8 +68,10 @@ typedef std::vector ScriptPointVector; class TC_GAME_API SystemMgr { private: - SystemMgr() { } - ~SystemMgr() { } + SystemMgr(); + ~SystemMgr(); + SystemMgr(SystemMgr const&) = delete; + SystemMgr& operator=(SystemMgr const&) = delete; public: static SystemMgr* instance(); @@ -90,20 +92,13 @@ class TC_GAME_API SystemMgr return &itr->second; } - SplineChain const* GetSplineChain(uint32 entry, uint16 chainId) const - { - auto it = m_mSplineChainsMap.find({ entry, chainId }); - if (it == m_mSplineChainsMap.end()) - return nullptr; - return &it->second; - } - - SplineChain const* GetSplineChain(Creature const* who, uint16 id) const; + std::vector const* GetSplineChain(uint32 entry, uint16 chainId) const; + std::vector const* GetSplineChain(Creature const* who, uint16 id) const; protected: PointMoveMap m_mPointMoveMap; //coordinates for waypoints typedef std::pair ChainKeyType; // creature entry + chain ID - std::unordered_map m_mSplineChainsMap; // spline chains + std::unordered_map> m_mSplineChainsMap; // spline chains }; #define sScriptSystemMgr SystemMgr::instance() -- cgit v1.2.3