mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
*Add an Assert to trac where GO pointer is getting corrupted.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user