mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Fix redundant calculation of spell critical chance, fix spellmods being dropped twice.
Closes #7315
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user