From 6af0b55dd77e29ead2f9e446e652a04a456f4066 Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 10 Jul 2009 16:29:43 +0200 Subject: *Fix compile - sorry for that:/. --HG-- branch : trunk --- src/game/GameObject.cpp | 14 ++++++++++++++ src/game/GameObject.h | 14 +------------- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index b690dbccddb..9afe4aa35f7 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -921,6 +921,20 @@ void GameObject::SetGoArtKit(uint8 kit) data->ArtKit = kit; } +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); + } + m_spawnedByDefault = false; // all object with owner is despawned after delay + SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner); +} + void GameObject::SwitchDoorOrButton(bool activate, bool alternative /* = false */) { if(activate) diff --git a/src/game/GameObject.h b/src/game/GameObject.h index 0d5718a49ff..5d5ee8c7050 100644 --- a/src/game/GameObject.h +++ b/src/game/GameObject.h @@ -499,19 +499,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject bool IsTransport() const; - void 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); - } - m_spawnedByDefault = false; // all object with owner is despawned after delay - SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner); - } + void SetOwnerGUID(uint64 owner); uint64 GetOwnerGUID() const { return GetUInt64Value(OBJECT_FIELD_CREATED_BY); } Unit* GetOwner() const; -- cgit v1.2.3