Script/Commands: implemented .reload battleground_template (#210)

- Closes #28
This commit is contained in:
HeartWell
2016-10-29 11:33:23 +02:00
committed by ShinDarth
parent 9d11582283
commit cd9add3ddc
2 changed files with 16 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ EndScriptData */
#include "AchievementMgr.h"
#include "AuctionHouseMgr.h"
#include "BattlegroundMgr.h"
#include "Chat.h"
#include "CreatureTextMgr.h"
#include "DisableMgr.h"
@@ -61,6 +62,7 @@ public:
{ "areatrigger_tavern", SEC_ADMINISTRATOR, true, &HandleReloadAreaTriggerTavernCommand, "" },
{ "areatrigger_teleport", SEC_ADMINISTRATOR, true, &HandleReloadAreaTriggerTeleportCommand, "" },
{ "autobroadcast", SEC_ADMINISTRATOR, true, &HandleReloadAutobroadcastCommand, "" },
{ "battleground_template", SEC_ADMINISTRATOR, true, &HandleReloadBattlegroundTemplate, "" },
{ "command", SEC_ADMINISTRATOR, true, &HandleReloadCommandCommand, "" },
{ "conditions", SEC_ADMINISTRATOR, true, &HandleReloadConditions, "" },
{ "config", SEC_ADMINISTRATOR, true, &HandleReloadConfigCommand, "" },
@@ -179,6 +181,15 @@ public:
HandleReloadVehicleTemplateAccessoryCommand(handler, "");
HandleReloadAutobroadcastCommand(handler, "");
HandleReloadBattlegroundTemplate(handler, "");
return true;
}
static bool HandleReloadBattlegroundTemplate(ChatHandler* handler, char const* /*args*/)
{
sLog->outString("Re-Loading Battleground Templates...");
sBattlegroundMgr->CreateInitialBattlegrounds();
handler->SendGlobalGMSysMessage("DB table `battleground_template` reloaded.");
return true;
}