mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class ChatHandler
|
|||
bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd);
|
||||
ChatCommandSearchResult FindCommand(ChatCommand* table, char const*& text, ChatCommand*& command, ChatCommand** parentCommand = NULL, std::string* cmdNamePtr = NULL, bool allAvailable = false);
|
||||
|
||||
void CheckIntergrity(ChatCommand *table, ChatCommand *parentCommand);
|
||||
void CheckIntegrity(ChatCommand *table, ChatCommand *parentCommand);
|
||||
ChatCommand* getCommandTable();
|
||||
|
||||
bool HandleAccountCommand(const char* args);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10281"
|
||||
#define REVISION_NR "10282"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue