# Commander Mastery Talent Rank Of Player

Grammar — Mastery Talent Rank talentIndex|Index of player p
FlagsNative | Function

Returns the rank of the chosen mastery talent at the specified index for the player.

# Arguments

  • int — Player
  • int — Talent Index

Returns — int

native int PlayerCommanderMasteryTalentRank(
	int inPlayer,
	int inTalentIndex,
);

Category: Player / Player Settings

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:4545

            TextExpressionSetToken("Param/Expression/lib_COOC_039E4FF2", "A", IntToText(lp_player));
            TextExpressionSetToken("Param/Expression/lib_COOC_039E4FF2", "B", IntToText(libCOOC_gf_CC_PlayerMasteryInternalIndex(lv_indexMasteryUpgrade)));
            TextExpressionSetToken("Param/Expression/lib_COOC_039E4FF2", "C", IntToText(PlayerCommanderMasteryTalentRank(lp_player, libCOOC_gf_CC_PlayerMasteryInternalIndex(lv_indexMasteryUpgrade))));
            TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_COOC_039E4FF2"), false);
            libCOOC_gf_CC_PlayerMasteryUpgradeLevelSet(lp_player, lv_indexMasteryUpgrade, PlayerCommanderMasteryTalentRank(lp_player, libCOOC_gf_CC_PlayerMasteryInternalIndex(lv_indexMasteryUpgrade)));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:4547

            TextExpressionSetToken("Param/Expression/lib_COOC_039E4FF2", "C", IntToText(PlayerCommanderMasteryTalentRank(lp_player, libCOOC_gf_CC_PlayerMasteryInternalIndex(lv_indexMasteryUpgrade))));
            TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_COOC_039E4FF2"), false);
            libCOOC_gf_CC_PlayerMasteryUpgradeLevelSet(lp_player, lv_indexMasteryUpgrade, PlayerCommanderMasteryTalentRank(lp_player, libCOOC_gf_CC_PlayerMasteryInternalIndex(lv_indexMasteryUpgrade)));
        }    
    }