[7244] Fixed affecting of positive spells critical chances by scripted critical chances.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
pasdVn 2009-02-07 15:20:46 +01:00 committed by ApoC
parent d767de4b8d
commit 7c32de2f8d
2 changed files with 12 additions and 9 deletions

View file

@ -7724,7 +7724,9 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
crit_chance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask);
}
// taken
if (pVictim && !IsPositiveSpell(spellProto->Id))
if (pVictim)
{
if (!IsPositiveSpell(spellProto->Id)
{
// Modify critical chance by victim SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE
crit_chance += pVictim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE, schoolMask);
@ -7733,6 +7735,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
// Modify by player victim resilience
if (pVictim->GetTypeId() == TYPEID_PLAYER)
crit_chance -= ((Player*)pVictim)->GetRatingBonusValue(CR_CRIT_TAKEN_SPELL);
}
// scripted (increase crit chance ... against ... target by x%
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7243"
#define REVISION_NR "7244"
#endif // __REVISION_NR_H__