mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8320] Imporovements in wild summoned gameobjects work.
* 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.
This commit is contained in:
parent
82782779f7
commit
0d96fc06a6
3 changed files with 39 additions and 33 deletions
|
|
@ -567,14 +567,6 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
|
||||
bool IsTransport() const;
|
||||
|
||||
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() const;
|
||||
|
||||
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
|
||||
|
||||
void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f);
|
||||
|
|
@ -593,6 +585,21 @@ class MANGOS_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() 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
|
||||
{
|
||||
|
|
@ -619,8 +626,6 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
uint32 GetRespawnDelay() const { return m_respawnDelayTime; }
|
||||
void Refresh();
|
||||
void Delete();
|
||||
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); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue