mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-02-05 03:53:51 +00:00
Merge pull request #5 from NathanHandley/BotSellRework
Adjust pricing algorithm
This commit is contained in:
@@ -87,21 +87,28 @@ void AuctionHouseBot::calculateItemValue(ItemTemplate const* itemProto, uint64&
|
|||||||
// Start with a buyout price related to the sell price
|
// Start with a buyout price related to the sell price
|
||||||
outBuyoutPrice = itemProto->SellPrice;
|
outBuyoutPrice = itemProto->SellPrice;
|
||||||
|
|
||||||
// Set a minimum base buyoutPrice to 1 silver
|
// Set a minimum base buyoutPrice to 5 silver for non-projectiles
|
||||||
if (outBuyoutPrice < 100)
|
if (outBuyoutPrice < 500 && itemProto->Class != ITEM_CLASS_PROJECTILE)
|
||||||
{
|
{
|
||||||
// TODO: Move to a config
|
// TODO: Move to a config
|
||||||
outBuyoutPrice = 100;
|
outBuyoutPrice = 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multiply the price by the quality
|
// Multiply the price based on quality
|
||||||
outBuyoutPrice *= itemProto->Quality;
|
switch (itemProto->Quality)
|
||||||
|
{
|
||||||
|
case ITEM_QUALITY_UNCOMMON: outBuyoutPrice *= 2; break;
|
||||||
|
case ITEM_QUALITY_RARE: outBuyoutPrice *= 5; break;
|
||||||
|
case ITEM_QUALITY_EPIC: outBuyoutPrice *= 7; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
// If a vendor sells this item, make the base price the same as the vendor price
|
// If a vendor sells this item, make the price at least that high
|
||||||
// TODO::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
if (itemProto->SellPrice > outBuyoutPrice)
|
||||||
|
outBuyoutPrice = itemProto->SellPrice;
|
||||||
|
|
||||||
// Add a variance to the buyout price, minimum of 1%
|
// Add a variance to the buyout price, minimum of 1%
|
||||||
uint64 sellVarianceBuyoutPriceTopPercent = 150;
|
uint64 sellVarianceBuyoutPriceTopPercent = 125;
|
||||||
uint64 sellVarianceBuyoutPriceBottomPercent = 75;
|
uint64 sellVarianceBuyoutPriceBottomPercent = 75;
|
||||||
|
|
||||||
// Constrain variance top so that it can't be lower than bottom, and minimum values are 1%
|
// Constrain variance top so that it can't be lower than bottom, and minimum values are 1%
|
||||||
|
|||||||
Reference in New Issue
Block a user