mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripts: Extended escort AI
This commit is contained in:
@@ -42,6 +42,8 @@ struct ScriptPointMove
|
||||
uint32 uiWaitTime;
|
||||
};
|
||||
|
||||
typedef std::vector<ScriptPointMove> ScriptPointVector;
|
||||
|
||||
struct StringTextData
|
||||
{
|
||||
uint32 uiSoundId;
|
||||
@@ -55,10 +57,11 @@ class SystemMgr
|
||||
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
|
||||
SystemMgr() {}
|
||||
~SystemMgr() {}
|
||||
|
||||
public:
|
||||
//Maps and lists
|
||||
typedef UNORDERED_MAP<int32, StringTextData> TextDataMap;
|
||||
typedef UNORDERED_MAP<uint32, std::vector<ScriptPointMove> > PointMoveMap;
|
||||
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
|
||||
|
||||
//Database
|
||||
void LoadVersion();
|
||||
@@ -67,9 +70,9 @@ class SystemMgr
|
||||
void LoadScriptWaypoints();
|
||||
|
||||
//Retrive from storage
|
||||
StringTextData const* GetTextData(int32 uiTextId) const
|
||||
StringTextData const* GetTextData(int32 textId) const
|
||||
{
|
||||
TextDataMap::const_iterator itr = m_mTextDataMap.find(uiTextId);
|
||||
TextDataMap::const_iterator itr = m_mTextDataMap.find(textId);
|
||||
|
||||
if (itr == m_mTextDataMap.end())
|
||||
return NULL;
|
||||
@@ -77,14 +80,14 @@ class SystemMgr
|
||||
return &itr->second;
|
||||
}
|
||||
|
||||
std::vector<ScriptPointMove> const &GetPointMoveList(uint32 uiCreatureEntry) const
|
||||
ScriptPointVector const& GetPointMoveList(uint32 creatureEntry) const
|
||||
{
|
||||
static std::vector<ScriptPointMove> vEmpty;
|
||||
static ScriptPointVector empty;
|
||||
|
||||
PointMoveMap::const_iterator itr = m_mPointMoveMap.find(uiCreatureEntry);
|
||||
PointMoveMap::const_iterator itr = m_mPointMoveMap.find(creatureEntry);
|
||||
|
||||
if (itr == m_mPointMoveMap.end())
|
||||
return vEmpty;
|
||||
return empty;
|
||||
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user