Core/Scripts: Changed chat command handlers to take ChatHandler* as an argument, instead of as 'this'.

Fixes commandscripts so it can be used to add custom commands without editing chat.h, chat.cpp or levelX.cpp files.

Patch by Accel
Closes issue 4629

--HG--
branch : trunk
This commit is contained in:
Spp
2010-11-03 08:30:40 +01:00
parent 51f17678de
commit 38ae2062d9
2 changed files with 459 additions and 452 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -38,7 +38,7 @@ class ChatCommand
const char * Name;
uint32 SecurityLevel; // function pointer required correct align (use uint32)
bool AllowConsole;
bool (ChatHandler::*Handler)(const char* args);
bool (*Handler)(ChatHandler*, const char* args);
std::string Help;
ChatCommand * ChildCommands;
};