Skip to content

Commit

Permalink
workaround for farming skill xp calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Dec 24, 2024
1 parent c4750c0 commit e225798
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.getSkillInfo
import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.xpRequiredForLevel
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.ItemUtils.cleanName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
Expand Down Expand Up @@ -154,7 +155,11 @@ object SkillAPI {
levelArray = data.levelingXp
levelingMap = levelArray.withIndex().associate { (index, xp) -> (index + 1) to xp }
exactLevelingMap = levelArray.withIndex().associate { (index, xp) -> xp to (index + 1) }
defaultSkillCap = data.levelingCaps
defaultSkillCap = data.levelingCaps.editCopy {
if (this["farming"] == 50) {
this["farming"] = 60
}
}
}

@SubscribeEvent
Expand Down Expand Up @@ -409,7 +414,7 @@ object SkillAPI {
val (overflowLevel, current, needed, _) = calculateSkillLevel(xp, 60)
ChatUtils.chat(
"With §b${xp.addSeparators()} §eXP you would be level §b$overflowLevel " +
"§ewith progress (§b${current.addSeparators()}§e/§b${needed.addSeparators()}§e) XP",
"§ewith progress (§b${current.addSeparators()}§e/§b${needed.addSeparators()}§e) XP",

Check warning on line 417 in src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt

View workflow job for this annotation

GitHub Actions / Run detekt

detekt.formatting.Indentation

Unexpected indentation (32) (should be 28)
)
return
}
Expand Down

0 comments on commit e225798

Please sign in to comment.