Core/Warden: Add reload ability for character.warden_action table / Centralize the crypto keys in one header file

This commit is contained in:
leak
2012-02-25 22:05:47 +01:00
parent f0d0d95cf9
commit 1ebdc5c19c
6 changed files with 1279 additions and 1226 deletions

View File

@@ -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!");