mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
SAI/GameObject: Despawn the linked trap with the gameobject
Closes #23105
(cherry picked from commit 750be73b99)
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user