Merge pull request #4645 from Venugh/waypoint

Core/Commands: Implement .reload waypoint_data
This commit is contained in:
Shocker committed 2012-01-05 19:10:06 -08:00
commit 0412c80083
2 files changed
+18 -1

No files matched your search

@@ -0,0 +1 @@
INSERT INTO `command` (`name`, `security`, `help`) VALUES ('reload wp_data', 3, 'Syntax: .reload wp_data will reload waypoint_data table.');
+17 -1
View File
@@ -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*/)
{