Core/Misc: Use std::chrono overload of Creature::DespawnOrUnsummon
(cherry picked from commit c39eb9b5041950ce3af89f82848bd3e1f3a6e0af)
This commit is contained in:
@@ -615,7 +615,7 @@ void BossAI::_DespawnAtEvade(Seconds delayToRespawn /*= 30s*/, Creature* who /*=
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
who->DespawnOrUnsummon(0, delayToRespawn);
|
who->DespawnOrUnsummon(0s, delayToRespawn);
|
||||||
|
|
||||||
if (instance && who == me)
|
if (instance && who == me)
|
||||||
instance->SetBossState(_bossId, FAIL);
|
instance->SetBossState(_bossId, FAIL);
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ void EscortAI::UpdateAI(uint32 diff)
|
|||||||
if (_instantRespawn)
|
if (_instantRespawn)
|
||||||
{
|
{
|
||||||
if (!isEscort)
|
if (!isEscort)
|
||||||
me->DespawnOrUnsummon(0, 1s);
|
me->DespawnOrUnsummon(0s, 1s);
|
||||||
else
|
else
|
||||||
me->GetMap()->Respawn(SPAWN_TYPE_CREATURE, me->GetSpawnId());
|
me->GetMap()->Respawn(SPAWN_TYPE_CREATURE, me->GetSpawnId());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ CreatureBaseStats const* CreatureBaseStats::GetBaseStats(uint8 level, uint8 unit
|
|||||||
|
|
||||||
bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -742,7 +742,7 @@ void Map::ScriptsProcess()
|
|||||||
case SCRIPT_COMMAND_DESPAWN_SELF:
|
case SCRIPT_COMMAND_DESPAWN_SELF:
|
||||||
// First try with target or source creature, then with target or source gameobject
|
// First try with target or source creature, then with target or source gameobject
|
||||||
if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true))
|
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))
|
else if (GameObject* goSource = _GetScriptGameObjectSourceOrTarget(source, target, step.script, true))
|
||||||
goSource->DespawnOrUnsummon(Milliseconds(step.script->DespawnSelf.DespawnDelay));
|
goSource->DespawnOrUnsummon(Milliseconds(step.script->DespawnSelf.DespawnDelay));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user