diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index b8c48d169..86308ef60 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -301,6 +301,13 @@ void GameObject::Update(uint32 update_diff, uint32 p_time) { // can be despawned or destroyed SetLootState(GO_JUST_DEACTIVATED); + // Remove Wild-Summoned GO on timer expire + if (!HasStaticDBSpawnData()) + { + if (Unit* owner = GetOwner()) + owner->RemoveGameObject(this, false); + Delete(); + } return; } @@ -433,13 +440,11 @@ void GameObject::Update(uint32 update_diff, uint32 p_time) break; } - if (!HasStaticDBSpawnData()) // Remove wild summoned after use + // Remove wild summoned after use + if (!HasStaticDBSpawnData() && (!GetSpellId() || GetGOInfo()->GetDespawnPossibility())) { - if (GetOwnerGuid()) - if (Unit* owner = GetOwner()) - owner->RemoveGameObject(this, false); - - SetRespawnTime(0); + if (Unit* owner = GetOwner()) + owner->RemoveGameObject(this, false); Delete(); return; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index af0241261..7cb40e8d0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12689" + #define REVISION_NR "12690" #endif // __REVISION_NR_H__