Skip to content

Commit

Permalink
Stat: Per evidence use round instead of ceil
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jan 7, 2025
1 parent fc077e0 commit e2df6ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game/Entities/StatSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void Unit::UpdateMaxHealth()
value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
value *= GetModifierValue(unitMod, TOTAL_PCT);

SetMaxHealth(uint32(std::ceil(std::max(value, 1.f))));
SetMaxHealth(uint32(std::round(std::max(value, 1.f))));
}

void Unit::UpdateMaxPower(Powers power)
Expand All @@ -256,7 +256,7 @@ void Unit::UpdateMaxPower(Powers power)
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
value *= GetModifierValue(unitMod, TOTAL_PCT);

SetMaxPower(power, uint32(std::ceil(value)));
SetMaxPower(power, uint32(std::round(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(std::ceil(value)));
SetMaxPower(power, uint32(std::round(value)));
}

void Pet::UpdateAttackPowerAndDamage(bool ranged)
Expand Down

0 comments on commit e2df6ef

Please sign in to comment.