diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-06-14 23:59:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 23:59:24 +0200 |
commit | ae03a7f85cc09ddda3bb7c34de51670b61c56e4b (patch) | |
tree | 257c396e671c5c14c482ac5a0c8914ee302f5371 /src/main/java | |
parent | 1501e1d31e9feed959354fbc0d6bdf8369dd2ddc (diff) | |
download | skyhanni-ae03a7f85cc09ddda3bb7c34de51670b61c56e4b.tar.gz skyhanni-ae03a7f85cc09ddda3bb7c34de51670b61c56e4b.tar.bz2 skyhanni-ae03a7f85cc09ddda3bb7c34de51670b61c56e4b.zip |
Fix: HotmAPI Level Saving wrong with Blue Egg (#2097)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/HotmData.kt | 6 |
1 files changed, 3 insertions, 3 deletions
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, |