mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Warden: Add reload ability for character.warden_action table / Centralize the crypto keys in one header file
This commit is contained in:
@@ -37,6 +37,7 @@ EndScriptData */
|
||||
#include "SkillExtraItems.h"
|
||||
#include "Chat.h"
|
||||
#include "WaypointManager.h"
|
||||
#include "WardenCheckMgr.h"
|
||||
|
||||
class reload_commandscript : public CommandScript
|
||||
{
|
||||
@@ -151,6 +152,7 @@ public:
|
||||
{ "spell_threats", SEC_ADMINISTRATOR, true, &HandleReloadSpellThreatsCommand, "", NULL },
|
||||
{ "spell_group_stack_rules", SEC_ADMINISTRATOR, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL },
|
||||
{ "trinity_string", SEC_ADMINISTRATOR, true, &HandleReloadTrinityStringCommand, "", NULL },
|
||||
{ "warden_action", SEC_ADMINISTRATOR, true, &HandleReloadWardenActionCommand, "", NULL },
|
||||
{ "waypoint_scripts", SEC_ADMINISTRATOR, true, &HandleReloadWpScriptsCommand, "", NULL },
|
||||
{ "waypoint_data", SEC_ADMINISTRATOR, true, &HandleReloadWpCommand, "", NULL },
|
||||
{ "vehicle_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleAccessoryCommand, "", NULL },
|
||||
@@ -724,6 +726,21 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadWardenActionCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
|
||||
{
|
||||
handler->SendSysMessage("Warden system disabled by config - reloading warden_action skipped.");
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
sLog->outString("Re-Loading warden_action Table!");
|
||||
sWardenCheckMgr->LoadWardenOverrides();
|
||||
handler->SendGlobalGMSysMessage("DB table `warden_action` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadNpcTrainerCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `npc_trainer` Table!");
|
||||
|
||||
Reference in New Issue
Block a user