mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 04:02:53 -04:00
Core/Smartscripts: Add respawn timer to smartscript despawn (#20070)
This commit is contained in:
@@ -1237,11 +1237,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (target->IsAlive() && IsSmart(target))
|
||||
{
|
||||
ENSURE_AI(SmartAI, target->AI())->SetDespawnTime(e.action.forceDespawn.delay + 1); // Next tick
|
||||
ENSURE_AI(SmartAI, target->AI())->SetDespawnTime(e.action.forceDespawn.delay + 1, e.action.forceDespawn.respawn); // Next tick
|
||||
ENSURE_AI(SmartAI, target->AI())->StartDespawn();
|
||||
}
|
||||
else
|
||||
target->DespawnOrUnsummon(e.action.forceDespawn.delay);
|
||||
target->DespawnOrUnsummon(e.action.forceDespawn.delay, Seconds(e.action.forceDespawn.respawn));
|
||||
}
|
||||
else if (GameObject* goTarget = (*itr)->ToGameObject())
|
||||
goTarget->SetRespawnTime(e.action.forceDespawn.delay + 1);
|
||||
|
||||
Reference in New Issue
Block a user