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
|
# of what the seller sells for), but do not go lower than 0
|
||||||
# Default: 1
|
# 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
|
# AuctionHouseBot.Buyer.PreventOverpayingForVendorItems
|
||||||
# When enabled, the buyer bot will avoid purchasing auction house items
|
# When enabled, the buyer bot will avoid purchasing auction house items
|
||||||
# that are being sold for more than the vendor sell price. This prevents
|
# 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.Enabled = false
|
||||||
AuctionHouseBot.Buyer.BuyCandidatesPerBuyCycle = 1
|
AuctionHouseBot.Buyer.BuyCandidatesPerBuyCycle = 1
|
||||||
AuctionHouseBot.Buyer.AcceptablePriceModifier = 1
|
AuctionHouseBot.Buyer.AcceptablePriceModifier = 1
|
||||||
|
AuctionHouseBot.Buyer.AlwaysBidMaxCalculatedPrice = false
|
||||||
AuctionHouseBot.Buyer.PreventOverpayingForVendorItems = true
|
AuctionHouseBot.Buyer.PreventOverpayingForVendorItems = true
|
||||||
AuctionHouseBot.Buyer.BidAgainstPlayers = false
|
AuctionHouseBot.Buyer.BidAgainstPlayers = false
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ AuctionHouseBot::AuctionHouseBot() :
|
|||||||
ListingExpireTimeInSecondsMin(900),
|
ListingExpireTimeInSecondsMin(900),
|
||||||
ListingExpireTimeInSecondsMax(86400),
|
ListingExpireTimeInSecondsMax(86400),
|
||||||
BuyingBotAcceptablePriceModifier(1),
|
BuyingBotAcceptablePriceModifier(1),
|
||||||
|
BuyingBotAlwaysBidMaxCalculatedPrice(false),
|
||||||
BuyingBotWillBidAgainstPlayers(false),
|
BuyingBotWillBidAgainstPlayers(false),
|
||||||
AHCharactersGUIDsForQuery(""),
|
AHCharactersGUIDsForQuery(""),
|
||||||
ItemsPerCycle(75),
|
ItemsPerCycle(75),
|
||||||
@@ -1106,12 +1107,18 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
|
|||||||
if (auction->bid == 0 && auction->startbid <= willingToPayForStackPrice)
|
if (auction->bid == 0 && auction->startbid <= willingToPayForStackPrice)
|
||||||
{
|
{
|
||||||
doBid = true;
|
doBid = true;
|
||||||
calcBidAmount = auction->startbid;
|
if (BuyingBotAlwaysBidMaxCalculatedPrice == true)
|
||||||
|
calcBidAmount = willingToPayForStackPrice;
|
||||||
|
else
|
||||||
|
calcBidAmount = auction->startbid;
|
||||||
}
|
}
|
||||||
else if (auction->bid != 0 && (auction->bid + auction->GetAuctionOutBid()) < willingToPayForStackPrice)
|
else if (auction->bid != 0 && (auction->bid + auction->GetAuctionOutBid()) < willingToPayForStackPrice)
|
||||||
{
|
{
|
||||||
doBid = true;
|
doBid = true;
|
||||||
calcBidAmount = auction->bid + auction->GetAuctionOutBid();
|
if (BuyingBotAlwaysBidMaxCalculatedPrice == true)
|
||||||
|
calcBidAmount = willingToPayForStackPrice;
|
||||||
|
else
|
||||||
|
calcBidAmount = auction->bid + auction->GetAuctionOutBid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1304,6 +1311,7 @@ void AuctionHouseBot::InitializeConfiguration()
|
|||||||
// Buyer Bot
|
// Buyer Bot
|
||||||
BuyingBotBuyCandidatesPerBuyCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.Buyer.BuyCandidatesPerBuyCycle", 1);
|
BuyingBotBuyCandidatesPerBuyCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.Buyer.BuyCandidatesPerBuyCycle", 1);
|
||||||
BuyingBotAcceptablePriceModifier = sConfigMgr->GetOption<float>("AuctionHouseBot.Buyer.AcceptablePriceModifier", 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);
|
PreventOverpayingForVendorItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.Buyer.PreventOverpayingForVendorItems", true);
|
||||||
if (PreventOverpayingForVendorItems)
|
if (PreventOverpayingForVendorItems)
|
||||||
populateVendorItemsPrices();
|
populateVendorItemsPrices();
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ private:
|
|||||||
uint32 ListingExpireTimeInSecondsMin;
|
uint32 ListingExpireTimeInSecondsMin;
|
||||||
uint32 ListingExpireTimeInSecondsMax;
|
uint32 ListingExpireTimeInSecondsMax;
|
||||||
float BuyingBotAcceptablePriceModifier;
|
float BuyingBotAcceptablePriceModifier;
|
||||||
|
bool BuyingBotAlwaysBidMaxCalculatedPrice;
|
||||||
bool BuyingBotWillBidAgainstPlayers;
|
bool BuyingBotWillBidAgainstPlayers;
|
||||||
std::vector<uint32> vendorItemsPrices;
|
std::vector<uint32> vendorItemsPrices;
|
||||||
std::string AHCharactersGUIDsForQuery;
|
std::string AHCharactersGUIDsForQuery;
|
||||||
|
|||||||
Reference in New Issue
Block a user