Update AuctionHouseBot.cpp

Allow items with zero sell or buy price to be candidates.
This commit is contained in:
NathanHandley
2023-11-13 17:18:30 -06:00
parent cce1dc21e1
commit 3ff89bda20

View File

@@ -376,6 +376,13 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config)
else
buyoutPrice = prototype->SellPrice;
// Set a minimum buyoutPrice to avoid zero prices
if (buyoutPrice == 0)
{
// TODO: Move this to a config value
buyoutPrice = 150;
}
if (prototype->Quality <= AHB_MAX_QUALITY)
{
if (config->GetMaxStack(prototype->Quality) > 1 && item->GetMaxStackCount() > 1)
@@ -859,7 +866,8 @@ void AuctionHouseBot::Initialize()
break;
}
if (SellMethod)
// Disable logic that blocks zero sell/buy prices
/*if (SellMethod)
{
if (itr->second.BuyPrice == 0)
continue;
@@ -868,7 +876,7 @@ void AuctionHouseBot::Initialize()
{
if (itr->second.SellPrice == 0)
continue;
}
}*/
if (itr->second.Quality > 6)
continue;