diff options
author | Carbenium <carbenium@outlook.com> | 2020-07-26 01:01:30 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-23 23:56:25 +0100 |
commit | b8a3ab880f9b5cc67a108dd34f3883b1902b165a (patch) | |
tree | be25a4adfb9ab1a915ea729788d1a77883995d84 | |
parent | 58e1c091a2879f8f8930018d2e68027cfefe423b (diff) |
Core/Misc: Use std::chrono overload of Creature::DespawnOrUnsummon
(cherry picked from commit c39eb9b5041950ce3af89f82848bd3e1f3a6e0af)
-rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 2 | ||||
-rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Maps/MapScripts.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 10b1e8d9577..12608afc461 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -615,7 +615,7 @@ void BossAI::_DespawnAtEvade(Seconds delayToRespawn /*= 30s*/, Creature* who /*= return; } - who->DespawnOrUnsummon(0, delayToRespawn); + who->DespawnOrUnsummon(0s, delayToRespawn); if (instance && who == me) instance->SetBossState(_bossId, FAIL); diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index a5ec66c7252..c305a5e3f6f 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -225,7 +225,7 @@ void EscortAI::UpdateAI(uint32 diff) if (_instantRespawn) { if (!isEscort) - me->DespawnOrUnsummon(0, 1s); + me->DespawnOrUnsummon(0s, 1s); else me->GetMap()->Respawn(SPAWN_TYPE_CREATURE, me->GetSpawnId()); } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index cfea52352f4..32b86ff0990 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -298,7 +298,7 @@ CreatureBaseStats const* CreatureBaseStats::GetBaseStats(uint8 level, uint8 unit bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) { - m_owner.DespawnOrUnsummon(0, m_respawnTimer); // since we are here, we are not TempSummon as object type cannot change during runtime + m_owner.DespawnOrUnsummon(0s, m_respawnTimer); // since we are here, we are not TempSummon as object type cannot change during runtime return true; } diff --git a/src/server/game/Maps/MapScripts.cpp b/src/server/game/Maps/MapScripts.cpp index 8c5b7a91efe..a451287a025 100644 --- a/src/server/game/Maps/MapScripts.cpp +++ b/src/server/game/Maps/MapScripts.cpp @@ -742,7 +742,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_DESPAWN_SELF: // First try with target or source creature, then with target or source gameobject if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true)) - cSource->DespawnOrUnsummon(step.script->DespawnSelf.DespawnDelay); + cSource->DespawnOrUnsummon(Milliseconds(step.script->DespawnSelf.DespawnDelay)); else if (GameObject* goSource = _GetScriptGameObjectSourceOrTarget(source, target, step.script, true)) goSource->DespawnOrUnsummon(Milliseconds(step.script->DespawnSelf.DespawnDelay)); break; |