SAI/GameObject: Despawn the linked trap with the gameobject
Port From (https://github.com/TrinityCore/TrinityCore/commit/8d806f8c6943b54533dbf9a69febee3df1d00430)
This commit is contained in:
@@ -919,6 +919,11 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public void Delete()
|
public void Delete()
|
||||||
{
|
{
|
||||||
|
// If nearby linked trap exists, despawn it
|
||||||
|
GameObject linkedTrap = GetLinkedTrap();
|
||||||
|
if (linkedTrap != null)
|
||||||
|
linkedTrap.DespawnOrUnsummon();
|
||||||
|
|
||||||
SetLootState(LootState.NotReady);
|
SetLootState(LootState.NotReady);
|
||||||
RemoveFromOwner();
|
RemoveFromOwner();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user