Merge pull request #12 from NathanHandley/BotSellRework

Disabled database-based disabled item store
This commit is contained in:
Nathan Handley
2023-11-27 21:43:56 -06:00
committed by GitHub

View File

@@ -96,6 +96,12 @@ void AuctionHouseBot::calculateItemValue(ItemTemplate const* itemProto, uint64&
outBuyoutPrice = urand(500, 1500); outBuyoutPrice = urand(500, 1500);
} }
// If still no buy price, give it something low
if (outBuyoutPrice == 0)
{
outBuyoutPrice = urand(500, 1500);
}
// Multiply the price based on quality // Multiply the price based on quality
switch (itemProto->Quality) switch (itemProto->Quality)
{ {
@@ -726,16 +732,19 @@ void AuctionHouseBot::Update()
void AuctionHouseBot::Initialize() void AuctionHouseBot::Initialize()
{ {
DisableItemStore.clear(); DisableItemStore.clear();
QueryResult result = WorldDatabase.Query("SELECT item FROM mod_auctionhousebot_disabled_items"); // No longer make this a database thing
//QueryResult result = WorldDatabase.Query("SELECT item FROM mod_auctionhousebot_disabled_items");
if (result) //if (result)
{ //{
do // do
{ // {
Field* fields = result->Fetch(); // Field* fields = result->Fetch();
DisableItemStore.insert(fields[0].Get<uint32>()); // DisableItemStore.insert(fields[0].Get<uint32>());
} while (result->NextRow()); // } while (result->NextRow());
} //}
DisableItemStore.insert(51809); // Portable Hole
DisableItemStore.insert(38082); // Gigantique Bag
//End Filters //End Filters
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION)) if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))