*Combine gobject::deleteobjectwithowner and delete

--HG--
branch : trunk
This commit is contained in:
megamage
2009-09-02 14:52:52 -05:00
parent 73fde81744
commit 5b9868f468
4 changed files with 3 additions and 8 deletions

View File

@@ -489,17 +489,13 @@ void GameObject::AddUniqueUse(Player* player)
m_unique_users.insert(player->GetGUIDLow());
}
void GameObject::DeleteObjectWithOwner()
void GameObject::Delete()
{
SetLootState(GO_NOT_READY);
if (GetOwnerGUID())
if (Unit * owner = GetOwner(false))
owner->RemoveGameObject(this, false);
Delete();
}
void GameObject::Delete()
{
assert (!GetOwnerGUID());
SendObjectDeSpawnAnim(GetGUID());