# Get Hero Talent Link

Grammar — Get Hero Talent Link(player, index)
FlagsNative | Function

# Arguments

  • int — Player
  • int — Index

Returns — string<gamelink::Talent>

native string TalentTreeGetHeroTalentLink(
	int inPlayer,
	int inIndex,
);

Category: Talent Tree / Basic

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:1511

                lv_debugTalentCatalogMaxIndexForCurrentTier += libGame_gv_talents_TalentChoices[lp_trigPlayer][lv_talentArrayIndex].lv_numberOfTalentsForThisTier;
                while ((lv_debugTalentCatalogIndex < lv_debugTalentCatalogMaxIndexForCurrentTier)) {
                    if ((TalentTreeGetHeroTalentLink(lp_trigPlayer, lv_debugTalentCatalogIndex) == libAIAI_gv_aIHeroes[lp_trigPlayer].lv_talentBuilds[lv_curBuildNum].lv_talents[lv_talentArrayIndex])) {
                        lv_debugTalentFound = true;
                        break;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:1587

        lv_currentTalentIndex = 1;
        for ( ; lv_currentTalentIndex <= auto6EBA0B45_ae ; lv_currentTalentIndex += 1 ) {
            if ((libGame_gv_talents_TalentChoices[lp_trigPlayer][lv_currentTalentIndex].lv_selection != 0) && (libAIAI_gv_aIHeroes[lp_trigPlayer].lv_talentBuilds[lv_currentBuildIndex].lv_talents[lv_currentTalentIndex] == TalentTreeGetHeroTalentLink(lp_trigPlayer, TalentTreeGetSelectedHeroTalentTree(lp_trigPlayer, lv_currentTalentIndex)))) {
                if ((lv_currentTalentIndex == 4)) {
                    lv_currentBuildValue += 2;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:1677

        for ( ; lv_loopIndex <= auto4E1F0EC0_ae ; lv_loopIndex += 1 ) {
            if ((TalentTreeCanSelectHeroTalentTree(lp_trigPlayer, (lv_loopIndex + lv_numPreviousTalents)) == true)) {
                lv_loopTalent = TalentTreeGetHeroTalentLink(lp_trigPlayer, (lv_loopIndex + lv_numPreviousTalents));
                if ((lv_loopTalent == lp_talent)) {
                    libAIAI_gf_HeroAIPickTalent(lp_trigPlayer, lv_loopIndex, (lv_loopIndex + lv_numPreviousTalents));