Fix mistake merge I just did

This commit is contained in:
NathanHandley
2025-10-03 07:27:01 -05:00
parent e10b4e57b2
commit f29a9a07b4

View File

@@ -1318,54 +1318,28 @@ void AuctionHouseBot::Update()
playersPointerVector.reserve(AHBPlayers.size()); playersPointerVector.reserve(AHBPlayers.size());
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. // List New Auctions
auto UpdateAuctionHouses = [&](auto factionHandler) if (sellReady)
{ {
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION)) if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false)
{ {
factionHandler(&AllianceConfig); AddNewAuctions(playersPointerVector, &AllianceConfig);
factionHandler(&HordeConfig); AddNewAuctions(playersPointerVector, &HordeConfig);
} }
factionHandler(&NeutralConfig); AddNewAuctions(playersPointerVector, &NeutralConfig);
}; }
// Pass distinct factionHandler() definition to UpdateAuctionHouses based on Buy/Sell cycle // Place New Bids
// List New Auctions if (buyReady && BuyingBotBuyCandidatesPerBuyCycleMin > 0)
if (sellReady) {
UpdateAuctionHouses([&](FactionSpecificAuctionHouseConfig* cfg){ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false)
AddNewAuctions(playersPointerVector, cfg); {
}); AddNewAuctionBuyerBotBid(playersPointerVector, &AllianceConfig);
AddNewAuctionBuyerBotBid(playersPointerVector, &HordeConfig);
// Place New Bids }
if (buyReady && BuyingBotBuyCandidatesPerBuyCycleMin > 0) AddNewAuctionBuyerBotBid(playersPointerVector, &NeutralConfig);
UpdateAuctionHouses([&](FactionSpecificAuctionHouseConfig* cfg){ }
AddNewAuctionBuyerBotBid(playersPointerVector, cfg);
});
// // List New Auctions
// if (sellReady)
// {
// 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)