[3.3.5] Core/Spells: Omen of Clarity
by @robinsch; closes #3088.
Purpose: make the Omen of Clarity druid buff (http://wotlk.openwow.com/spell=16864) work as intended.
This change is an addition to @Shauren's commit 37145b6.
Before this change, spell mod auras lose charges when they are unable to be cast
as mentioned in the issue. As an example: Omen of Clarity loses its charge
when Shred can not be used, because it requires the caster to behind the target.
This change will restore the spell mod if CheckCast returns false for the initial cast.
This commit is contained in:
1 parent
e142c3b873
commit
07df574b43
1 file changed
+8
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user