Skip to content

Commit

Permalink
Creature: Try to make power rounding accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Aug 27, 2024
1 parent 9186c69 commit e3c2948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/Entities/StatSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void Unit::UpdateMaxPower(Powers power)
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
value *= GetModifierValue(unitMod, TOTAL_PCT);

SetMaxPower(power, uint32(value));
SetMaxPower(power, uint32(std::ceilf(value)));
}

void Player::ApplyFeralAPBonus(int32 amount, bool apply)
Expand Down Expand Up @@ -1130,7 +1130,7 @@ void Pet::UpdateMaxPower(Powers power)
value += GetModifierValue(unitMod, TOTAL_VALUE) + std::max((addValue - 20) * 15 + 20, 0.f);
value *= GetModifierValue(unitMod, TOTAL_PCT);

SetMaxPower(power, uint32(value));
SetMaxPower(power, uint32(std::ceilf(value)));
}

void Pet::UpdateAttackPowerAndDamage(bool ranged)
Expand Down

0 comments on commit e3c2948

Please sign in to comment.