InitTalentsTree

This commit is contained in:
Yunfan Li
2023-08-09 12:39:00 +08:00
parent cc0a874a4c
commit 4654218d39
3 changed files with 6 additions and 3 deletions

View File

@@ -705,7 +705,7 @@ void PlayerbotFactory::InitSpells()
InitAvailableSpells();
}
void PlayerbotFactory::InitTalentsTree(bool increment/*false*/, bool use_template/*true*/)
void PlayerbotFactory::InitTalentsTree(bool increment/*false*/, bool use_template/*true*/, bool reset/*false*/)
{
uint32 specNo;
uint8 cls = bot->getClass();
@@ -717,6 +717,9 @@ void PlayerbotFactory::InitTalentsTree(bool increment/*false*/, bool use_templat
uint32 p2 = p1 + sPlayerbotAIConfig->specProbability[cls][1];
specNo = (point < p1 ? 0 : (point < p2 ? 1 : 2));
}
if (reset) {
bot->resetTalents(true);
}
// use template if can
if (use_template && sPlayerbotAIConfig->defaultTalentsOrder[cls][specNo].size() > 0) {
InitTalentsByTemplate(specNo);