diff options
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 17c819f2f22..361d329ac6b 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -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!"); |
