aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
diff options
context:
space:
mode:
authorjani270 <69345714+jani270@users.noreply.github.com>2024-10-31 11:56:16 +0100
committerjani270 <69345714+jani270@users.noreply.github.com>2024-10-31 11:56:16 +0100
commitd9de03ce66ab5224d91dd69ea3753d0be2b1a178 (patch)
tree664673a193e299a52e4ff3f110ea61590e465fda /src/main/kotlin/moe/nea/ledger/NpcDetection.kt
parent3115eeef02d541822470f08f298110e37fa7a1e6 (diff)
downloadLocalTransactionLedger-d9de03ce66ab5224d91dd69ea3753d0be2b1a178.tar.gz
LocalTransactionLedger-d9de03ce66ab5224d91dd69ea3753d0be2b1a178.tar.bz2
LocalTransactionLedger-d9de03ce66ab5224d91dd69ea3753d0be2b1a178.zip
fix: NPC Buy Detection not working if you bought back items
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/NpcDetection.kt')
-rw-r--r--src/main/kotlin/moe/nea/ledger/NpcDetection.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/NpcDetection.kt b/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
index 65693ef..3c3fe87 100644
--- a/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
@@ -6,7 +6,7 @@ import java.util.regex.Pattern
class NpcDetection(val ledger: LedgerLogger, val ids: ItemIdProvider) {
val npcBuyPattern =
- Pattern.compile("You bought (?<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!")