From ae03a7f85cc09ddda3bb7c34de51670b61c56e4b Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Fri, 14 Jun 2024 23:59:24 +0200 Subject: Fix: HotmAPI Level Saving wrong with Blue Egg (#2097) --- src/main/java/at/hannibal2/skyhanni/data/HotmData.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index c299f5d52..0b51dfa8d 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -345,7 +345,7 @@ enum class HotmData( var activeLevel: Int get() = storage?.perks?.get(this.name)?.level?.plus(blueEgg()) ?: 0 private set(value) { - storage?.perks?.computeIfAbsent(this.name) { HotmTree.HotmPerk() }?.level = value + storage?.perks?.computeIfAbsent(this.name) { HotmTree.HotmPerk() }?.level = value.minus(blueEgg()) } val isMaxLevel: Boolean @@ -513,8 +513,8 @@ enum class HotmData( group("level").toInt().transformIf({ group("color") == "b" }, { this.minus(1) }) } ?: entry.maxLevel - // max level + 1 because Blue Cheese Goblin Omelette adds +1 to each level - if (entry.activeLevel > entry.maxLevel + 1) { + // raw level to ignore the blue egg buff + if (entry.rawLevel > entry.maxLevel) { ErrorManager.skyHanniError( "Hotm Perk '${entry.name}' over max level", "name" to entry.name, -- cgit