From 5a5b232a44b4bd7cdec7e23999d5edbba1891761 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 27 Jun 2021 01:13:20 +0200 Subject: Scripts/Commands: Convert honor command table to new system --- src/server/scripts/Commands/cs_honor.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp index 2e06b3b0fe8..18e186ad38c 100644 --- a/src/server/scripts/Commands/cs_honor.cpp +++ b/src/server/scripts/Commands/cs_honor.cpp @@ -29,32 +29,30 @@ EndScriptData */ #include "RBAC.h" #include "WorldSession.h" -#if TRINITY_COMPILER == TRINITY_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif +using namespace Trinity::ChatCommands; class honor_commandscript : public CommandScript { public: honor_commandscript() : CommandScript("honor_commandscript") { } - std::vector GetCommands() const override + ChatCommandTable GetCommands() const override { - static std::vector honorAddCommandTable = + static ChatCommandTable honorAddCommandTable = { - { "kill", rbac::RBAC_PERM_COMMAND_HONOR_ADD_KILL, false, &HandleHonorAddKillCommand, "" }, - { "", rbac::RBAC_PERM_COMMAND_HONOR_ADD, false, &HandleHonorAddCommand, "" }, + { "kill", HandleHonorAddKillCommand, rbac::RBAC_PERM_COMMAND_HONOR_ADD_KILL, Console::No }, + { "", HandleHonorAddCommand, rbac::RBAC_PERM_COMMAND_HONOR_ADD, Console::No }, }; - static std::vector honorCommandTable = + static ChatCommandTable honorCommandTable = { - { "add", rbac::RBAC_PERM_COMMAND_HONOR_ADD, false, nullptr, "", honorAddCommandTable }, - { "update", rbac::RBAC_PERM_COMMAND_HONOR_UPDATE, false, &HandleHonorUpdateCommand, "" }, + { "add", honorAddCommandTable }, + { "update", HandleHonorUpdateCommand, rbac::RBAC_PERM_COMMAND_HONOR_UPDATE, Console::No }, }; - static std::vector commandTable = + static ChatCommandTable commandTable = { - { "honor", rbac::RBAC_PERM_COMMAND_HONOR, false, nullptr, "", honorCommandTable }, + { "honor", honorCommandTable }, }; return commandTable; } -- cgit v1.2.3