Fix redundant calculation of spell critical chance, fix spellmods being dropped twice.

Closes #7315
This commit is contained in:
ariel-
2016-01-04 19:01:02 -03:00
parent 8a0bbc3869
commit f810db72a9

View File

@@ -2359,7 +2359,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
// Do healing and triggers
if (m_healing > 0)
{
bool crit = caster->IsSpellCrit(unitTarget, m_spellInfo, m_spellSchoolMask);
bool crit = target->crit;
uint32 addhealth = m_healing;
if (crit)
{
@@ -2384,7 +2384,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask);
// Add bonuses and fill damageInfo struct
caster->CalculateSpellDamageTaken(&damageInfo, m_damage, m_spellInfo, m_attackType, target->crit);
caster->CalculateSpellDamageTaken(&damageInfo, m_damage, m_spellInfo, m_attackType, target->crit);
caster->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
// Send log damage message to client