From d46154a0cb45ea85a00f1b0e2d0601cec16ac673 Mon Sep 17 00:00:00 2001 From: insunaa Date: Tue, 18 Jun 2024 11:30:50 +0200 Subject: [PATCH] Unit: fix mana absorb shield --- src/game/Entities/Unit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/Entities/Unit.cpp b/src/game/Entities/Unit.cpp index 34a7ad7ac2c..9f98197db22 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -2654,7 +2654,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* caster, SpellSchoolMask schoolMa currentAbsorb = maxAbsorb; int32 manaReduction = int32(currentAbsorb * manaMultiplier); - ApplyPowerMod(POWER_MANA, manaReduction, false); + ModifyPower(POWER_MANA, -manaReduction); } // Mana Shield (or Fire Ward or Frost Ward or Ice Barrier) @@ -10488,6 +10488,7 @@ void Unit::SetMaxPower(Powers power, uint32 val) void Unit::ApplyPowerMod(Powers power, uint32 val, bool apply) { + m_unitPower[power] = m_unitPower[power] + (apply ? val : -val); ApplyModUInt32Value(UNIT_FIELD_POWER1 + power, val, apply); // group update