From 0a4cf1fbcc897462f31aaadc5c868d12d13e1abb Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Fri, 13 Dec 2024 23:30:23 +0100 Subject: fix: NPC Buy/Sell Pattern not working for 1 Coin Items --- src/main/kotlin/moe/nea/ledger/modules/NpcDetection.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/moe/nea/ledger/modules/NpcDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/NpcDetection.kt index f129113..cbafe02 100644 --- a/src/main/kotlin/moe/nea/ledger/modules/NpcDetection.kt +++ b/src/main/kotlin/moe/nea/ledger/modules/NpcDetection.kt @@ -17,9 +17,9 @@ import java.util.regex.Pattern class NpcDetection @Inject constructor(val ledger: LedgerLogger, val ids: ItemIdProvider) { val npcBuyPattern = - Pattern.compile("You bought (back )?(?.*?) (x(?$SHORT_NUMBER_PATTERN) )?for (?$SHORT_NUMBER_PATTERN) Coins!") + Pattern.compile("You bought (back )?(?.*?) (x(?$SHORT_NUMBER_PATTERN) )?for (?$SHORT_NUMBER_PATTERN) Coins?!") val npcSellPattern = - Pattern.compile("You sold (?.*) (x(?$SHORT_NUMBER_PATTERN) )?for (?$SHORT_NUMBER_PATTERN) Coins!") + Pattern.compile("You sold (?.*) (x(?$SHORT_NUMBER_PATTERN) )?for (?$SHORT_NUMBER_PATTERN) Coins?!") // TODO: IMPROVE BUYING FROM NPC TO INCLUDE ITEMS OTHER THAN COINS (KUUDRA KEYS ARE CHEAP) -- cgit