Code restructuring

This commit is contained in:
NathanHandley
2023-11-30 09:42:33 -06:00
parent d1a895dcfc
commit 6d784b00f9

View File

@@ -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 ||