mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
InitTalentsTree
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -115,7 +115,7 @@ class PlayerbotFactory : public InventoryAction
|
||||
|
||||
static uint32 tradeSkills[];
|
||||
static float CalculateItemScore(uint32 item_id, Player* bot);
|
||||
void InitTalentsTree(bool incremental = false, bool use_template = true);
|
||||
void InitTalentsTree(bool incremental = false, bool use_template = true, bool reset = false);
|
||||
void InitAvailableSpells();
|
||||
void InitClassSpells();
|
||||
void InitEquipment(bool incremental);
|
||||
|
||||
@@ -336,7 +336,7 @@ bool AutoSetTalentsAction::Execute(Event event)
|
||||
return false;
|
||||
|
||||
PlayerbotFactory factory(bot, bot->GetLevel());
|
||||
factory.InitTalentsTree(true);
|
||||
factory.InitTalentsTree(true, true, true);
|
||||
|
||||
botAI->TellMaster(out);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user