Core/AHBot: fix price calc

- priceRatio is already a factor
This commit is contained in:
ariel- authored and Aokromes committed 2017-04-09 18:11:29 +02:00
1 parent a6ff258ace
commit 30075e8575
1 file changed
+3 -1
@@ -726,7 +726,9 @@ void AuctionBotSeller::SetPricesOfItem(ItemTemplate const* itemProto, SellerConf
if (sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_SELLER))
buyPrice = sellPrice;
float basePriceFloat = (buyPrice * stackCount * priceRatio) / (itemProto->Class == 6 ? 200.0f : static_cast<float>(itemProto->BuyCount)) / 100.0f;
float basePriceFloat = buyPrice * stackCount / (itemProto->Class == 6 ? 200.0f : static_cast<float>(itemProto->BuyCount));
basePriceFloat *= priceRatio;
float range = basePriceFloat * 0.04f;
buyp = static_cast<uint32>(frand(basePriceFloat - range, basePriceFloat + range) + 0.5f);