*Fix compile - sorry for that:/.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-10 16:29:43 +02:00
parent 83f74b5e46
commit 6af0b55dd7
2 changed files with 15 additions and 13 deletions
+14
View File
@@ -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)
+1 -13
View File
@@ -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;