diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-27 22:37:36 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-27 22:37:36 +0200 |
commit | 287444efd0d98663aabb43f334604c97bcff7077 (patch) | |
tree | c76a81a91c85f995f75648227914767e94855b76 /src/main/java/at/hannibal2 | |
parent | 80a6728abdd34d80495bfd18f0250bbf59865a25 (diff) | |
download | skyhanni-287444efd0d98663aabb43f334604c97bcff7077.tar.gz skyhanni-287444efd0d98663aabb43f334604c97bcff7077.tar.bz2 skyhanni-287444efd0d98663aabb43f334604c97bcff7077.zip |
Fixed estimated item value detects master stars on non dungeon items
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 5 |
1 files changed, 4 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 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 |