conf for playerbots log & pet init

This commit is contained in:
Yunfan Li
2023-08-10 10:30:21 +08:00
parent 7063c5b563
commit 8fc864aa04
2 changed files with 3 additions and 4 deletions

View File

@@ -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
##############################################

View File

@@ -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<uint32> p : sPlayerbotAIConfig->defaultTalentsOrder[bot->getClass()][specNo]) {
for (std::vector<uint32> &p : sPlayerbotAIConfig->defaultTalentsOrder[bot->getClass()][specNo]) {
uint32 tab = p[0], row = p[1], col = p[2], lvl = p[3];
uint32 talentID = -1;