AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "ChatCommand.h"
Public Member Functions | |
ChatCommandNode () | |
Static Public Member Functions | |
static void | LoadCommandMap () |
static void | InvalidateCommandMap () |
static bool | TryExecuteCommand (ChatHandler &handler, std::string_view cmd) |
static void | SendCommandHelpFor (ChatHandler &handler, std::string_view cmd) |
static std::vector< std::string > | GetAutoCompletionsFor (ChatHandler const &handler, std::string_view cmd) |
Private Types | |
using | ChatCommandBuilder = Acore::ChatCommands::ChatCommandBuilder |
Private Member Functions | |
void | LoadFromBuilder (ChatCommandBuilder const &builder) |
ChatCommandNode (ChatCommandNode &&other)=default | |
void | ResolveNames (std::string name) |
void | SendCommandHelp (ChatHandler &handler) const |
bool | IsVisible (ChatHandler const &who) const |
bool | IsInvokerVisible (ChatHandler const &who) const |
bool | HasVisibleSubCommands (ChatHandler const &who) const |
Static Private Member Functions | |
static std::map< std::string_view, ChatCommandNode, StringCompareLessI_T > const & | GetTopLevelMap () |
static void | LoadCommandsIntoMap (ChatCommandNode *blank, std::map< std::string_view, Acore::Impl::ChatCommands::ChatCommandNode, StringCompareLessI_T > &map, Acore::ChatCommands::ChatCommandTable const &commands) |
Private Attributes | |
std::string | _name |
CommandInvoker | _invoker |
CommandPermissions | _permission |
std::variant< std::monostate, AcoreStrings, std::string > | _help |
std::map< std::string_view, ChatCommandNode, StringCompareLessI_T > | _subCommands |
Friends | |
struct | FilteredCommandListIterator |
|
private |
|
inline |
|
privatedefault |
|
static |
References _subCommands, ASSERT, Acore::Impl::ChatCommands::COMMAND_DELIMITER, StringEqualI(), Acore::StringFormat(), and Acore::Impl::ChatCommands::tokenize().
Referenced by Acore::ChatCommands::GetAutoCompletionsFor().
|
staticprivate |
References COMMAND_MAP.
|
private |
Referenced by IsVisible().
|
static |
References COMMAND_MAP.
Referenced by Acore::ChatCommands::InvalidateCommandMap().
|
private |
References ChatHandler::IsAvailable(), ChatHandler::IsConsole(), Acore::ChatCommands::No, sScriptMgr, and Acore::ChatCommands::Yes.
Referenced by IsVisible(), and TryExecuteCommand().
|
inlineprivate |
References HasVisibleSubCommands(), and IsInvokerVisible().
|
static |
References Acore::Impl::ChatCommands::COMMAND_DELIMITER, COMMAND_MAP, Field::Get(), LOG_ERROR, LOG_WARN, sScriptMgr, Acore::Tokenize(), WORLD_SEL_COMMANDS, and WorldDatabase.
Referenced by Acore::ChatCommands::LoadCommandMap().
|
staticprivate |
References ASSERT, Acore::Impl::ChatCommands::COMMAND_DELIMITER, LoadFromBuilder(), and Acore::Tokenize().
Referenced by LoadFromBuilder().
|
private |
References Acore::ChatCommands::ChatCommandBuilder::_data, _help, _invoker, _permission, _subCommands, ASSERT, and LoadCommandsIntoMap().
Referenced by LoadCommandsIntoMap().
|
private |
References Acore::Impl::ChatCommands::COMMAND_DELIMITER, and LOG_WARN.
|
private |
References LANG_CMD_HELP_GENERIC, LANG_CMD_NO_HELP_AVAILABLE, LANG_SUBCMDS_LIST, LANG_SUBCMDS_LIST_ENTRY, LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS, ChatHandler::PSendSysMessage(), and ChatHandler::SendSysMessage().
Referenced by SendCommandHelpFor(), and TryExecuteCommand().
|
static |
References _name, _subCommands, Acore::Impl::ChatCommands::COMMAND_DELIMITER, LANG_AVAILABLE_CMDS, LANG_CMD_AMBIGUOUS, LANG_CMD_INVALID, LANG_SUBCMD_AMBIGUOUS, LANG_SUBCMD_INVALID, LANG_SUBCMDS_LIST_ENTRY, LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS, ChatHandler::PSendSysMessage(), SendCommandHelp(), ChatHandler::SendSysMessage(), StringEqualI(), and Acore::Tokenize().
Referenced by Acore::ChatCommands::SendCommandHelpFor().
|
static |
References _invoker, _name, _subCommands, ASSERT, Acore::Impl::ChatCommands::COMMAND_DELIMITER, ChatHandler::GetSession(), ChatHandler::HasSentErrorMessage(), ChatHandler::IsConsole(), IsInvokerVisible(), LANG_CMD_AMBIGUOUS, LANG_SUBCMD_AMBIGUOUS, LANG_SUBCMDS_LIST_ENTRY, LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS, LogCommandUsage(), ChatHandler::PSendSysMessage(), SendCommandHelp(), ChatHandler::SetSentErrorMessage(), sScriptMgr, StringEqualI(), and Acore::Impl::ChatCommands::tokenize().
Referenced by Acore::ChatCommands::TryExecuteCommand().
|
friend |
|
private |
Referenced by LoadFromBuilder().
|
private |
Referenced by LoadFromBuilder(), and TryExecuteCommand().
|
private |
Referenced by SendCommandHelpFor(), and TryExecuteCommand().
|
private |
Referenced by LoadFromBuilder().
|
private |
Referenced by GetAutoCompletionsFor(), LoadFromBuilder(), SendCommandHelpFor(), and TryExecuteCommand().