mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10282] Fixed typo in function name
Signed-off-by: VladimirMangos <vladimir@getmangos.com> Note: prev. commit of same author (Toinan67 is alt. nick name ;) ) Also added some more checks in ref. function.
This commit is contained in:
parent
6302659d58
commit
d631895e1c
3 changed files with 24 additions and 5 deletions
|
|
@ -725,7 +725,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
load_command_table = false;
|
||||
|
||||
// check hardcoded part integrity
|
||||
CheckIntergrity(commandTable, NULL);
|
||||
CheckIntegrity(commandTable, NULL);
|
||||
|
||||
QueryResult *result = WorldDatabase.Query("SELECT name,security,help FROM command");
|
||||
if (result)
|
||||
|
|
@ -897,7 +897,7 @@ void ChatHandler::PSendSysMessage(const char *format, ...)
|
|||
SendSysMessage(str);
|
||||
}
|
||||
|
||||
void ChatHandler::CheckIntergrity( ChatCommand *table, ChatCommand *parentCommand )
|
||||
void ChatHandler::CheckIntegrity( ChatCommand *table, ChatCommand *parentCommand )
|
||||
{
|
||||
for(uint32 i = 0; table[i].Name != NULL; ++i)
|
||||
{
|
||||
|
|
@ -912,10 +912,29 @@ void ChatHandler::CheckIntergrity( ChatCommand *table, ChatCommand *parentComman
|
|||
|
||||
if (command->ChildCommands)
|
||||
{
|
||||
if (command->Handler)
|
||||
{
|
||||
if (parentCommand)
|
||||
sLog.outError("Subcommand '%s' of command '%s' have handler and subcommands in same time, must be used '' subcommand for handler instead.",
|
||||
command->Name, parentCommand->Name);
|
||||
else
|
||||
sLog.outError("First level command '%s' have handler and subcommands in same time, must be used '' subcommand for handler instead.",
|
||||
command->Name);
|
||||
}
|
||||
|
||||
if (parentCommand && strlen(command->Name)==0)
|
||||
sLog.outError("Subcommand '' of command '%s' have subcommands", parentCommand->Name);
|
||||
|
||||
CheckIntergrity(command->ChildCommands, command);
|
||||
CheckIntegrity(command->ChildCommands, command);
|
||||
}
|
||||
else if (!command->Handler)
|
||||
{
|
||||
if (parentCommand)
|
||||
sLog.outError("Subcommand '%s' of command '%s' not have handler and subcommands in same time. Must have some from its!",
|
||||
command->Name, parentCommand->Name);
|
||||
else
|
||||
sLog.outError("First level command '%s' not have handler and subcommands in same time. Must have some from its!",
|
||||
command->Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue