File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/modules/Bots/playerbot Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,14 @@ map<uint32, int32> AiFactory::GetPlayerSpecTabs(Player* bot)
7878 }
7979
8080 uint32 classMask = bot->getClassMask ();
81- for (uint32 i = 0 ; i < sTalentStore .GetNumRows () && bot->GetFreeTalentPoints (); ++i)
81+ uint32 spentPoints = bot->getLevel () >= 10 ? (bot->getLevel () - 9 ) - bot->GetFreeTalentPoints () : 0 ;
82+ uint32 found = 0 ;
83+
84+ for (uint32 i = 0 ; i < sTalentStore .GetNumRows (); ++i)
8285 {
86+ if (found >= spentPoints)
87+ break ;
88+
8389 TalentEntry const *talentInfo = sTalentStore .LookupEntry (i);
8490 if (!talentInfo)
8591 {
@@ -108,8 +114,8 @@ map<uint32, int32> AiFactory::GetPlayerSpecTabs(Player* bot)
108114 if (spellid && bot->HasSpell (spellid))
109115 {
110116 tabs[talentTabInfo->tabpage ]++;
117+ found++;
111118 }
112-
113119 }
114120 }
115121
You can’t perform that action at this time.
0 commit comments