mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[11980] Improve support for wild summoned GOs
* Support GetGameObject for wild summoned GOs * Proper delete WildSummoned GOs after they are used
This commit is contained in:
parent
c17fdc3093
commit
d08edbd93c
5 changed files with 44 additions and 11 deletions
|
|
@ -401,10 +401,11 @@ void GameObject::Update(uint32 update_diff, uint32 /*p_time*/)
|
|||
//any return here in case battleground traps
|
||||
}
|
||||
|
||||
if (GetOwnerGuid())
|
||||
if (!HasStaticDBSpawnData()) // Remove wild summoned after use
|
||||
{
|
||||
if (Unit* owner = GetOwner())
|
||||
owner->RemoveGameObject(this, false);
|
||||
if (GetOwnerGuid())
|
||||
if (Unit* owner = GetOwner())
|
||||
owner->RemoveGameObject(this, false);
|
||||
|
||||
SetRespawnTime(0);
|
||||
Delete();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue