View Single Post
02/10/16, 05:33 PM   #8
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
Originally Posted by ZOS_ChipHilseberg View Post
Do you mean some way to query the ability ids for the morphs so you don't have to hard code data tables?
I already seem to get them for abilities that I have learned with the following code:
Lua Code:
  1. local function PrintAbilityInfo(abilityId)
  2.             local name = GetAbilityName(abilityId)
  3.             local icon = GetAbilityIcon(abilityId)
  4.             local hasProgression, progressionIndex, lastRankXp, nextRankXp, currentXp, atMorph = GetAbilityProgressionXPInfoFromAbilityId(abilityId)
  5.             if(hasProgression and nextRankXp > 0) then -- not maxed
  6.                 local rank = GetAbilityProgressionRankFromAbilityId(abilityId)
  7.                 local percent = currentXp / nextRankXp * 100
  8.                 df("%d: %s |t100%%:100%%:%s|t: %d (%.2f%%)", abilityId, name, icon, rank, percent)
  9.                 return GetAbilityProgressionAbilityId(progressionIndex, 1, 1), GetAbilityProgressionAbilityId(progressionIndex, 2, 1)
  10.             end
  11.         end
  12.      
  13.         for i = 1, GetNumAbilities() do
  14.             local morphA, morphB = PrintAbilityInfo(GetAbilityIdByIndex(i))
  15.             if(morphA) then PrintAbilityInfo(morphA) end
  16.             if(morphB) then PrintAbilityInfo(morphB) end
  17.         end

But if I never leveled the skill it does not seem to work and it also does not return the currentXp for the morph if I haven't put a skillpoint into it. Same for a skill where I have chosen morphA, but never morphB.