mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/AHBot: fix price calc
- priceRatio is already a factor
(cherry picked from commit 4a654be2fb)
This commit is contained in:
@@ -616,7 +616,9 @@ void AuctionBotSeller::SetPricesOfItem(ItemTemplate const* itemProto, SellerConf
|
||||
if (sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_SELLER))
|
||||
buyPrice = sellPrice;
|
||||
|
||||
float basePriceFloat = (buyPrice * stackCount * priceRatio) / (itemProto->GetClass() == 6 ? 200.0f : static_cast<float>(itemProto->GetBuyCount())) / 100.0f;
|
||||
float basePriceFloat = buyPrice * stackCount / (itemProto->GetClass() == 6 ? 200.0f : static_cast<float>(itemProto->GetBuyCount()));
|
||||
basePriceFloat *= priceRatio;
|
||||
|
||||
float range = basePriceFloat * 0.04f;
|
||||
|
||||
buyout = (static_cast<uint32>(frand(basePriceFloat - range, basePriceFloat + range) + 0.5f) / SILVER) * SILVER;
|
||||
|
||||
Reference in New Issue
Block a user