mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Script/Commands: Make creature_summon_groups table reloadable.
This commit is contained in:
4
sql/updates/world/2013_02_24_05_world_command.sql
Normal file
4
sql/updates/world/2013_02_24_05_world_command.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `command` WHERE `name` = 'reload creature_summon_groups';
|
||||
INSERT INTO `command` (`name`,`security`,`help`) VALUES
|
||||
('reload creature_summon_groups',3,'Syntax: .reload creature_summon_groups
|
||||
Reload creature_summon_groups table.');
|
||||
@@ -1425,6 +1425,8 @@ void ObjectMgr::LoadTempSummons()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
_tempSummonDataStore.clear(); // needed for reload case
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9
|
||||
QueryResult result = WorldDatabase.Query("SELECT summonerId, summonerType, groupId, entry, position_x, position_y, position_z, orientation, summonType, summonTime FROM creature_summon_groups");
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
{ "creature_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesCreatureCommand, "", NULL },
|
||||
{ "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &HandleReloadOnKillReputationCommand, "", NULL },
|
||||
{ "creature_questrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestRelationsCommand, "", NULL },
|
||||
{ "creature_summon_groups", SEC_ADMINISTRATOR, true, &HandleReloadCreatureSummonGroupsCommand, "", NULL },
|
||||
{ "creature_template", SEC_ADMINISTRATOR, true, &HandleReloadCreatureTemplateCommand, "", NULL },
|
||||
//{ "db_script_string", SEC_ADMINISTRATOR, true, &HandleReloadDbScriptStringCommand, "", NULL },
|
||||
{ "disables", SEC_ADMINISTRATOR, true, &HandleReloadDisablesCommand, "", NULL },
|
||||
@@ -195,6 +196,8 @@ public:
|
||||
HandleReloadTrinityStringCommand(handler, "");
|
||||
HandleReloadGameTeleCommand(handler, "");
|
||||
|
||||
HandleReloadCreatureSummonGroupsCommand(handler, "");
|
||||
|
||||
HandleReloadVehicleAccessoryCommand(handler, "");
|
||||
HandleReloadVehicleTemplateAccessoryCommand(handler, "");
|
||||
|
||||
@@ -397,6 +400,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadCreatureSummonGroupsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Reloading creature summon groups...");
|
||||
sObjectMgr->LoadTempSummons();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_summon_groups` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadCreatureTemplateCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
|
||||
Reference in New Issue
Block a user