aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
index 87308e495..136fbfb0e 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
@@ -35,7 +35,11 @@ object SkyBlockItemModifierUtils {
fun ItemStack.getManaDisintegrators() = getAttributeInt("mana_disintegrator_count")
- fun ItemStack.getDungeonStarCount() = getAttributeInt("dungeon_item_level")
+ fun ItemStack.getDungeonStarCount() = getAttributeInt("dungeon_item_level")?.let {
+ getAttributeInt("upgrade_level")?.let { upgradeLevel ->
+ return it.coerceAtLeast(upgradeLevel)
+ } ?: it
+ }
fun ItemStack.getPetCandyUsed(): Int? {
val data = cachedData
@@ -129,7 +133,7 @@ object SkyBlockItemModifierUtils {
enchantments.keySet.associateWith { enchantments.getInteger(it) }
}
- fun ItemStack.getAppliedPocketSackInASack(): Int?{
+ fun ItemStack.getAppliedPocketSackInASack(): Int? {
val data = cachedData
if (data.sackInASack == -1) {
data.sackInASack = getAttributeInt("sack_pss")