From 8df1187a6b84aa44afdcfd73073aaa63d94b4f93 Mon Sep 17 00:00:00 2001 From: Vixid <52578495+VixidDev@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:30:14 +0000 Subject: [PATCH] Backend: Make unusable enchants be valid by the enchant parser (#2889) --- .../skyhanni/features/misc/items/enchants/EnchantParser.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/EnchantParser.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/EnchantParser.kt index ad147996418f..e698ee65f3af 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/EnchantParser.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/EnchantParser.kt @@ -48,12 +48,12 @@ object EnchantParser { */ val enchantmentExclusivePattern by patternGroup.pattern( "exclusive", - "(?:(?:§7§l|§d§l|§9)+([A-Za-z][A-Za-z '-]+) (?:[IVXLCDM]+|[0-9]+)(?:[§r]?§9, |\$| §8\\d{1,3}(?:[,.]\\d{1,3})*)[kKmMbB]?)+\$", + "^(?:(?:§7§l|§d§l|§9|§7)+([A-Za-z][A-Za-z '-]+) (?:[IVXLCDM]+|[0-9]+)(?:[§r]?§9, |\$| §8\\d{1,3}(?:[,.]\\d{1,3})*)[kKmMbB]?)+\$", ) // Above regex tests apply to this pattern also val enchantmentPattern by patternGroup.pattern( "enchants.new", - "(§7§l|§d§l|§9)(?[A-Za-z][A-Za-z '-]+) (?[IVXLCDM]+|[0-9]+)" + + "(§7§l|§d§l|§9|§7)(?[A-Za-z][A-Za-z '-]+) (?[IVXLCDM]+|[0-9]+)" + "(?(§r)?§9, |\$| §8\\d{1,3}([,.]\\d{1,3})*[kKmMbB]?)", ) private val grayEnchantPattern by patternGroup.pattern(