View Single Post
03/07/16, 03:28 AM   #15
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Wandamey View Post
Only problem : if you want to show the right icon in your interface when selected with a different magic school in the set. checking for functions.

OK heads up : This :
GetAbilityIdByIndex(realAbilityIndex)
returns the right skill id (ice / lightening etc) for the currently equipped weapon.
just fyi
The code I posted above returns the correct icon for whatever rank/morph you currently have (I called it texture):
Lua Code:
  1. local morphedName, texture, abilityIndex = GetAbilityProgressionAbilityInfo(progressionIndex, morphChoice, rank)

Also just for anyone interested the AbilityId, abilityIndex, progressionIndex, and a lot of other things change everytime a skill is ranked or morphed so you have to be careful what you save and how you use it.


Originally Posted by Wandamey View Post
I think the Skill/Line/AbilityIndex are reserved to determine the place of the skill in the tree in the skill window the real skill data comes from ProgressionIndex and what circonian wrote.
Yes "that" abilityIndex is just a reference to the index in the tree. Its confusing that they named two different things abilityIndex in their code.

Originally Posted by Wandamey View Post
Only the defaut skills are registered when browsing them like I did (i.e : my frost skills throw a nil error) so you should definitively use Circonian's method. though if you allow different bars with different weapons, you may consider mixing both methods for the destruction staves.
The method I posted works for the destruction stave skills and other skills that have similar quarks. If you save/load both bars just use:
Lua Code:
  1. GetActiveWeaponPairInfo()
to determine which pair/bar to load/save.