diff options
-rw-r--r-- | sql/updates/world/2012_01_05_14_world_command.sql | 1 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 18 |
2 files changed, 18 insertions, 1 deletions
diff --git a/sql/updates/world/2012_01_05_14_world_command.sql b/sql/updates/world/2012_01_05_14_world_command.sql new file mode 100644 index 00000000000..875acde19bb --- /dev/null +++ b/sql/updates/world/2012_01_05_14_world_command.sql @@ -0,0 +1 @@ +INSERT INTO `command` (`name`, `security`, `help`) VALUES ('reload wp_data', 3, 'Syntax: .reload wp_data will reload waypoint_data table.');
\ No newline at end of file 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*/) { |