From 8ebed9557e8ceb312848d3f7d8e73b2648e2c5ed Mon Sep 17 00:00:00 2001 From: mtm84 Date: Tue, 30 Jul 2024 09:24:44 -0700 Subject: [PATCH] Update RandomPlayerbotFactory.cpp code cleanup --- src/RandomPlayerbotFactory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/RandomPlayerbotFactory.cpp b/src/RandomPlayerbotFactory.cpp index 2ee1a1a0..93ec5a40 100644 --- a/src/RandomPlayerbotFactory.cpp +++ b/src/RandomPlayerbotFactory.cpp @@ -117,7 +117,8 @@ RandomPlayerbotFactory::RandomPlayerbotFactory(uint32 accountId) : accountId(acc } } -Player* RandomPlayerbotFactory::CreateRandomBot(WorldSession* session, uint8 cls, std::unordered_map> names) +//Player* RandomPlayerbotFactory::CreateRandomBot(WorldSession* session, uint8 cls, std::unordered_map> names) +Player* RandomPlayerbotFactory::CreateRandomBot(WorldSession* session, uint8 cls) { LOG_DEBUG("playerbots", "Creating new random bot for class {}", cls); @@ -416,7 +417,7 @@ void RandomPlayerbotFactory::CreateRandomBots() uint32 totalRandomBotChars = 0; uint32 totalCharCount = sPlayerbotAIConfig->randomBotAccountCount * 10; - std::unordered_map> names; + //std::unordered_map> names; std::vector> playerBots; std::vector sessionBots; int bot_creation = 0; @@ -463,7 +464,8 @@ void RandomPlayerbotFactory::CreateRandomBots() } if (cls != 10) { - if (Player* playerBot = factory.CreateRandomBot(session, cls, names)) { + //if (Player* playerBot = factory.CreateRandomBot(session, cls, names)) { + if (Player* playerBot = factory.CreateRandomBot(session, cls)) { playerBot->SaveToDB(true, false); sCharacterCache->AddCharacterCacheEntry(playerBot->GetGUID(), accountId, playerBot->GetName(), playerBot->getGender(), playerBot->getRace(), playerBot->getClass(), playerBot->GetLevel());