diff options
author | Walker Selby <git@walkerselby.com> | 2023-10-15 14:51:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-15 15:51:21 +0200 |
commit | 347f1b4d913dc9d7c40ef88e09efc885557a110b (patch) | |
tree | af84b193c073272f94daefe2134cc224d782dc6b /src/main/java/at | |
parent | 29904921c5d2c81b8d7cb37dcd57af9fd0761343 (diff) | |
download | skyhanni-347f1b4d913dc9d7c40ef88e09efc885557a110b.tar.gz skyhanni-347f1b4d913dc9d7c40ef88e09efc885557a110b.tar.bz2 skyhanni-347f1b4d913dc9d7c40ef88e09efc885557a110b.zip |
Internal Change: removePetRarityOld (#541)
Internal Change: removePetRarityOld #541
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt | 9 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 6 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt index 9d8544b0c..00e5653dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old +import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal @@ -129,10 +130,10 @@ class CaptureFarmingGear { } // setting to current saved level -1 to stop later pages saving low rarity pets - var highestElephantRarity = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.ELEPHANT]) - 1 - var highestMooshroomRarity = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.MOOSHROOM_COW]) - 1 - var highestRabbitRarity = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.RABBIT]) - 1 - var highestBeeRarity = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.BEE]) - 1 + var highestElephantRarity = (farmingItems[FarmingItems.ELEPHANT]?.getItemRarityOrNull()?.id ?: -1) - 1 + var highestMooshroomRarity = (farmingItems[FarmingItems.MOOSHROOM_COW]?.getItemRarityOrNull()?.id ?: -1) - 1 + var highestRabbitRarity = (farmingItems[FarmingItems.RABBIT]?.getItemRarityOrNull()?.id ?: -1) - 1 + var highestBeeRarity = (farmingItems[FarmingItems.BEE]?.getItemRarityOrNull()?.id ?: -1) - 1 for ((_, item) in event.inventoryItems) { val split = item.getInternalName_old().split(";") diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 4b405d1cc..50f5c0110 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -298,12 +298,6 @@ object ItemUtils { return getItemStack().nameWithEnchantment ?: error("Could not find item name for $this") } - // TODO: Replace entirely some day - fun getPetRarityOld(petStack: ItemStack?): Int { - val rarity = petStack?.getItemRarityOrNull() ?: return -1 - - return rarity.id - } private fun getPetRarity(pet: ItemStack): LorenzRarity? { val rarityId = pet.getInternalName().asString().split(";").last().toInt() |