diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2024-12-13 23:30:23 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-14 22:01:21 +0100 |
commit | 0a4cf1fbcc897462f31aaadc5c868d12d13e1abb (patch) | |
tree | 919ca9e68a2e3edc3fdf0624ff754b752260907a | |
parent | a7e27bb4609997a2efc9b102aee3b71d99d2c5fd (diff) | |
download | LocalTransactionLedger-0a4cf1fbcc897462f31aaadc5c868d12d13e1abb.tar.gz LocalTransactionLedger-0a4cf1fbcc897462f31aaadc5c868d12d13e1abb.tar.bz2 LocalTransactionLedger-0a4cf1fbcc897462f31aaadc5c868d12d13e1abb.zip |
fix: NPC Buy/Sell Pattern not working for 1 Coin Items
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/modules/NpcDetection.kt | 4 |
1 files 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 )?(?<what>.*?) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins!") + Pattern.compile("You bought (back )?(?<what>.*?) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins?!") val npcSellPattern = - Pattern.compile("You sold (?<what>.*) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins!") + Pattern.compile("You sold (?<what>.*) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins?!") // TODO: IMPROVE BUYING FROM NPC TO INCLUDE ITEMS OTHER THAN COINS (KUUDRA KEYS ARE CHEAP) |