Merge branch 'master' of github.com:liyunfan1223/mod-playerbots

This commit is contained in:
Yunfan Li
2023-12-25 18:49:05 +08:00
17 changed files with 126 additions and 18 deletions

View File

@@ -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<uint32, std::vector<TalentEntry const*> > spells;
for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i)
{
@@ -798,7 +799,9 @@ void PlayerbotFactory::InitTalentsTree(bool increment/*false*/, bool use_templat
{
uint32 specNo;
uint8 cls = bot->getClass();
if (increment && bot->GetFreeTalentPoints() <= 2) {
std::map<uint8, uint32> tabs = AiFactory::GetPlayerSpecTabs(bot);
uint32 total_tabs = tabs[0] + tabs[1] + tabs[2];
if (increment && bot->GetFreeTalentPoints() <= 2 && total_tabs != 0) {
specNo = AiFactory::GetPlayerSpecTab(bot);
} else {
uint32 point = urand(0, 100);