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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user