mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 14:17:28 +01:00
SAI/GameObject: Despawn the linked trap with the gameobject
Closes #23105
This commit is contained in:
@@ -879,6 +879,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