summaryrefslogtreecommitdiff
path: root/src/game/Scripting/ScriptMgr.cpp
diff options
context:
space:
mode:
authorShinDarth <borzifrancesco@gmail.com>2016-08-19 20:26:58 +0200
committerShinDarth <borzifrancesco@gmail.com>2016-08-19 20:26:58 +0200
commitcb30a6b4043737957aa1d1bca27601c6577a80ec (patch)
tree2377147dbb71c8b982ea949fc5debdf4417a588a /src/game/Scripting/ScriptMgr.cpp
parent55c47f8a35a294ff702e29c49da6c81b22ec6e5a (diff)
Update chat system, based on TrinityCore commit
Diffstat (limited to 'src/game/Scripting/ScriptMgr.cpp')
-rw-r--r--src/game/Scripting/ScriptMgr.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/Scripting/ScriptMgr.cpp b/src/game/Scripting/ScriptMgr.cpp
index 1a6b44c8d9..453e0b03a1 100644
--- a/src/game/Scripting/ScriptMgr.cpp
+++ b/src/game/Scripting/ScriptMgr.cpp
@@ -20,6 +20,7 @@
#include "CreatureAI.h"
#include "Player.h"
#include "WorldPacket.h"
+#include "Chat.h"
// This is the global static registry of scripts.
/*template<class TScript>
@@ -951,12 +952,15 @@ OutdoorPvP* ScriptMgr::CreateOutdoorPvP(OutdoorPvPData const* data)
return tmpscript->GetOutdoorPvP();
}
-std::vector<ChatCommand*> ScriptMgr::GetChatCommands()
+std::vector<ChatCommand> ScriptMgr::GetChatCommands()
{
- std::vector<ChatCommand*> table;
+ std::vector<ChatCommand> table;
FOR_SCRIPTS_RET(CommandScript, itr, end, table)
- table.push_back(itr->second->GetCommands());
+ {
+ std::vector<ChatCommand> cmds = itr->second->GetCommands();
+ table.insert(table.end(), cmds.begin(), cmds.end());
+ }
return table;
}