aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-08 12:25:20 -0500
committermegamage <none@none>2009-08-08 12:25:20 -0500
commit58dc6e180bf88cc62a4bdff403b54c2cf9eba995 (patch)
tree3c0dd962d82dc294da0fca02fc0612e1febf20f9 /src/game/GameObject.h
parentf8a05d264f77f366bf9f367dc5c59262c190c017 (diff)
[8320] Imporovements in wild summoned gameobjects work. Author: VladimirMangos
* Not set owner for will summoned gameobjects. Its not expected to have owner, and must be accessable to all players (or team). * Set for all objects summoned by spells: despawned by deafult for proper despawn withut owner. * Cleanup Spell::EffectSummonObjectWild. --HG-- branch : trunk
Diffstat (limited to 'src/game/GameObject.h')
-rw-r--r--src/game/GameObject.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 9a86c93389c..8e2a37fe55e 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -591,10 +591,6 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
bool IsTransport() const;
- void SetOwnerGUID(uint64 owner);
- uint64 GetOwnerGUID() const { return GetUInt64Value(OBJECT_FIELD_CREATED_BY); }
- Unit* GetOwner(bool inWorld = true) const;
-
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f);
@@ -613,6 +609,21 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
bool LoadFromDB(uint32 guid, Map *map);
void DeleteFromDB();
+ void SetOwnerGUID(uint64 owner)
+ {
+ m_spawnedByDefault = false; // all object with owner is despawned after delay
+ SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner);
+ }
+ uint64 GetOwnerGUID() const { return GetUInt64Value(OBJECT_FIELD_CREATED_BY); }
+ Unit* GetOwner(bool inWorld = true) const;
+
+ void SetSpellId(uint32 id)
+ {
+ m_spawnedByDefault = false; // all summoned object is despawned after delay
+ m_spellId = id;
+ }
+ uint32 GetSpellId() const { return m_spellId;}
+
time_t GetRespawnTime() const { return m_respawnTime; }
time_t GetRespawnTimeEx() const
{
@@ -641,8 +652,6 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
void Refresh();
void Delete();
void DeleteObjectWithOwner();
- void SetSpellId(uint32 id) { m_spellId = id;}
- uint32 GetSpellId() const { return m_spellId;}
void getFishLoot(Loot *loot, Player* loot_owner);
GameobjectTypes GetGoType() const { return GameobjectTypes(GetByteValue(GAMEOBJECT_BYTES_1, 1)); }
void SetGoType(GameobjectTypes type) { SetByteValue(GAMEOBJECT_BYTES_1, 1, type); }