aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameObject.h')
-rw-r--r--src/game/GameObject.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 763117de167..97c532605d3 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -444,6 +444,17 @@ struct GameObjectInfo
}
}
+ uint32 GetCharges() const // despawn at uses amount
+ {
+ switch(type)
+ {
+ //case GAMEOBJECT_TYPE_TRAP: return trap.charges;
+ case GAMEOBJECT_TYPE_GUARDPOST: return guardpost.charges;
+ case GAMEOBJECT_TYPE_SPELLCASTER: return spellcaster.charges;
+ default: return 0;
+ }
+ }
+
uint32 GetLinkedGameObjectEntry() const
{
switch(type)
@@ -692,7 +703,6 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
uint64 GetRotation() const { return m_rotation; }
protected:
- uint32 m_charges; // Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22)
uint32 m_spellId;
time_t m_respawnTime; // (secs) time of next respawn (or despawn if GO have owner()),
uint32 m_respawnDelayTime; // (secs) if 0 then current GO state no dependent from timer