From ccc8cc8b112b48dd6b5d14db33690f4d86c91b9b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 23 Aug 2023 11:08:20 +0200 Subject: Fixed anita upgrade detection from inventory --- .../skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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 4558174a5..e44071f3e 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 @@ -28,7 +28,7 @@ class CaptureFarmingGear { private val farmingLevelUpPattern = "SKILL LEVEL UP Farming .*➜(?<level>.*)".toPattern() private val fortuneUpgradePattern = "You claimed the Garden Farming Fortune (?<level>.*) upgrade!".toPattern() private val anitaBuffPattern = "You tiered up the Extra Farming Drops upgrade to [+](?<level>.*)%!".toPattern() - private val anitaMenuPattern = "You have: [+](?<level>.*)%".toPattern() + private val anitaMenuPattern = "§7You have: §6\\+(?<level>.*)☘ Farming Fortune".toPattern() private val lotusUpgradePattern = "Lotus (?<piece>.*) upgraded to [+].*☘!".toPattern() private val petLevelUpPattern = "Your (?<pet>.*) leveled up to level .*!".toPattern() @@ -174,11 +174,11 @@ class CaptureFarmingGear { if (event.inventoryName.contains("Anita")) { var level = -1 for ((_, item) in event.inventoryItems) { - if (item.displayName.contains("Extra Farming Drops")) { + if (item.displayName.contains("Extra Farming Fortune")) { level = 0 for (line in item.getLore()) { - anitaMenuPattern.matchMatcher(line.removeColor()) { - level = group("level").toInt() / 2 + anitaMenuPattern.matchMatcher(line) { + level = group("level").toInt() / 4 } } } -- cgit