Core/Commands: Make vehicle_accessory and vehicle_template_accessory reloadable with commands

This commit is contained in:
Machiavelli
2011-03-07 20:25:56 +01:00
parent 27680e420f
commit 311d0cf989
3 changed files with 27 additions and 0 deletions
+21
View File
@@ -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()