From 4a654be2fbb1857f31180f8d4edca91f7825c34a Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 3 Apr 2017 05:42:12 -0300 Subject: Core/AHBot: fix price calc - priceRatio is already a factor --- src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index 67568440219..6fd11aa6406 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp @@ -622,7 +622,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(itemProto->BuyCount)) / 100.0f; + float basePriceFloat = buyPrice * stackCount / (itemProto->Class == 6 ? 200.0f : static_cast(itemProto->BuyCount)); + basePriceFloat *= priceRatio; + float range = basePriceFloat * 0.04f; buyp = static_cast(frand(basePriceFloat - range, basePriceFloat + range) + 0.5f); -- cgit v1.2.3