skillcalc: round bonus xp to nearest tenth
XP cannot be more precise than a 10th of an xp. This was compute more precise xp values and when applied over many actions caused the computed actions to be incorrect
This commit is contained in:
@@ -343,7 +343,9 @@ class SkillCalculator extends JPanel
|
||||
int actionCount = 0;
|
||||
int neededXP = targetXP - currentXP;
|
||||
SkillAction action = slot.getAction();
|
||||
double xp = (action.isIgnoreBonus()) ? action.getXp() : action.getXp() * xpFactor;
|
||||
float xp = action.isIgnoreBonus()
|
||||
? action.getXp()
|
||||
: Math.round(action.getXp() * xpFactor * 10f) / 10f;
|
||||
|
||||
if (neededXP > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user