[9524] Use cooldown data from gameobejct trap tamplate if provided.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Yehonal 2010-03-05 10:05:19 +03:00 committed by VladimirMangos
parent 0ca87c50a6
commit 31f4850486
2 changed files with 3 additions and 2 deletions

View file

@ -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)