mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
Merge branch 'threading_rewrite' of https://github.com/ShinDarth/azerothcore-wotlk into threading_rewrite
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ class CommandScript : public ScriptObject
|
||||
public:
|
||||
|
||||
// Should return a pointer to a valid command table (ChatCommand array) to be used by ChatHandler.
|
||||
virtual ChatCommand* GetCommands() const = 0;
|
||||
virtual std::vector<ChatCommand> GetCommands() const = 0;
|
||||
};
|
||||
|
||||
class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
|
||||
@@ -969,7 +969,7 @@ class ScriptMgr
|
||||
|
||||
public: /* CommandScript */
|
||||
|
||||
std::vector<ChatCommand*> GetChatCommands();
|
||||
std::vector<ChatCommand> GetChatCommands();
|
||||
|
||||
public: /* WeatherScript */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user