Core/Commands: Make vehicle_accessory and vehicle_template_accessory reloadable with commands
This commit is contained in:
@@ -650,6 +650,8 @@ INSERT INTO `command` VALUES
|
||||
('reload spell_target_position',3,'Syntax: .reload spell_target_position\nReload spell_target_position table.'),
|
||||
('reload spell_threats',3,'Syntax: .reload spell_threats\nReload spell_threats table.'),
|
||||
('reload trinity_string',3,'Syntax: .reload trinity_string\nReload trinity_string table.'),
|
||||
('reload vehicle_accessory', 3, 'Syntax: .reload vehicle_accessory\n\nReloads GUID-based vehicle accessory definitions from the database.'),
|
||||
('reload vehicle_template_accessory', 3, 'Syntax: .reload vehicle_template_accessory\n\nReloads entry-based vehicle accessory definitions from the database.'),
|
||||
('reload waypoint_scripts',3,'Syntax: .reload waypoint_scripts\nReload waypoint_scripts table.'),
|
||||
('repairitems',2,'Syntax: .repairitems\r\n\r\nRepair all selected player''s items.'),
|
||||
('reset',3,'Syntax: .reset $subcommand\nType .reset to see the list of possible subcommands or .help reset $subcommand to see info on subcommands'),
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `command` WHERE `name` IN('reload vehicle_accessory','reload vehicle_template_accessory');
|
||||
INSERT INTO `command` (`name`,`security`,`help`) VALUES
|
||||
('reload vehicle_accessory', 3, 'Syntax: .reload vehicle_accessory\n\nReloads GUID-based vehicle accessory definitions from the database.'),
|
||||
('reload vehicle_template_accessory', 3, 'Syntax: .reload vehicle_template_accessory\n\nReloads entry-based vehicle accessory definitions from the database.');
|
||||
@@ -151,6 +151,8 @@ public:
|
||||
{ "spell_group_stack_rules", SEC_ADMINISTRATOR, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL },
|
||||
{ "trinity_string", SEC_ADMINISTRATOR, true, &HandleReloadTrinityStringCommand, "", NULL },
|
||||
{ "waypoint_scripts", SEC_ADMINISTRATOR, true, &HandleReloadWpScriptsCommand, "", NULL },
|
||||
{ "vehicle_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleAccessoryCommand, "", NULL },
|
||||
{ "vehicle_template_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleTemplateAccessoryCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
static ChatCommand commandTable[] =
|
||||
@@ -190,6 +192,9 @@ public:
|
||||
HandleReloadTrinityStringCommand(handler,"");
|
||||
HandleReloadGameTeleCommand(handler,"");
|
||||
|
||||
HandleReloadVehicleAccessoryCommand(handler, "");
|
||||
HandleReloadVehicleTemplateAccessoryCommand(handler, "");
|
||||
|
||||
HandleReloadAutobroadcastCommand(handler,"");
|
||||
return true;
|
||||
}
|
||||
@@ -1273,6 +1278,22 @@ public:
|
||||
handler->SendGlobalGMSysMessage("Smart Scripts reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadVehicleAccessoryCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Reloading vehicle_accessory table...");
|
||||
sObjectMgr->LoadVehicleAccessories();
|
||||
handler->SendGlobalGMSysMessage("Vehicle accessories reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadVehicleTemplateAccessoryCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Reloading vehicle_template_accessory table...");
|
||||
sObjectMgr->LoadVehicleTemplateAccessories();
|
||||
handler->SendGlobalGMSysMessage("Vehicle template accessories reloaded.");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_reload_commandscript()
|
||||
|
||||
Reference in New Issue
Block a user