mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[11112] Implement use cooldown check for trap/goober gameobjects.
This commit is contained in:
parent
b120464db7
commit
abbd2f09be
3 changed files with 22 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue