aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt12
3 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
index 2e7af1836..1ecaca626 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
@@ -131,7 +131,6 @@ object SkillAPI {
lastUpdate = SimpleTimeMark.now()
skillXp.lastUpdate = SimpleTimeMark.now()
skillXp.sessionTimerActive = true
-
SkillProgress.updateDisplay()
SkillProgress.hideInActionBar = listOf(component)
return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
index d2821fc63..393889467 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt
@@ -335,7 +335,7 @@ object SkillProgress {
var xpInterp = xpInfo.xpGainHour
- if (have > need){
+ if (have > need) {
add(Renderable.string("§7In §cIncrease level cap!"))
} else if (xpInfo.xpGainHour < 1000) {
add(Renderable.string("§7In §cN/A"))
diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt
index c09100cbd..4945a2c55 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.skillprogress
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.api.SkillAPI
+import at.hannibal2.skyhanni.api.SkillAPI.excludedSkills
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.cleanName
@@ -62,8 +63,13 @@ class SkillTooltip {
val targetLevel = skillInfo.customGoalLevel
var have = skillInfo.overflowTotalXp
val need = SkillUtil.xpRequiredForLevel(targetLevel.toDouble())
- if (targetLevel in 50 .. 60 && skillInfo.overflowLevel >= 50) have += SkillUtil.xpRequiredForLevel(50.0)
- else if (targetLevel > 60 && skillInfo.overflowLevel >= 60) have += SkillUtil.xpRequiredForLevel(60.0)
+ val xpFor50 = SkillUtil.xpRequiredForLevel(50.0)
+ val xpFor60 = SkillUtil.xpRequiredForLevel(60.0)
+
+ have += if (skillInfo.overflowLevel >= 60 && skill in excludedSkills || skillInfo.overflowLevel in 50 .. 59) xpFor50
+ else if (skillInfo.overflowLevel >= 60 && skill !in excludedSkills) xpFor60
+ else 0
+
val progress = have.toDouble() / need
val progressBar = StringUtils.progressBar(progress)
val nextLevel = if (useRoman) targetLevel.toRoman() else targetLevel
@@ -82,4 +88,4 @@ class SkillTooltip {
}
}
}
-} \ No newline at end of file
+}