[3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)

(cherry picked from commit 1eca51b417678b9a48b28552925d5694105f82bb)
This commit is contained in:
Treeston
2022-02-27 20:08:41 +01:00
committed by Shauren
parent 7a2c3af988
commit 3fd2eb126c
57 changed files with 1360 additions and 1294 deletions
@@ -30,20 +30,18 @@ EndScriptData */
#include "Player.h"
#include "RBAC.h"
using namespace Trinity::ChatCommands;
class achievement_commandscript : public CommandScript
{
public:
achievement_commandscript() : CommandScript("achievement_commandscript") { }
std::vector<ChatCommand> GetCommands() const override
ChatCommandTable GetCommands() const override
{
static std::vector<ChatCommand> achievementCommandTable =
static ChatCommandTable commandTable =
{
{ "add", rbac::RBAC_PERM_COMMAND_ACHIEVEMENT_ADD, false, &HandleAchievementAddCommand, "" },
};
static std::vector<ChatCommand> commandTable =
{
{ "achievement", rbac::RBAC_PERM_COMMAND_ACHIEVEMENT, false, nullptr, "", achievementCommandTable },
{ "achievement add", HandleAchievementAddCommand, rbac::RBAC_PERM_COMMAND_ACHIEVEMENT_ADD, Console::No },
};
return commandTable;
}