aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-09-12 02:33:44 +0200
committerGitHub <noreply@github.com>2024-09-12 02:33:44 +0200
commite350ade0d86955ce1a865f4286cd208d54693777 (patch)
tree9fcfaaf1a15a55b85a55df58d83b1c0c9e66b885 /src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
parentb2d1c22d4baebc6eaf9eef823b11fa9d1801ced1 (diff)
downloadskyhanni-e350ade0d86955ce1a865f4286cd208d54693777.tar.gz
skyhanni-e350ade0d86955ce1a865f4286cd208d54693777.tar.bz2
skyhanni-e350ade0d86955ce1a865f4286cd208d54693777.zip
Improvement: Stars in Estimated Item Value (#2492)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
index c9e193329..4d0cf4468 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
@@ -46,9 +46,11 @@ object SkyBlockItemModifierUtils {
fun ItemStack.getManaDisintegrators() = getAttributeInt("mana_disintegrator_count")
fun ItemStack.getDungeonStarCount() = if (isDungeonItem()) {
- getAttributeInt("upgrade_level") ?: getAttributeInt("dungeon_item_level")
+ getStarCount() ?: getAttributeInt("dungeon_item_level")
} else null
+ fun ItemStack.getStarCount() = getAttributeInt("upgrade_level")
+
private fun ItemStack.isDungeonItem() = getLore().any { it.contains("DUNGEON ") }
fun ItemStack.getPetExp() = getPetInfo()?.get("exp")?.asDouble