mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-13 01:08:37 +00:00
Fix mistake merge I just did
This commit is contained in:
@@ -1319,53 +1319,27 @@ void AuctionHouseBot::Update()
|
|||||||
for (const auto& pair : AHBPlayers)
|
for (const auto& pair : AHBPlayers)
|
||||||
playersPointerVector.emplace_back(pair.first.get());
|
playersPointerVector.emplace_back(pair.first.get());
|
||||||
|
|
||||||
|
|
||||||
// Helper: run factionHandler() for each enabled AH config.
|
|
||||||
auto UpdateAuctionHouses = [&](auto factionHandler)
|
|
||||||
{
|
|
||||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
|
||||||
{
|
|
||||||
factionHandler(&AllianceConfig);
|
|
||||||
factionHandler(&HordeConfig);
|
|
||||||
}
|
|
||||||
factionHandler(&NeutralConfig);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Pass distinct factionHandler() definition to UpdateAuctionHouses based on Buy/Sell cycle
|
|
||||||
// List New Auctions
|
// List New Auctions
|
||||||
if (sellReady)
|
if (sellReady)
|
||||||
UpdateAuctionHouses([&](FactionSpecificAuctionHouseConfig* cfg){
|
{
|
||||||
AddNewAuctions(playersPointerVector, cfg);
|
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false)
|
||||||
});
|
{
|
||||||
|
AddNewAuctions(playersPointerVector, &AllianceConfig);
|
||||||
|
AddNewAuctions(playersPointerVector, &HordeConfig);
|
||||||
|
}
|
||||||
|
AddNewAuctions(playersPointerVector, &NeutralConfig);
|
||||||
|
}
|
||||||
|
|
||||||
// Place New Bids
|
// Place New Bids
|
||||||
if (buyReady && BuyingBotBuyCandidatesPerBuyCycleMin > 0)
|
if (buyReady && BuyingBotBuyCandidatesPerBuyCycleMin > 0)
|
||||||
UpdateAuctionHouses([&](FactionSpecificAuctionHouseConfig* cfg){
|
{
|
||||||
AddNewAuctionBuyerBotBid(playersPointerVector, cfg);
|
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false)
|
||||||
});
|
{
|
||||||
|
AddNewAuctionBuyerBotBid(playersPointerVector, &AllianceConfig);
|
||||||
|
AddNewAuctionBuyerBotBid(playersPointerVector, &HordeConfig);
|
||||||
// // List New Auctions
|
}
|
||||||
// if (sellReady)
|
AddNewAuctionBuyerBotBid(playersPointerVector, &NeutralConfig);
|
||||||
// {
|
}
|
||||||
// if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false)
|
|
||||||
// {
|
|
||||||
// AddNewAuctions(playersPointerVector, &AllianceConfig);
|
|
||||||
// AddNewAuctions(playersPointerVector, &HordeConfig);
|
|
||||||
// }
|
|
||||||
// AddNewAuctions(playersPointerVector, &NeutralConfig);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Place New Bids
|
|
||||||
// if (buyReady && BuyingBotBuyCandidatesPerBuyCycleMin > 0)
|
|
||||||
// {
|
|
||||||
// if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false)
|
|
||||||
// {
|
|
||||||
// AddNewAuctionBuyerBotBid(playersPointerVector, &AllianceConfig);
|
|
||||||
// AddNewAuctionBuyerBotBid(playersPointerVector, &HordeConfig);
|
|
||||||
// }
|
|
||||||
// AddNewAuctionBuyerBotBid(playersPointerVector, &NeutralConfig);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Remove AH Bot Players from world
|
// Remove AH Bot Players from world
|
||||||
for (auto& [player, session] : AHBPlayers)
|
for (auto& [player, session] : AHBPlayers)
|
||||||
|
|||||||
Reference in New Issue
Block a user