Merge pull request #14883 from tkrokli/omen_of_clarity

[3.3.5] Core/Spells: Avoid losing spell mod auras when check on spellcast fails
This commit is contained in:
mik1893 committed 2015-07-15 18:21:43 +02:00
commit 35f0d8e9c1
1 file changed
+8
+8
View File
@@ -2901,6 +2901,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);