mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 12:12:34 -04:00
[3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)
(cherry picked from commit 1eca51b417)
This commit is contained in:
@@ -56,6 +56,10 @@
|
||||
#undef GetClassName
|
||||
#endif
|
||||
|
||||
#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
using namespace Trinity::ChatCommands;
|
||||
|
||||
class misc_commandscript : public CommandScript
|
||||
@@ -603,7 +607,7 @@ public:
|
||||
|
||||
static bool HandleCommandsCommand(ChatHandler* handler)
|
||||
{
|
||||
handler->ShowHelpForCommand(ChatHandler::getCommandTable(), "");
|
||||
Trinity::ChatCommands::SendCommandHelpFor(*handler, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -694,19 +698,9 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleHelpCommand(ChatHandler* handler, Tail cmdArg)
|
||||
static bool HandleHelpCommand(ChatHandler* handler, Tail cmd)
|
||||
{
|
||||
if (cmdArg.empty())
|
||||
{
|
||||
handler->ShowHelpForCommand(ChatHandler::getCommandTable(), "help");
|
||||
handler->ShowHelpForCommand(ChatHandler::getCommandTable(), "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!handler->ShowHelpForCommand(ChatHandler::getCommandTable(), std::string(cmdArg).c_str()))
|
||||
handler->SendSysMessage(LANG_NO_HELP_CMD);
|
||||
}
|
||||
|
||||
Trinity::ChatCommands::SendCommandHelpFor(*handler, cmd);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user