From 8fc864aa04b849a809b38a340bb947105f54b08c Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Thu, 10 Aug 2023 10:30:21 +0800 Subject: [PATCH] conf for playerbots log & pet init --- conf/playerbots.conf.dist | 2 +- src/PlayerbotFactory.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index e8bacd6b..8f6122d3 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -670,7 +670,7 @@ Playerbots.Updates.EnableDatabases = 1 ################################################################################## Appender.Playerbots=2,5,0,Playerbots.log,w -Logger.playerbots=5,Playerbots +Logger.playerbots=5,Console Playerbots ############################################## diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index d45f3a2f..fe980660 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -529,7 +529,7 @@ void PlayerbotFactory::InitPet() return; } - for (uint32 i = 0; i < 100; i++) + for (uint32 i = 0; i < 10; i++) { uint32 index = urand(0, ids.size() - 1); CreatureTemplate const* co = sObjectMgr->GetCreatureTemplate(ids[index]); @@ -554,7 +554,6 @@ void PlayerbotFactory::InitPet() pet = bot->CreateTamedPetFrom(co->Entry, 0); if (!pet) { - LOG_ERROR("playerbots", "No pet."); continue; } @@ -2019,7 +2018,7 @@ void PlayerbotFactory::InitTalentsByTemplate(uint32 specNo) } // bot->SaveToDB(); - for (std::vector p : sPlayerbotAIConfig->defaultTalentsOrder[bot->getClass()][specNo]) { + for (std::vector &p : sPlayerbotAIConfig->defaultTalentsOrder[bot->getClass()][specNo]) { uint32 tab = p[0], row = p[1], col = p[2], lvl = p[3]; uint32 talentID = -1;