diff options
| author | QAston <none@none> | 2010-08-01 01:22:13 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2010-08-01 01:22:13 +0200 |
| commit | 2212eb604d40c38d5390e009b791dd42a4177226 (patch) | |
| tree | fbca2cc716e881664c22df07040288e76ed6dd07 /src/server/game/Spells/Spell.cpp | |
| parent | 9cc4a9a6dabebb67d277c4ee3faa97bbd551c873 (diff) | |
*Add helpers for checking auras present on unit by type and spell affect mask
*Add linked SPELL_AURA_PERIODIC_HASTE to shadowform spell - by dr.tenma
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c24efa2b9ab..874391f0f3a 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1441,10 +1441,14 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive); - //mod duration of channeled aura by spell haste + // Haste modifies duration of channeled spells if (IsChanneledSpell(m_spellInfo)) m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this); + // and duration of auras affected by SPELL_AURA_PERIODIC_HASTE + if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo)) + duration *= m_originalCaster->GetFloatValue(UNIT_MOD_CAST_SPEED); + if (duration != m_spellAura->GetMaxDuration()) { m_spellAura->SetMaxDuration(duration); |
