diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-09 12:12:27 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-09 12:12:27 +0200 |
| commit | 17ec026c19d1e203244217d599f72bd265d9aac8 (patch) | |
| tree | 28c86ae9415e11ec316741ba752a7e807a10f74c /src/main/java/at/hannibal2/skyhanni/features/bazaar | |
| parent | 3bcd5b3a8afa5b322d75af1b82681fd7b1e494e5 (diff) | |
| download | skyhanni-17ec026c19d1e203244217d599f72bd265d9aac8.tar.gz skyhanni-17ec026c19d1e203244217d599f72bd265d9aac8.tar.bz2 skyhanni-17ec026c19d1e203244217d599f72bd265d9aac8.zip | |
Using NEUInternalName in slayer profit tracker
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bazaar')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt index b0c08a4e8..b40bb81b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarApi.kt @@ -25,17 +25,15 @@ class BazaarApi { NEUItems.getInternalNameOrNull(name)?.let { getBazaarDataByInternalName(it) } fun getBazaarDataByInternalName(internalName: String) = - getBazaarDataByInternalName_new(NEUInternalName.from(internalName)) + NEUInternalName.from(internalName).getBazaarData() - fun getBazaarDataByInternalName_new(internalName: NEUInternalName) = if (isBazaarItem(internalName)) { - holder.getData(internalName) + fun NEUInternalName.getBazaarData() = if (isBazaarItem()) { + holder.getData(this) } else null fun isBazaarItem(stack: ItemStack) = isBazaarItem(stack.getInternalName()) - fun isBazaarItem(internalName: NEUInternalName): Boolean { - return NEUItems.manager.auctionManager.getBazaarInfo(internalName.asString()) != null - } + fun NEUInternalName.isBazaarItem() = NEUItems.manager.auctionManager.getBazaarInfo(asString()) != null fun isBazaarItem(internalName: String): Boolean { return NEUItems.manager.auctionManager.getBazaarInfo(internalName) != null |
