diff options
author | Shocker <shocker@freakz.ro> | 2012-01-05 19:10:06 -0800 |
---|---|---|
committer | Shocker <shocker@freakz.ro> | 2012-01-05 19:10:06 -0800 |
commit | 0412c800838f2d3fdad087211ba8b8b25d8b5d78 (patch) | |
tree | bce3b675746f6d0b04796d2ef9c6c52e161dc366 /src | |
parent | 981777197307cbdb63a5f212319890ecf8760c90 (diff) | |
parent | b7959716ea30e11598c16ddd3e072893d81bd71d (diff) |
Merge pull request #4645 from Venugh/waypoint
Core/Commands: Implement .reload waypoint_data
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index b1aaf82e35b..4d8ce4ef4ed 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -36,6 +36,7 @@ EndScriptData */ #include "SkillDiscovery.h" #include "SkillExtraItems.h" #include "Chat.h" +#include "WaypointManager.h" class reload_commandscript : public CommandScript { @@ -144,13 +145,14 @@ public: { "spell_linked_spell", SEC_ADMINISTRATOR, true, &HandleReloadSpellLinkedSpellCommand, "", NULL }, { "spell_pet_auras", SEC_ADMINISTRATOR, true, &HandleReloadSpellPetAurasCommand, "", NULL }, { "spell_proc_event", SEC_ADMINISTRATOR, true, &HandleReloadSpellProcEventCommand, "", NULL }, - { "spell_proc", SEC_ADMINISTRATOR, true, &HandleReloadSpellProcsCommand, "", NULL }, + { "spell_proc", SEC_ADMINISTRATOR, true, &HandleReloadSpellProcsCommand, "", NULL }, { "spell_scripts", SEC_ADMINISTRATOR, true, &HandleReloadSpellScriptsCommand, "", NULL }, { "spell_target_position", SEC_ADMINISTRATOR, true, &HandleReloadSpellTargetPositionCommand, "", NULL }, { "spell_threats", SEC_ADMINISTRATOR, true, &HandleReloadSpellThreatsCommand, "", NULL }, { "spell_group_stack_rules", SEC_ADMINISTRATOR, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL }, { "trinity_string", SEC_ADMINISTRATOR, true, &HandleReloadTrinityStringCommand, "", NULL }, { "waypoint_scripts", SEC_ADMINISTRATOR, true, &HandleReloadWpScriptsCommand, "", NULL }, + { "waypoint_data", SEC_ADMINISTRATOR, true, &HandleReloadWpCommand, "", NULL }, { "vehicle_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleAccessoryCommand, "", NULL }, { "vehicle_template_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleTemplateAccessoryCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } @@ -264,6 +266,7 @@ public: handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded."); HandleReloadDbScriptStringCommand(handler, "a"); HandleReloadWpScriptsCommand(handler, "a"); + HandleReloadWpCommand(handler, "a"); return true; } @@ -986,6 +989,19 @@ public: return true; } + static bool HandleReloadWpCommand(ChatHandler* handler, const char* args) + { + if (*args != 'a') + sLog->outString("Re-Loading Waypoints data from 'waypoints_data'"); + + sWaypointMgr->Load(); + + if (*args != 'a') + sLog->outString("DB Table 'waypoint_data' reloaded."); + + return true; + } + static bool HandleReloadEventAITextsCommand(ChatHandler* handler, const char* /*args*/) { |