From 6d784b00f9b6c6f7fac0e4585da6777a90810197 Mon Sep 17 00:00:00 2001 From: NathanHandley Date: Thu, 30 Nov 2023 09:42:33 -0600 Subject: [PATCH] Code restructuring --- src/AuctionHouseBot.cpp | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/AuctionHouseBot.cpp b/src/AuctionHouseBot.cpp index 9f09c03..657c484 100644 --- a/src/AuctionHouseBot.cpp +++ b/src/AuctionHouseBot.cpp @@ -235,18 +235,6 @@ void AuctionHouseBot::populateItemCandidateList() continue; } - // Skip any items not in the seed list - if (std::find(itemCandidateClassWeightedSeedList.begin(), itemCandidateClassWeightedSeedList.end(), itr->second.Class) == itemCandidateClassWeightedSeedList.end()) - continue; - - // Skip any BOP items - if (itr->second.Bonding == BIND_WHEN_PICKED_UP) - continue; - - // Restrict quality to anything under 7 (artifact and below) or above poor - if (itr->second.Quality == 0 || itr->second.Quality > 6) - continue; - // Disabled items by Id if (DisabledItems.find(itr->second.ItemId) != DisabledItems.end()) { @@ -255,6 +243,22 @@ void AuctionHouseBot::populateItemCandidateList() continue; } + // Skip any items not in the seed list + if (std::find(itemCandidateClassWeightedSeedList.begin(), itemCandidateClassWeightedSeedList.end(), itr->second.Class) == itemCandidateClassWeightedSeedList.end()) + continue; + + // Skip any BOP items + if (itr->second.Bonding == BIND_WHEN_PICKED_UP || itr->second.Bonding == BIND_QUEST_ITEM) + { + if (debug_Out_Filters) + LOG_ERROR("module", "AuctionHouseBot: Item {} disabled (BOP or BQI)", itr->second.ItemId); + continue; + } + + // Restrict quality to anything under 7 (artifact and below) or above poor + if (itr->second.Quality == 0 || itr->second.Quality > 6) + continue; + // Disable conjured items if (itr->second.IsConjuredConsumable()) { @@ -295,14 +299,6 @@ void AuctionHouseBot::populateItemCandidateList() continue; } - // Disable items which are bind quest Items - if (itr->second.Bonding == BIND_QUEST_ITEM) - { - if (debug_Out_Filters) - LOG_ERROR("module", "AuctionHouseBot: Item {} disabled (BOP or BQI and Required Level is less than Item Level)", itr->second.ItemId); - continue; - } - // Disable anything with the string literal of a testing or depricated item if (DisabledItemTextFilter == true && (itr->second.Name1.find("Test ") != std::string::npos ||