*Add an Assert to trac where GO pointer is getting corrupted.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-12 22:08:32 +02:00
parent 060064f9de
commit f5eb5dba7c

View File

@@ -928,10 +928,7 @@ void GameObject::SetOwnerGUID(uint64 owner)
// Owner already found and different than expected owner - remove object from old owner
if (owner && GetOwnerGUID() && GetOwnerGUID() != owner)
{
if (Unit* owner = GetOwner())
owner->RemoveGameObject(this, false);
else
assert(false);
assert(false);
}
m_spawnedByDefault = false; // all object with owner is despawned after delay
SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner);