From edbbec75b13430d817f42e48319c1043c4fcd5d1 Mon Sep 17 00:00:00 2001 From: Trazom62 Date: Sun, 25 Apr 2010 22:20:59 +0200 Subject: Fix channelled spells when player has lot of haste AND a buff reducing spell duration. Thanks dr.tenma. Fixes issue #1052. --HG-- branch : trunk --- src/game/SpellAuraEffects.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game/SpellAuraEffects.cpp') 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 -- cgit v1.2.3