Fix channelled spells when player has lot of haste AND a buff reducing spell duration. Thanks dr.tenma.

Fixes issue #1052.

--HG--
branch : trunk
This commit is contained in:
Trazom62
2010-04-25 22:20:59 +02:00
parent 9b83945c33
commit edbbec75b1
2 changed files with 8 additions and 6 deletions

View File

@@ -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);