mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
merged ed3d3ccde9
This commit is contained in:
parent
28ad733c49
commit
6c84f6f537
2 changed files with 12 additions and 7 deletions
|
|
@ -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);
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12689"
|
||||
#define REVISION_NR "12690"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue