From c1c3fcc963bbf79f75e33a9383431784f36bdf36 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 31 Aug 2024 21:07:55 +0200 Subject: Fix: Autopet Rule Detection (#2430) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/inventory/experiments/GuardianReminder.kt | 7 ++++++- .../java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/experiments/GuardianReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/experiments/GuardianReminder.kt index d6005776f..70638619b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/experiments/GuardianReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/experiments/GuardianReminder.kt @@ -37,9 +37,14 @@ object GuardianReminder { "mainmenu", "Experimentation Table", ) + + /** + * REGEX-TEST: §dGuardian + * REGEX-TEST: §9Guardian§e + */ private val petNamePattern by patternGroup.pattern( "guardianpet", - "§[956d]Guardian", + "§[956d]Guardian.*", ) @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt index f0fef91de..1c93d6b3c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -35,9 +35,14 @@ object CurrentPetDisplay { "chat.despawn", "§aYou despawned your §r.*§r§a!" ) + + /** + * REGEX-TEST: §cAutopet §eequipped your §7[Lvl 100] §6Griffin§4 ✦§e! §a§lVIEW RULE + * REGEX-TEST: §cAutopet §eequipped your §7[Lvl 100] §6Elephant§e! §a§lVIEW RULE + */ private val chatPetRulePattern by patternGroup.pattern( "chat.rule", - "§cAutopet §eequipped your §7\\[Lvl .*] (?.*)! §a§lVIEW RULE" + "§cAutopet §eequipped your §7\\[Lvl .*] (?.*)§e! §a§lVIEW RULE" ) @SubscribeEvent -- cgit