From e7fe79d946bf638318adac2ec86eead9f4b72136 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Fri, 19 Jul 2024 15:40:31 +0800 Subject: [PATCH] [Initialization] Send talent packet after intialization --- src/AiFactory.cpp | 2 +- src/PlayerbotFactory.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AiFactory.cpp b/src/AiFactory.cpp index d6baa1eb..54d189dc 100644 --- a/src/AiFactory.cpp +++ b/src/AiFactory.cpp @@ -553,7 +553,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const if (sPlayerbotAIConfig->autoSaveMana) { nonCombatEngine->addStrategy("auto save mana"); } - if ((facade->IsRealPlayer() || sRandomPlayerbotMgr->IsRandomBot(player)) && !player->InBattleground()) + if ((sRandomPlayerbotMgr->IsRandomBot(player)) && !player->InBattleground()) { Player* master = facade->GetMaster(); diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 26f9e3a6..c6f78887 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -644,6 +644,7 @@ void PlayerbotFactory::InitPetTalents() spells_row.erase(spells_row.begin() + index); } } + bot->SendTalentsInfoData(true); } void PlayerbotFactory::InitPet() @@ -870,6 +871,7 @@ void PlayerbotFactory::InitTalentsTree(bool increment/*false*/, bool use_templat if (bot->GetFreeTalentPoints()) InitTalents((specTab + 1) % 3); } + bot->SendTalentsInfoData(false); } void PlayerbotFactory::InitTalentsBySpecNo(Player* bot, int specNo, bool reset) @@ -933,6 +935,7 @@ void PlayerbotFactory::InitTalentsBySpecNo(Player* bot, int specNo, bool reset) break; } } + bot->SendTalentsInfoData(false); } void PlayerbotFactory::InitTalentsByParsedSpecLink(Player* bot, std::vector> parsedSpecLink, bool reset) @@ -983,6 +986,7 @@ void PlayerbotFactory::InitTalentsByParsedSpecLink(Player* bot, std::vectorSendTalentsInfoData(false); } class DestroyItemsVisitor : public IterateItemsVisitor @@ -2983,6 +2987,7 @@ void PlayerbotFactory::InitGlyphs(bool increment) } } } + bot->SendTalentsInfoData(false); } void PlayerbotFactory::CancelAuras()