We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npc, sell offer, buy order use equivalent variants for ah lbin and average prices
The text was updated successfully, but these errors were encountered:
Hey there,
I've been working on the issue you mentiond, and I wanted to confirm if I've understood it correctly. I would implement it like this:
enum class priceOption{ npc, sellOfferOrlbin, buyOrderOrAveragePrices, } fun getPriceOrNull(internalName: String,option :priceOption) : Double?{ return when(option){ priceOption.npc -> internalName.asInternalName().getNpcPriceOrNull(); priceOption.sellOfferOrlbin -> internalName.asInternalName().getPriceOrNull(true); priceOption.buyOrderOrAveragePrices -> if(manager.auctionManager.getBazaarInfo(internalName)==null){ manager.auctionManager.getItemAvgBin(internalName); }else { internalName.asInternalName().getPriceOrNull(true); } } } fun getPrice(internalName: String,option: priceOption) = getPriceOrNull(internalName,option) ?: -1.0
I test it and it gives the correct values. Testet with Seeds and Aspect of the Void:
Sorry, something went wrong.
No branches or pull requests
npc, sell offer, buy order
use equivalent variants for ah lbin and average prices
The text was updated successfully, but these errors were encountered: