Core/Commands: Refactored chat command script hook, fixes a crash when building with gcc 5

Closes #15616
Closes #15740

(cherry picked from commit 2d942ddcc528cc9fe718ebbd5903318fcbdab817)

Conflicts:
	src/server/game/Chat/Chat.cpp
	src/server/scripts/Commands/cs_battlenet_account.cpp
	src/server/scripts/Commands/cs_cast.cpp
	src/server/scripts/Commands/cs_debug.cpp
	src/server/scripts/Commands/cs_go.cpp
	src/server/scripts/Commands/cs_misc.cpp
	src/server/scripts/Commands/cs_mmaps.cpp
	src/server/scripts/Commands/cs_npc.cpp
	src/server/scripts/Commands/cs_reload.cpp
	src/server/scripts/Commands/cs_ticket.cpp
This commit is contained in:
Shauren authored and ariel- committed 2016-01-11 01:51:52 -03:00
1 parent 1a5b0067a3
commit af41a70fe8
47 files changed
+760 -1004

No files matched your search

+7 -9
View File
@@ -33,20 +33,18 @@ class event_commandscript : public CommandScript
public:
event_commandscript() : CommandScript("event_commandscript") { }
ChatCommand* GetCommands() const override
std::vector<ChatCommand> GetCommands() const override
{
static ChatCommand eventCommandTable[] =
static std::vector<ChatCommand> eventCommandTable =
{
{ "activelist", rbac::RBAC_PERM_COMMAND_EVENT_ACTIVELIST, true, &HandleEventActiveListCommand, "", NULL },
{ "start", rbac::RBAC_PERM_COMMAND_EVENT_START, true, &HandleEventStartCommand, "", NULL },
{ "stop", rbac::RBAC_PERM_COMMAND_EVENT_STOP, true, &HandleEventStopCommand, "", NULL },
{ "", rbac::RBAC_PERM_COMMAND_EVENT, true, &HandleEventInfoCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
{ "activelist", rbac::RBAC_PERM_COMMAND_EVENT_ACTIVELIST, true, &HandleEventActiveListCommand, "" },
{ "start", rbac::RBAC_PERM_COMMAND_EVENT_START, true, &HandleEventStartCommand, "" },
{ "stop", rbac::RBAC_PERM_COMMAND_EVENT_STOP, true, &HandleEventStopCommand, "" },
{ "", rbac::RBAC_PERM_COMMAND_EVENT, true, &HandleEventInfoCommand, "" },
};
static ChatCommand commandTable[] =
static std::vector<ChatCommand> commandTable =
{
{ "event", rbac::RBAC_PERM_COMMAND_EVENT, false, NULL, "", eventCommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
return commandTable;
}