Do not apply duration spellmods to spells with infinite duration (fixes Glyph of Eternal Water + Enduring Winter making water elemental last 5,10,15 seconds)

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-06-13 15:55:30 +02:00
parent e6d0fa20cd
commit ad8638742c
@@ -18811,6 +18811,10 @@ bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mo
if (spell && mod->charges == -1 && spell->m_appliedMods.find(mod->ownerAura) == spell->m_appliedMods.end())
return false;
// +duration to infinite duration spells making them limited
if (mod->op == SPELLMOD_DURATION && GetSpellDuration(spellInfo) == -1)
return false;
return spellmgr.IsAffectedByMod(spellInfo, mod);
}