From e660b870e95cb8289fc9f82fe53e8b6637a46594 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sat, 25 Jul 2020 21:25:28 +0200 Subject: Core/ScriptedAI: std::chrono-ify DoSpawnCreature (cherry picked from commit f5076112cb25bff877a450a14fe20172e9044081) --- .../CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp | 2 +- .../Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp | 10 +++++----- src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp | 2 +- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 4 ++-- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/server/scripts/Kalimdor') diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index fa9d4b3164f..96b5e1786d5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -387,7 +387,7 @@ public: events.ScheduleEvent(EVENT_DISTANCE_CHECK, 5s); break; case EVENT_SUMMON_WHISP: - DoSpawnCreature(NPC_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + DoSpawnCreature(NPC_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15s); ++WispCount; if (WispCount >= 30) me->KillSelf(); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index db477b36a6f..19e37c8071b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -790,15 +790,15 @@ public: switch (urand(0, 2)) { case 0: - DoSpawnCreature(17902, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000); - DoSpawnCreature(17902, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000); + DoSpawnCreature(17902, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s); + DoSpawnCreature(17902, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s); break; case 1: - DoSpawnCreature(17903, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000); - DoSpawnCreature(17903, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000); + DoSpawnCreature(17903, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s); + DoSpawnCreature(17903, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s); break; case 2: - DoSpawnCreature(RAND(17902, 17903), 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000); + DoSpawnCreature(RAND(17902, 17903), 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s); break; } } diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp index 4a2e11d2e0b..e2d3e56d161 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp @@ -73,7 +73,7 @@ public: void SummonAdds(Unit* victim) { - if (Creature* Add = DoSpawnCreature(13456, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000)) + if (Creature* Add = DoSpawnCreature(13456, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90s)) Add->AI()->AttackStart(victim); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 1526ffd69b2..00c1d0ddcd8 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -229,7 +229,7 @@ public: void SpawnEyeTentacle(float x, float y) { - if (Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500)) + if (Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500ms)) if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) if (Spawned->AI()) Spawned->AI()->AttackStart(target); @@ -531,7 +531,7 @@ public: void SpawnEyeTentacle(float x, float y) { - Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500); + Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500ms); if (Spawned && Spawned->AI()) if (Unit* target = SelectRandomNotStomach()) Spawned->AI()->AttackStart(target); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index 1bae3854a33..9076538146d 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -98,7 +98,7 @@ public: case 1: RandY = 0.0f + Rand; break; } Rand = 0; - Creature* Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + Creature* Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30s); if (Spawn) Spawn->AI()->AttackStart(victim); } -- cgit v1.2.3