@rpg-engine/long-bow 0.6.56 → 0.6.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32144,11 +32144,9 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
32144
32144
  atlasJSON = _ref.atlasJSON,
32145
32145
  buffAndDebuff = _ref.buffAndDebuff;
32146
32146
  // Base skill points for the previous level (0 for level 1)
32147
- var baseSkillPointsPrevLevel = level === 1 ? 0 : shared.getSPForLevel(level);
32148
- // Calculate excess skill points above the previous level
32149
- var excessSkillPoints = Math.max(currentSkillPoints - baseSkillPointsPrevLevel, 0);
32147
+ var baseSkillPointsPrevLevel = shared.getSPForLevel(level - 1) || 0;
32150
32148
  // Calculate progress percentage towards the next level
32151
- var progress = Math.min(100, Math.max(0, excessSkillPoints / skillPointsToNextLevel * 100));
32149
+ var progress = Math.min(100, Math.max(0, (currentSkillPoints - baseSkillPointsPrevLevel) / (skillPointsToNextLevel - baseSkillPointsPrevLevel) * 100));
32152
32150
  var skillsBuffsCalc = function skillsBuffsCalc(level, buffAndDebuff) {
32153
32151
  var result = level * (buffAndDebuff / 100);
32154
32152
  return result > 0 ? "+" + result.toFixed(2) : "" + result.toFixed(2);