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

(cherry picked from commit 1eca51b417)
This commit is contained in:
Treeston
2020-09-20 02:50:38 +02:00
committed by Shauren
parent 7a2c3af988
commit 3fd2eb126c
57 changed files with 1360 additions and 1294 deletions
+11 -3
View File
@@ -51,6 +51,10 @@ EndScriptData */
#include "WaypointManager.h"
#include "World.h"
#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
class reload_commandscript : public CommandScript
{
public:
@@ -408,9 +412,13 @@ public:
static bool HandleReloadCommandCommand(ChatHandler* handler, char const* /*args*/)
{
ChatHandler::invalidateCommandTable();
handler->SendGlobalGMSysMessage("DB table `command` will be reloaded at next chat command use.");
return true;
TC_LOG_INFO("misc", "Reloading .command information...");
Trinity::ChatCommands::LoadCommandMap();
handler->SendGlobalGMSysMessage("DB table `command` reloaded.");
// do not log this invocation, otherwise we might crash (the command table we used to get here is no longer valid!)
handler->SetSentErrorMessage(true);
return false;
}
static bool HandleReloadOnKillReputationCommand(ChatHandler* handler, char const* /*args*/)