Merge pull request #14883 from tkrokli/omen_of_clarity

[3.3.5] Core/Spells: Avoid losing spell mod auras when check on spellcast fails
(cherry picked from commit 35f0d8e9c1e89c3095c82e0dd89d9f8f08f288a3)
This commit is contained in:
mik1893
2015-07-19 01:35:41 +01:00
committed by DDuarte
parent 493f5ce1e0
commit 0ea0e9ee01
+8
View File
@@ -2997,6 +2997,14 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
triggeredByAura->GetBase()->SetDuration(0);
}
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
m_caster->ToPlayer()->RestoreSpellMods(this);
// cleanup after mod system
// triggered spell pointer can be not removed in some cases
m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
}
SendCastResult(result);
finish(false);