[11112] Implement use cooldown check for trap/goober gameobjects.

This commit is contained in:
VladimirMangos 2011-02-07 03:04:14 +03:00
parent b120464db7
commit abbd2f09be
3 changed files with 22 additions and 3 deletions

View file

@ -456,6 +456,16 @@ struct GameObjectInfo
}
}
uint32 GetCooldown() const // not triggering at detection target or use until coolodwn expire
{
switch(type)
{
case GAMEOBJECT_TYPE_TRAP: return trap.cooldown;
case GAMEOBJECT_TYPE_GOOBER: return goober.cooldown;
default: return 0;
}
}
uint32 GetLinkedGameObjectEntry() const
{
switch(type)
@ -711,7 +721,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
LootState m_lootState;
bool m_spawnedByDefault;
time_t m_cooldownTime; // used as internal reaction delay time store (not state change reaction).
// For traps this: spell casting cooldown, for doors/buttons: reset time.
// For traps/goober this: spell casting cooldown, for doors/buttons: reset time.
typedef std::set<ObjectGuid> GuidsSet;