From 287444efd0d98663aabb43f334604c97bcff7077 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 27 Aug 2023 22:37:36 +0200 Subject: Fixed estimated item value detects master stars on non dungeon items --- .../java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 385571c56..d092774af 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -39,8 +39,11 @@ object SkyBlockItemModifierUtils { fun ItemStack.getManaDisintegrators() = getAttributeInt("mana_disintegrator_count") - fun ItemStack.getDungeonStarCount() = + fun ItemStack.getDungeonStarCount() = if (isDungeonItem()) { getAttributeInt("upgrade_level") ?: getAttributeInt("dungeon_item_level") + } else null + + private fun ItemStack.isDungeonItem(): Boolean = getLore().lastOrNull()?.contains("DUNGEON") == true fun ItemStack.getPetExp() = getPetInfo()?.get("exp")?.asDouble -- cgit