This commit is contained in:
sanctum32 2013-10-21 06:58:21 +03:00 committed by Antz
parent 28ad733c49
commit 6c84f6f537
2 changed files with 12 additions and 7 deletions

View file

@ -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;
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12689"
#define REVISION_NR "12690"
#endif // __REVISION_NR_H__