aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-08 12:40:20 -0500
committermegamage <none@none>2009-08-08 12:40:20 -0500
commit0d80df4e581143b9aaa0dae716a36946b8841bbf (patch)
tree3027f6c0cd892d65906f1f71479d0010369e93f6 /src/game/GameObject.h
parent1165b889a048a5c448305848f668232c9f683969 (diff)
*Add assert back to go::setownerguid
--HG-- branch : trunk
Diffstat (limited to 'src/game/GameObject.h')
-rw-r--r--src/game/GameObject.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 8e2a37fe55e..43441e2fb9c 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -611,6 +611,11 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
void SetOwnerGUID(uint64 owner)
{
+ // Owner already found and different than expected owner - remove object from old owner
+ if (owner && GetOwnerGUID() && GetOwnerGUID() != owner)
+ {
+ assert(false);
+ }
m_spawnedByDefault = false; // all object with owner is despawned after delay
SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner);
}