[7244] Fixed affecting of positive spells critical chances by scripted critical chances. Author: pasdVn
--HG-- branch : trunk
This commit is contained in:
+4
-1
@@ -8280,7 +8280,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);
|
||||
@@ -8289,6 +8291,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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7243"
|
||||
#define REVISION_NR "7245"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
||||
Reference in New Issue
Block a user