diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-17 03:05:34 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-17 03:05:34 +0200 |
commit | ef58a94bf31868c4b53218474f0be04c1cd93d97 (patch) | |
tree | cb56d5969f8bebf586298475a61c521229663fda /src/main/java/at/hannibal2/skyhanni/bazaar/BazaarApi.kt | |
parent | 5669dbf6f68e7cacb2df6a4e37d703df8635353e (diff) | |
download | skyhanni-ef58a94bf31868c4b53218474f0be04c1cd93d97.tar.gz skyhanni-ef58a94bf31868c4b53218474f0be04c1cd93d97.tar.bz2 skyhanni-ef58a94bf31868c4b53218474f0be04c1cd93d97.zip |
moving packets around
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/bazaar/BazaarApi.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/bazaar/BazaarApi.kt | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/bazaar/BazaarApi.kt deleted file mode 100644 index cbebe951c..000000000 --- a/src/main/java/at/hannibal2/skyhanni/bazaar/BazaarApi.kt +++ /dev/null @@ -1,59 +0,0 @@ -package at.hannibal2.skyhanni.bazaar - -import at.hannibal2.skyhanni.utils.LorenzUtils - -class BazaarApi { - - companion object { - private val bazaarMap = mutableMapOf<String, BazaarData>() - - fun isBazaarInventory(inventoryName: String): Boolean { - if (inventoryName.contains(" ➜ ") && !inventoryName.contains("Museum")) return true - if (BazaarOrderHelper.isBazaarOrderInventory(inventoryName)) return true - - return when (inventoryName) { - "Your Bazaar Orders" -> true - "How many do you want?" -> true - "How much do you want to pay?" -> true - "Confirm Buy Order" -> true - "Confirm Instant Buy" -> true - "At what price are you selling?" -> true - "Confirm Sell Offer" -> true - "Order options" -> true - - else -> false - } - } - - fun getCleanBazaarName(name: String): String { - if (name.endsWith(" Gemstone")) { - return name.substring(6) - } - if (name.startsWith("§")) { - return name.substring(2) - } - - return name - } - - fun getBazaarDataForName(name: String): BazaarData { - if (bazaarMap.containsKey(name)) { - val bazaarData = bazaarMap[name] - if (bazaarData != null) { - return bazaarData - } - LorenzUtils.error("Bazaar data is null for item '$name'") - } - throw Error("no bz data found for name '$name'") - } - - fun isBazaarItem(name: String): Boolean { - val bazaarName = getCleanBazaarName(name) - return bazaarMap.containsKey(bazaarName) - } - } - - init { - BazaarDataGrabber(bazaarMap).start() - } -}
\ No newline at end of file |