mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-13 01:08:37 +00:00
Add config for buyer to always pay calc price on bid
This commit is contained in:
@@ -156,6 +156,12 @@ AuctionHouseBot.Neutral.MaxItems = 15000
|
||||
# of what the seller sells for), but do not go lower than 0
|
||||
# Default: 1
|
||||
#
|
||||
# AuctionHouseBot.Buyer.AlwaysBidMaxCalculatedPrice
|
||||
# When enabled, the buyer bot will use the calculated max price they
|
||||
# were willing to pay as the amount they bid with, instead of minimum
|
||||
# bid amount.
|
||||
# Default: false
|
||||
#
|
||||
# AuctionHouseBot.Buyer.PreventOverpayingForVendorItems
|
||||
# When enabled, the buyer bot will avoid purchasing auction house items
|
||||
# that are being sold for more than the vendor sell price. This prevents
|
||||
@@ -174,6 +180,7 @@ AuctionHouseBot.Neutral.MaxItems = 15000
|
||||
AuctionHouseBot.Buyer.Enabled = false
|
||||
AuctionHouseBot.Buyer.BuyCandidatesPerBuyCycle = 1
|
||||
AuctionHouseBot.Buyer.AcceptablePriceModifier = 1
|
||||
AuctionHouseBot.Buyer.AlwaysBidMaxCalculatedPrice = false
|
||||
AuctionHouseBot.Buyer.PreventOverpayingForVendorItems = true
|
||||
AuctionHouseBot.Buyer.BidAgainstPlayers = false
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ AuctionHouseBot::AuctionHouseBot() :
|
||||
ListingExpireTimeInSecondsMin(900),
|
||||
ListingExpireTimeInSecondsMax(86400),
|
||||
BuyingBotAcceptablePriceModifier(1),
|
||||
BuyingBotAlwaysBidMaxCalculatedPrice(false),
|
||||
BuyingBotWillBidAgainstPlayers(false),
|
||||
AHCharactersGUIDsForQuery(""),
|
||||
ItemsPerCycle(75),
|
||||
@@ -1106,11 +1107,17 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
|
||||
if (auction->bid == 0 && auction->startbid <= willingToPayForStackPrice)
|
||||
{
|
||||
doBid = true;
|
||||
if (BuyingBotAlwaysBidMaxCalculatedPrice == true)
|
||||
calcBidAmount = willingToPayForStackPrice;
|
||||
else
|
||||
calcBidAmount = auction->startbid;
|
||||
}
|
||||
else if (auction->bid != 0 && (auction->bid + auction->GetAuctionOutBid()) < willingToPayForStackPrice)
|
||||
{
|
||||
doBid = true;
|
||||
if (BuyingBotAlwaysBidMaxCalculatedPrice == true)
|
||||
calcBidAmount = willingToPayForStackPrice;
|
||||
else
|
||||
calcBidAmount = auction->bid + auction->GetAuctionOutBid();
|
||||
}
|
||||
}
|
||||
@@ -1304,6 +1311,7 @@ void AuctionHouseBot::InitializeConfiguration()
|
||||
// Buyer Bot
|
||||
BuyingBotBuyCandidatesPerBuyCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.Buyer.BuyCandidatesPerBuyCycle", 1);
|
||||
BuyingBotAcceptablePriceModifier = sConfigMgr->GetOption<float>("AuctionHouseBot.Buyer.AcceptablePriceModifier", 1);
|
||||
BuyingBotAlwaysBidMaxCalculatedPrice = sConfigMgr->GetOption<bool>("AuctionHouseBot.Buyer.AlwaysBidMaxCalculatedPrice", false);
|
||||
PreventOverpayingForVendorItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.Buyer.PreventOverpayingForVendorItems", true);
|
||||
if (PreventOverpayingForVendorItems)
|
||||
populateVendorItemsPrices();
|
||||
|
||||
@@ -132,6 +132,7 @@ private:
|
||||
uint32 ListingExpireTimeInSecondsMin;
|
||||
uint32 ListingExpireTimeInSecondsMax;
|
||||
float BuyingBotAcceptablePriceModifier;
|
||||
bool BuyingBotAlwaysBidMaxCalculatedPrice;
|
||||
bool BuyingBotWillBidAgainstPlayers;
|
||||
std::vector<uint32> vendorItemsPrices;
|
||||
std::string AHCharactersGUIDsForQuery;
|
||||
|
||||
Reference in New Issue
Block a user