Spends (or unspends) talent points in the Talent UI's preview mode

Signature:

AddPreviewTalentPoints(tabIndex, talentIndex, points, isPet, talentGroup)

Arguments:

  • tabIndex - Index of a talent tab (between 1 and GetNumTalentTabs()) (number)
  • talentIndex - Index of a talent option (between 1 and GetNumTalents()) (number)
  • points - Number of points to spend on the talent, or a negative number to unspend points. Values larger than allowed for the talent will be clipped to the maximum value (e.g. attempting to spend ten points on a talent that has five ranks will only spend up to five points). (number)
  • isPet - True to edit talents for the player's pet, false to edit talents for the player (boolean)
  • talentGroup - Which set of talents to edit, if the player has Dual Talent Specialization enabled (number)
    • 1 - Primary Talents
    • 2 - Secondary Talents
    • nil - Currently active talents