From 3b7d9364ef56ae616f4e9b651d2ec1c1fab253b8 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 24 Dec 2023 00:23:01 +0800 Subject: [PATCH] Init pet talents --- src/PlayerbotFactory.cpp | 1 + src/strategy/actions/ChangeTalentsAction.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 473b0ea1..10b53bee 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -541,6 +541,7 @@ void PlayerbotFactory::InitPetTalents() // LOG_INFO("playerbots", "{} init pet talents failed with petTalentType < 0({})", bot->GetName().c_str(), pet_family->petTalentType); return; } + pet->resetTalents(); std::map > spells; for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { diff --git a/src/strategy/actions/ChangeTalentsAction.cpp b/src/strategy/actions/ChangeTalentsAction.cpp index ea304b50..4d3c5aba 100644 --- a/src/strategy/actions/ChangeTalentsAction.cpp +++ b/src/strategy/actions/ChangeTalentsAction.cpp @@ -337,7 +337,7 @@ bool AutoSetTalentsAction::Execute(Event event) PlayerbotFactory factory(bot, bot->GetLevel()); factory.InitTalentsTree(true, true, true); - + factory.InitPetTalents(); botAI->TellMaster(out); return true;