mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Commands: Implemented .reload waypoint_data command. (requests from Aokromes.)
This commit is contained in:
1
sql/updates/world/2012_01_05_14_world_command.sql
Normal file
1
sql/updates/world/2012_01_05_14_world_command.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO `command` (`name`, `security`, `help`) VALUES ('reload wp_data', 3, 'Syntax: .reload wp_data will reload waypoint_data table.');
|
||||
@@ -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*/)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user