From 31f4850486c531d175b6bcf41b206d3b96969613 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Fri, 5 Mar 2010 10:05:19 +0300 Subject: [PATCH] [9524] Use cooldown data from gameobejct trap tamplate if provided. Signed-off-by: VladimirMangos --- src/game/GameObject.cpp | 3 ++- src/shared/revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index e4b24d9cb..e146a0aa6 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -334,7 +334,8 @@ void GameObject::Update(uint32 /*p_time*/) Unit *caster = owner ? owner : ok; caster->CastSpell(ok, goInfo->trap.spellId, true, NULL, NULL, GetGUID()); - m_cooldownTime = time(NULL) + 4; // 4 seconds + // use template cooldown if provided + m_cooldownTime = time(NULL) + (goInfo->trap.cooldown ? goInfo->trap.cooldown : uint32(4)); // count charges if(goInfo->trap.charges > 0) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index be77d5e1a..57372381f 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9523" + #define REVISION_NR "9524" #endif // __REVISION_NR_H__