From 1df15cf79ecebd3cc5671636d748fec9561839e0 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 19 Aug 2023 18:02:57 +0200 Subject: [PATCH] Core/Spells: Damage and healing bonus calculation fixes * Spells with SPELL_DAMAGE_CLASS_NONE are now allowed to benefit from spellmods --- src/server/game/Entities/Unit/Unit.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index d45e7d4220..1b934ed311 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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)