Skip to content

Commit

Permalink
Unit: fix mana absorb shield
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa authored and killerwife committed Aug 16, 2024
1 parent 5605840 commit d46154a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d46154a

Please sign in to comment.