Merge pull request #16186 from ariel-/spellmodcharges

Core/Spells: Fix redundant mod charge drop and spell crit calc
This commit is contained in:
jackpoz
2016-01-09 16:51:39 +01:00

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