diff options
| author | Shauren <shauren.trinity@gmail.com> | 2013-10-26 14:39:00 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2013-10-26 14:39:00 +0200 |
| commit | b81bf7d0250939ee96b942f554c16d950f06c7b1 (patch) | |
| tree | 2d161702e541dbba3acd420f8315801043c2bb03 /src/server/game/Entities/Creature | |
| parent | daf5a4b5c33ee56abfbaf6bbd1a91dd27a45aeec (diff) | |
Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast
Diffstat (limited to 'src/server/game/Entities/Creature')
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f68d87de2f4..e4fda515c8a 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2141,8 +2141,8 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid) if (cooldown) _AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILLISECONDS); - if (spellInfo->Category) - _AddCreatureCategoryCooldown(spellInfo->Category, time(NULL)); + if (spellInfo->GetCategory()) + _AddCreatureCategoryCooldown(spellInfo->GetCategory(), time(NULL)); } bool Creature::HasCategoryCooldown(uint32 spell_id) const @@ -2151,7 +2151,7 @@ bool Creature::HasCategoryCooldown(uint32 spell_id) const if (!spellInfo) return false; - CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->Category); + CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); return(itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILLISECONDS)) > time(NULL)); } @@ -2185,7 +2185,7 @@ void Creature::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs } // Not send cooldown for this spells - if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (spellInfo->IsCooldownStartedOnEvent()) continue; if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) |
