Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/modules/Bots/playerbot/AiFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,14 @@ map<uint32, int32> AiFactory::GetPlayerSpecTabs(Player* bot)
}

uint32 classMask = bot->getClassMask();
for (uint32 i = 0; i < sTalentStore.GetNumRows() && bot->GetFreeTalentPoints(); ++i)
uint32 spentPoints = bot->getLevel() >= 10 ? (bot->getLevel() - 9) - bot->GetFreeTalentPoints() : 0;
uint32 found = 0;

for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i)
{
if (found >= spentPoints)
break;

TalentEntry const *talentInfo = sTalentStore.LookupEntry(i);
if (!talentInfo)
{
Expand Down Expand Up @@ -108,8 +114,8 @@ map<uint32, int32> AiFactory::GetPlayerSpecTabs(Player* bot)
if (spellid && bot->HasSpell(spellid))
{
tabs[talentTabInfo->tabpage]++;
found++;
}

}
}

Expand Down
Loading