diff options
author | Trazom62 <none@none> | 2010-04-25 22:20:59 +0200 |
---|---|---|
committer | Trazom62 <none@none> | 2010-04-25 22:20:59 +0200 |
commit | edbbec75b13430d817f42e48319c1043c4fcd5d1 (patch) | |
tree | f63d16e28d3ce9a59f1dd5eb9065b42ba28d864f /src | |
parent | 9b83945c33cb4973ca277668a49bae827bf3d469 (diff) |
Fix channelled spells when player has lot of haste AND a buff reducing spell duration. Thanks dr.tenma.
Fixes issue #1052.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 6 | ||||
-rw-r--r-- | src/game/SpellAuraEffects.cpp | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 92c7e7bd02b..cea7d10735c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3027,11 +3027,13 @@ void Spell::handle_immediate() int32 duration = GetSpellDuration(m_spellInfo); if (duration) { - // Apply haste mods - m_caster->ModSpellCastTime(m_spellInfo, duration, this); + // First mod_duration then haste - see Missile Barrage // Apply duration mod if (Player* modOwner = m_caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration); + // Apply haste mods + m_caster->ModSpellCastTime(m_spellInfo, duration, this); + m_spellState = SPELL_STATE_CASTING; m_caster->AddInterruptMask(m_spellInfo->ChannelInterruptFlags); SendChannelStart(duration); diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index df9b1b02214..69bda20fd05 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -756,9 +756,13 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create) return; Player* modOwner = caster ? caster->GetSpellModOwner() : NULL; + // Apply casting time mods if (modOwner && m_amplitude) { + // Apply periodic time mod + modOwner->ApplySpellMod(GetId(), SPELLMOD_ACTIVATION_TIME, m_amplitude); + // For channeled spells if (IsChanneledSpell(m_spellProto)) { modOwner->ModSpellCastTime(m_spellProto, m_amplitude); @@ -780,10 +784,6 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create) } } - // Apply periodic time mod - if (modOwner && m_amplitude) - modOwner->ApplySpellMod(GetId(), SPELLMOD_ACTIVATION_TIME, m_amplitude); - if (create) { // Start periodic on next tick or at aura apply |