SAI/GameObject: Despawn the linked trap with the gameobject

Closes #23105

(cherry picked from commit 750be73b99)
This commit is contained in:
Killyana
2019-03-09 21:11:21 +01:00
committed by Shauren
parent 268e0bea18
commit 8d806f8c69

View File

@@ -1006,6 +1006,10 @@ void GameObject::DespawnOrUnsummon(Milliseconds delay, Seconds forceRespawnTime)
void GameObject::Delete()
{
// If nearby linked trap exists, despawn it
if (GameObject* linkedTrap = GetLinkedTrap())
linkedTrap->DespawnOrUnsummon();
SetLootState(GO_NOT_READY);
RemoveFromOwner();