View Single Post
12/06/17, 04:18 PM   #19
fritzOSU03
 
fritzOSU03's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 19
Here's a look at where I left off with that idea once I realized that some points weren't counting correctly.

Lua Code:
  1. local function USPF_SetFoliumDiscognitumPoints()
  2.     local skillPoints = GetAvailableSkillPoints()
  3.     for skillType = 1, GetNumSkillTypes() do
  4.         for skillLine = 1, GetNumSkillLines(skillType) do
  5.             for ability = 1, GetNumSkillAbilities(skillType, skillLine) do
  6.                 if GetSkillAbilityUpgradeInfo(skillType, skillLine, ability) ~= nil then
  7.                     skillPoints = skillPoints + GetSkillAbilityUpgradeInfo(skillType, skillLine, ability)
  8.                 else
  9.                     _, _, _, _, _, purchased = GetSkillAbilityInfo(skillType, skillLine, ability)
  10.                     skillPoints = (purchased and skillPoints + 1 or skillPoints)
  11.                 end
  12.             end
  13.         end
  14.     end
  15.    
  16.     local skillPointsDiff = USPF.pointsData.ptsLevel + USPF.pointsData.ptsMainQuest + USPF.pointsData.ptsMorrowindCharacter +
  17.             USPF.pointsData.ptsAvALevel + USPF.pointsData.ptsMaelstrom + USPF.pointsData.ptsQuestTotal +
  18.             USPF.pointsData.ptsSkyshardTotal + USPF.pointsData.ptsGroupDungeonTotal + USPF.pointsData.ptsPDGBTotal
  19.     USPF.pointsData.ptsFoliumDiscognitum = (skillPoints == skillPointsDiff - 2 and 2 or 0)
  20.     end
  21. end
  Reply With Quote