Fix error-out on a fresh server

This commit is contained in:
NathanHandley
2025-03-11 19:21:45 -05:00
parent 2bc97d5a46
commit 6d85af09f5
2 changed files with 7 additions and 6 deletions

View File

@@ -36,8 +36,8 @@
AuctionHouseBot.DEBUG = 0 AuctionHouseBot.DEBUG = 0
AuctionHouseBot.DEBUG_FILTERS = 0 AuctionHouseBot.DEBUG_FILTERS = 0
AuctionHouseBot.EnableSeller = 1 AuctionHouseBot.EnableSeller = 0
AuctionHouseBot.EnableBuyer = 1 AuctionHouseBot.EnableBuyer = 0
AuctionHouseBot.GUIDs = 0 AuctionHouseBot.GUIDs = 0
AuctionHouseBot.ItemsPerCycle = 75 AuctionHouseBot.ItemsPerCycle = 75

View File

@@ -726,11 +726,11 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
void AuctionHouseBot::Update() void AuctionHouseBot::Update()
{ {
time_t _newrun = time(NULL); if ((AHBSeller == false) && (AHBBuyer == false))
if ((!AHBSeller) && (!AHBBuyer))
return; return;
if (AHCharacters.size() == 0) if (AHCharacters.size() == 0)
return; return;
time_t _newrun = time(NULL);
// Randomly select the bot to load, and load it // Randomly select the bot to load, and load it
uint32 botIndex = urand(0, AHCharacters.size() - 1); uint32 botIndex = urand(0, AHCharacters.size() - 1);
@@ -783,10 +783,11 @@ void AuctionHouseBot::InitializeConfiguration()
AHBSeller = sConfigMgr->GetOption<bool>("AuctionHouseBot.EnableSeller", false); AHBSeller = sConfigMgr->GetOption<bool>("AuctionHouseBot.EnableSeller", false);
AHBBuyer = sConfigMgr->GetOption<bool>("AuctionHouseBot.EnableBuyer", false); AHBBuyer = sConfigMgr->GetOption<bool>("AuctionHouseBot.EnableBuyer", false);
if (AHBSeller == false && AHBBuyer == false)
return;
AddCharacters(sConfigMgr->GetOption<std::string>("AuctionHouseBot.GUIDs", "0")); AddCharacters(sConfigMgr->GetOption<std::string>("AuctionHouseBot.GUIDs", "0"));
if (AHCharacters.size() == 0)
AddCharacters(sConfigMgr->GetOption<std::string>("AuctionHouseBot.GUID", "0")); // Backwards compat
ItemsPerCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.ItemsPerCycle", 75); ItemsPerCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.ItemsPerCycle", 75);
// Stack Ratios // Stack Ratios