Fixed resist chances with Positive Auras.

BIG thanks to QAston.

--HG--
branch : trunk
This commit is contained in:
_manuel_
2010-07-22 13:04:47 -03:00
parent 31956e06b8
commit 3f9086fb4f
+16
View File
@@ -2899,8 +2899,24 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
tmp += resist_chance;
// Chance resist debuff
if (!IsPositiveSpell(spell->Id))
{
bool bNegativeAura = false;
for (uint8 I = 0; I < 3; I++)
{
if (spell->EffectApplyAuraName[I] != 0)
{
bNegativeAura = true;
break;
}
}
if (bNegativeAura)
{
tmp += pVictim->GetMaxPositiveAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel)) * 100;
tmp += pVictim->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel)) * 100;
}
}
// Roll chance
if (rand < tmp)