diff options
author | megamage <none@none> | 2009-04-08 16:35:13 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-08 16:35:13 -0500 |
commit | fa0492ccce16411d20edb8928a0038e2b4e68427 (patch) | |
tree | 6c47f567cc05493ddbc9a0ff1816a574a8ff05a6 /src/game/GameObject.h | |
parent | 371a58404743aa7294eee0096d7884018929e87b (diff) |
[7634] Fixed: select non-despawnable gameobjects base at appropriate for gameobject type dataN fields. Author: VladimirMangos
Many in world gameobject that unexpected daspawned before must now work in more expected way.
In tests i not found any damage to bg gameobject work, and at least this restore expected work for non-bg dorrs//buttons broken
after half-year ago patch (that has been reverted partly in this commit)
--HG--
branch : trunk
Diffstat (limited to 'src/game/GameObject.h')
-rw-r--r-- | src/game/GameObject.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/GameObject.h b/src/game/GameObject.h index 3d2d3c2de57..b0019048827 100644 --- a/src/game/GameObject.h +++ b/src/game/GameObject.h @@ -482,6 +482,20 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject } } + bool GetDespawnPossibility() const + { + switch(GetGoType()) + { + case GAMEOBJECT_TYPE_DOOR: return GetGOInfo()->door.noDamageImmune; + case GAMEOBJECT_TYPE_BUTTON: return GetGOInfo()->button.noDamageImmune; + case GAMEOBJECT_TYPE_QUESTGIVER: return GetGOInfo()->questgiver.noDamageImmune; + case GAMEOBJECT_TYPE_GOOBER: return GetGOInfo()->goober.noDamageImmune; + case GAMEOBJECT_TYPE_FLAGSTAND: return GetGOInfo()->flagstand.noDamageImmune; + case GAMEOBJECT_TYPE_FLAGDROP: return GetGOInfo()->flagdrop.noDamageImmune; + default: return true; + } + } + time_t GetRespawnTime() const { return m_respawnTime; } time_t GetRespawnTimeEx() const { |