feat(Core/Chat): new argument parsing and unify chat hyperlink parsing (#6243)

This commit is contained in:
Kargatum
2021-10-23 15:15:42 +07:00
committed by GitHub
parent 1101f9dd2a
commit bc9473482e
90 changed files with 4280 additions and 2508 deletions

View File

@@ -28,25 +28,31 @@ EndScriptData */
#include "Player.h"
#include "ScriptMgr.h"
#if AC_COMPILER == AC_COMPILER_GNU
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
using namespace Acore::ChatCommands;
class titles_commandscript : public CommandScript
{
public:
titles_commandscript() : CommandScript("titles_commandscript") { }
std::vector<ChatCommand> GetCommands() const override
ChatCommandTable GetCommands() const override
{
static std::vector<ChatCommand> titlesSetCommandTable =
static ChatCommandTable titlesSetCommandTable =
{
{ "mask", SEC_GAMEMASTER, false, &HandleTitlesSetMaskCommand, "" }
};
static std::vector<ChatCommand> titlesCommandTable =
static ChatCommandTable titlesCommandTable =
{
{ "add", SEC_GAMEMASTER, false, &HandleTitlesAddCommand, "" },
{ "current", SEC_GAMEMASTER, false, &HandleTitlesCurrentCommand, "" },
{ "remove", SEC_GAMEMASTER, false, &HandleTitlesRemoveCommand, "" },
{ "set", SEC_GAMEMASTER, false, nullptr, "", titlesSetCommandTable }
};
static std::vector<ChatCommand> commandTable =
static ChatCommandTable commandTable =
{
{ "titles", SEC_GAMEMASTER, false, nullptr, "", titlesCommandTable }
};