bot factory(temp disable guild init)

This commit is contained in:
Yunfan Li
2023-08-24 22:04:30 +08:00
parent 0437d73eb9
commit f879c94d36

View File

@@ -297,19 +297,19 @@ void PlayerbotFactory::Randomize(bool incremental)
pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Guilds"); pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Guilds");
LOG_INFO("playerbots", "Initializing guilds..."); LOG_INFO("playerbots", "Initializing guilds...");
bot->SaveToDB(false, false); bot->SaveToDB(false, false);
InitGuild(); // InitGuild();
// bot->SaveToDB(false, false); // bot->SaveToDB(false, false);
if (pmo) if (pmo)
pmo->finish(); pmo->finish();
if (bot->getLevel() >= 70) // if (bot->getLevel() >= 70)
{ // {
pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Arenas"); // pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Arenas");
LOG_INFO("playerbots", "Initializing arena teams..."); // LOG_INFO("playerbots", "Initializing arena teams...");
InitArenaTeam(); // InitArenaTeam();
if (pmo) // if (pmo)
pmo->finish(); // pmo->finish();
} // }
if (!incremental) { if (!incremental) {
bot->RemovePet(nullptr, PET_SAVE_AS_CURRENT, true); bot->RemovePet(nullptr, PET_SAVE_AS_CURRENT, true);
@@ -338,13 +338,13 @@ void PlayerbotFactory::Randomize(bool incremental)
void PlayerbotFactory::Refresh() void PlayerbotFactory::Refresh()
{ {
// Prepare(); // Prepare();
// InitEquipment(true); InitEquipment(true);
ClearInventory(); ClearInventory();
InitAmmo(); InitAmmo();
InitFood(); InitFood();
InitReagents(); InitReagents();
// InitPotions(); // InitPotions();
InitTalentsTree(true); InitTalentsTree(true, true, true);
InitClassSpells(); InitClassSpells();
InitAvailableSpells(); InitAvailableSpells();
InitSkills(); InitSkills();
@@ -705,7 +705,7 @@ void PlayerbotFactory::InitTalentsTree(bool increment/*false*/, bool use_templat
{ {
uint32 specNo; uint32 specNo;
uint8 cls = bot->getClass(); uint8 cls = bot->getClass();
if (increment && bot->getLevel() > 10) { if (increment && bot->GetFreeTalentPoints() <= 2) {
specNo = AiFactory::GetPlayerSpecTab(bot); specNo = AiFactory::GetPlayerSpecTab(bot);
} else { } else {
uint32 point = urand(0, 100); uint32 point = urand(0, 100);