Core/Auras: Fix Cold Blood handling on misses and parries.

Patch by dr.tenma.
Fixes issue #2291

--HG--
branch : trunk
This commit is contained in:
silinoron committed 2010-12-18 13:06:38 -08:00
1 parent 8ce0abbbc8
commit 41a9d3216c
3 files changed
+15 -2

No files matched your search

+9
View File
@@ -1198,7 +1198,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
// Do not take combo points on dodge and miss
if (m_needComboPoints && m_targets.getUnitTargetGUID() == target->targetGUID)
if (missInfo != SPELL_MISS_NONE)
{
m_needComboPoints = false;
// Restore spell mods for a miss/dodge/parry Cold Blood
// TODO: check how broad this rule should be
if (m_caster->GetTypeId() == TYPEID_PLAYER)
if ((missInfo == SPELL_MISS_MISS) ||
(missInfo == SPELL_MISS_DODGE) ||
(missInfo == SPELL_MISS_PARRY))
m_caster->ToPlayer()->RestoreSpellMods(this, 14177);
}
// Trigger info was not filled in spell::preparedatafortriggersystem - we do it now
if (canEffectTrigger && !procAttacker && !procVictim)