From 41d7bf47d654431b6da3f3498ba5acf0efd0e861 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 25 Dec 2024 11:45:54 +0100 Subject: [PATCH] Fix: Farming Skill XP (#3121) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .editorconfig | 2 +- src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 54e4945de5a2..1880229305e3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -62,7 +62,7 @@ ktlint_standard_no-wildcard-imports = enabled ktlint_standard_function-expression-body = disabled # Additional Kotlin-specific formatting for conditions and continuation -ij_kotlin_continuation_indent_size = 8 +ij_kotlin_continuation_indent_size = 4 ij_kotlin_binary_expression_wrap = if_long ij_kotlin_keep_line_breaks = true ij_kotlin_annotations_new_line_after_suppress = true diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index 0d3f811180fc..63230a194c9e 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -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 @@ -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