From f29a9a07b4942cd85621a7be94da118381577824 Mon Sep 17 00:00:00 2001 From: NathanHandley Date: Fri, 3 Oct 2025 07:27:01 -0500 Subject: [PATCH] Fix mistake merge I just did --- src/AuctionHouseBot.cpp | 66 +++++++++++++---------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/src/AuctionHouseBot.cpp b/src/AuctionHouseBot.cpp index 185266f..dceef71 100644 --- a/src/AuctionHouseBot.cpp +++ b/src/AuctionHouseBot.cpp @@ -1318,54 +1318,28 @@ void AuctionHouseBot::Update() playersPointerVector.reserve(AHBPlayers.size()); for (const auto& pair : AHBPlayers) 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); - }; + // List New Auctions + if (sellReady) + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION) == false) + { + AddNewAuctions(playersPointerVector, &AllianceConfig); + AddNewAuctions(playersPointerVector, &HordeConfig); + } + AddNewAuctions(playersPointerVector, &NeutralConfig); + } - // Pass distinct factionHandler() definition to UpdateAuctionHouses based on Buy/Sell cycle - // List New Auctions - if (sellReady) - UpdateAuctionHouses([&](FactionSpecificAuctionHouseConfig* cfg){ - AddNewAuctions(playersPointerVector, cfg); - }); - - // Place New Bids - if (buyReady && BuyingBotBuyCandidatesPerBuyCycleMin > 0) - 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); - // } + // 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 for (auto& [player, session] : AHBPlayers)