mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9524] Use cooldown data from gameobejct trap tamplate if provided.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
0ca87c50a6
commit
31f4850486
2 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue