Sorry for the thread necro, but it seemed appropriate.
What I'd like to do is get the currently equipped weapon's spent AP and the AP for the next level. For my weapon, it would be 20,021,044,100 and 45.1 billion (although I need the exact number).
The reason I need the exact numbers for both is that I want to divide currentAP by nextRankAP so I can get it into a 0-1 range. I have been looking at the FrameXML code to see what's there, but something is eluding me.
What I have is thus:
Lua Code:
local _, _, _, _, totalAP, pointsSpent, _, _, _, _, _, _, artifactTier = C_ArtifactUI.GetEquippedArtifactInfo()
local _, ap, apForNextPoint = MainMenuBar_GetNumArtifactTraitsPurchasableFromXP(pointsSpent, totalAP, artifactTier)
However, I am getting a nil error for artifactAP (Blizzard defines it as artifactXP, but that's nonsense!
).
Lua Code:
16x FrameXML\MainMenuBar.lua:126: attempt to compare number with nil
FrameXML\MainMenuBar.lua:126: in function `MainMenuBar_GetNumArtifactTraitsPurchasableFromXP'
ElvUI_ProgressiveDataBarsColors\Artifact.lua:15: in function <ElvUI_ProgressiveDataBarsColors\Artifact.lua:5>
(tail call): ?
[C]: in function `UpdateArtifact'
ElvUI_ProgressiveDataBarsColors\Artifact.lua:37: in function `HookArtifactBar'
...faceElvUI_ProgressiveDataBarsColors\Core.lua:64: in function `EnableDisable'
...faceElvUI_ProgressiveDataBarsColors\Core.lua:44: in function `Initialize'
...faceElvUI_ProgressiveDataBarsColors\Core.lua:38: in function <...faceElvUI_ProgressiveDataBarsColors\Core.lua:37>
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:155: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:155>
[string "safecall Dispatcher[1]"]:4: in function <[string "safecall Dispatcher[1]"]:4>
[C]: ?
[string "safecall Dispatcher[1]"]:13: in function `?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:90: in function `Fire'
ElvUI\core\core.lua:1299: in function `InitializeModules'
ElvUI\core\core.lua:1467: in function `Initialize'
ElvUI\init.lua:139: in function <ElvUI\init.lua:138>
Locals:
pointsSpent = 68
artifactXP = nil
artifactTier = 2
numPoints = 0
xpForNextPoint = 45104000000
(*temporary) = 68
(*temporary) = 2
(*temporary) = 45104000000
(*temporary) = "attempt to compare number with nil"