diff options
Diffstat (limited to 'src')
8 files changed, 10 insertions, 9 deletions
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 1302028313c..44ea37c2361 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -523,7 +523,7 @@ void InstanceScript::DoCloseDoorOrButton(ObjectGuid guid) TC_LOG_DEBUG("scripts", "InstanceScript: DoCloseDoorOrButton failed"); } -void InstanceScript::DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn /*= MINUTE*/) +void InstanceScript::DoRespawnGameObject(ObjectGuid guid, Seconds timeToDespawn /*= 1min */) { if (GameObject* go = instance->GetGameObject(guid)) { @@ -543,7 +543,7 @@ void InstanceScript::DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn / if (go->isSpawned()) return; - go->SetRespawnTime(timeToDespawn); + go->SetRespawnTime(timeToDespawn.count()); } else TC_LOG_DEBUG("scripts", "InstanceScript: DoRespawnGameObject failed"); diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 80b084831c4..93eb5040c44 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -20,6 +20,7 @@ #include "ZoneScript.h" #include "Common.h" +#include "Duration.h" #include <map> #include <memory> #include <set> @@ -210,7 +211,7 @@ class TC_GAME_API InstanceScript : public ZoneScript void DoCloseDoorOrButton(ObjectGuid guid); // Respawns a GO having negative spawntimesecs in gameobject-table - void DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn = MINUTE); + void DoRespawnGameObject(ObjectGuid guid, Seconds timeToDespawn = 1min); // Sends world state update to all players in instance void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp index 8132a4038f4..6086221ca1a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp @@ -81,7 +81,7 @@ class boss_gloomrel : public CreatureScript case GOSSIP_ACTION_INFO_DEF + 22: CloseGossipMenuFor(player); //are 5 minutes expected? go template may have data to despawn when used at quest - instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), MINUTE * 5); + instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), 5min); break; } return true; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index 221ea01c4b6..4ecc87e962c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -415,7 +415,7 @@ public: void TombOfSevenEnd() { - DoRespawnGameObject(GoChestGUID, DAY); + DoRespawnGameObject(GoChestGUID, 24h); HandleGameObject(GoTombExitGUID, true);//event done, open exit door HandleGameObject(GoTombEnterGUID, true);//event done, open entrance door TombEventStarterGUID.Clear(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp index dcaed26d98c..5b2142e2a65 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -133,7 +133,7 @@ class instance_molten_core : public InstanceMapScript SummonMajordomoExecutus(); if (bossId == BOSS_MAJORDOMO_EXECUTUS && state == DONE) - DoRespawnGameObject(_cacheOfTheFirelordGUID, 7 * DAY); + DoRespawnGameObject(_cacheOfTheFirelordGUID, 7_days); return true; } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index c3233c521af..9284e50e764 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -168,7 +168,7 @@ public: break; case DATA_CHESS: if (state == DONE) - DoRespawnGameObject(DustCoveredChest, DAY); + DoRespawnGameObject(DustCoveredChest, 24h); break; default: break; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 295fa2bbf33..05b581840f1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -216,7 +216,7 @@ public: for (GuidList::const_iterator itr = m_uiAncientGemGUID.begin(); itr != m_uiAncientGemGUID.end(); ++itr) { //don't know how long it expected - DoRespawnGameObject(*itr, DAY); + DoRespawnGameObject(*itr, 24h); } } } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index fd21dc474d9..6aaa300a085 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -208,7 +208,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_DEFEAT_FACTION_CHAMPIONS); if (ResilienceWillFixItTimer > 0) DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_CHAMPIONS_KILLED_IN_MINUTE); - DoRespawnGameObject(GetGuidData(DATA_CRUSADERS_CHEST), 7*DAY); + DoRespawnGameObject(GetGuidData(DATA_CRUSADERS_CHEST), 7_days); if (GameObject* cache = GetGameObject(DATA_CRUSADERS_CHEST)) cache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (Creature* fordring = GetCreature(DATA_FORDRING)) |