Core/Spells: Damage and healing bonus calculation fixes

* Spells with SPELL_DAMAGE_CLASS_NONE are now allowed to benefit from spellmods
This commit is contained in:
Shauren authored and Ovahlord committed 2023-08-19 18:02:57 +02:00
1 parent 7264a541a9
commit 1df15cf79e
1 file changed
-12
-12
View File
@@ -6308,12 +6308,6 @@ int32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, int3
attackPowerCoeff = bonus->ap_bonus;
}
}
else
{
// No bonus damage for SPELL_DAMAGE_CLASS_NONE class spells by default
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
return uint32(std::max(pdamage * DoneTotalMod, 0.0f));
}
if (spellPowerCoeff > 0.f)
spellPowerCoeff = spellProto->CalculateScaledCoefficient(this, spellPowerCoeff);
@@ -7033,12 +7027,6 @@ int32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, int
DoneTotal += int32(bonus->ap_bonus * stack * APbonus);
}
}
else
{
// No bonus healing for SPELL_DAMAGE_CLASS_NONE class spells by default
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
return uint32(std::max(healamount * DoneTotalMod, 0.0f));
}
// Default calculation
if (DoneAdvertisedBenefit)