From 33f2da08b8d46d2851980b4409d69b750bb202d8 Mon Sep 17 00:00:00 2001 From: NathanHandley Date: Sat, 25 Nov 2023 17:43:40 -0600 Subject: [PATCH 1/3] Added item exceptions And added librams and pristine black diamonds --- src/AuctionHouseBot.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/AuctionHouseBot.cpp b/src/AuctionHouseBot.cpp index 3c3ffb7..a239b9b 100644 --- a/src/AuctionHouseBot.cpp +++ b/src/AuctionHouseBot.cpp @@ -26,6 +26,8 @@ #include "GameTime.h" #include "DatabaseEnv.h" +#include + using namespace std; AuctionHouseBot::AuctionHouseBot() @@ -156,7 +158,7 @@ void AuctionHouseBot::populateItemClassSeedList() uint32 itemClassSeedWeightGeneric = 1; uint32 itemClassSeedWeightRecipe = 4; uint32 itemClassSeedWeightQuiver = 1; - uint32 itemClassSeedWeightQuest = 1; + uint32 itemClassSeedWeightQuest = 2; uint32 itemClassSeedWeightKey = 1; uint32 itemClassSeedWeightMisc = 0; uint32 itemClassSeedWeightGlyph = 2; @@ -202,10 +204,30 @@ void AuctionHouseBot::populateItemCandidateList() itemCandidatesByItemClass[ITEM_CLASS_MISC] = vector(); itemCandidatesByItemClass[ITEM_CLASS_GLYPH] = vector(); + // Item include exceptions + set includeItemIDExecptions; + includeItemIDExecptions.insert(11732); + includeItemIDExecptions.insert(11733); + includeItemIDExecptions.insert(11734); + includeItemIDExecptions.insert(11736); + includeItemIDExecptions.insert(11737); + includeItemIDExecptions.insert(18332); + includeItemIDExecptions.insert(18333); + includeItemIDExecptions.insert(18334); + includeItemIDExecptions.insert(18335); + // Fill list ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore(); for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr) { + // Always store items that are exceptions + if (includeItemIDExecptions.find(itr->second.ItemId) != includeItemIDExecptions.end()) + { + // Store the item ID + itemCandidatesByItemClass[itr->second.Class].push_back(itr->second.ItemId); + continue; + } + // Skip any items not in the seed list if (std::find(itemCandidateClassWeightedSeedList.begin(), itemCandidateClassWeightedSeedList.end(), itr->second.Class) == itemCandidateClassWeightedSeedList.end()) continue; From ef161195bf2497ab701f8929902d7f514e5ee735 Mon Sep 17 00:00:00 2001 From: NathanHandley Date: Sat, 25 Nov 2023 17:43:50 -0600 Subject: [PATCH 2/3] Increased number of items --- data/sql/db-world/updates/20231125_00c.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/db-world/updates/20231125_00c.sql diff --git a/data/sql/db-world/updates/20231125_00c.sql b/data/sql/db-world/updates/20231125_00c.sql new file mode 100644 index 0000000..8d98e26 --- /dev/null +++ b/data/sql/db-world/updates/20231125_00c.sql @@ -0,0 +1,2 @@ +-- Add More Items +UPDATE mod_auctionhousebot SET minitems = 15000, maxitems = 15000; \ No newline at end of file From 9b63f1da50a48d131f963b16ba4bdd671b4bdaed Mon Sep 17 00:00:00 2001 From: NathanHandley Date: Sat, 25 Nov 2023 18:03:05 -0600 Subject: [PATCH 3/3] Added more variable auction listing times --- src/AuctionHouseBot.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/AuctionHouseBot.cpp b/src/AuctionHouseBot.cpp index a239b9b..742b9c9 100644 --- a/src/AuctionHouseBot.cpp +++ b/src/AuctionHouseBot.cpp @@ -462,22 +462,7 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config) calculateItemValue(prototype, bidPrice, buyoutPrice); // Define a duration - uint32 etime = urand(1,3); - switch(etime) - { - case 1: - etime = 43200; - break; - case 2: - etime = 86400; - break; - case 3: - etime = 172800; - break; - default: - etime = 86400; - break; - } + uint32 etime = urand(900, 43200); // Set stack size uint32 stackCount = getStackSizeForItem(prototype);