diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/GameObject/GameObject.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 086dc4255cc..ac4e5f76e69 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -545,14 +545,12 @@ void GameObject::Update(uint32 diff) loot.clear(); - if (GetOwnerGUID()) + //! If this is summoned by a spell with ie. SPELL_EFFECT_SUMMON_OBJECT_WILD, with or without owner, we check respawn criteria based on spell + //! The GetOwnerGUID() check is mostly for compatibility with hacky scripts - 99% of the time summoning should be done trough spells. + if (GetSpellId() || GetOwnerGUID()) { - if (Unit* owner = GetOwner()) - { - owner->RemoveGameObject(this, false); - SetRespawnTime(0); - Delete(); - } + SetRespawnTime(0); + Delete(); return; } |