Quantcast WoWInterface - View Single Post - Current maximum Artifact power
View Single Post
10-22-17, 02:10 AM   #8
myrroddin
A Molten Giant
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 920
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:
  1. local _, _, _, _, totalAP, pointsSpent, _, _, _, _, _, _, artifactTier = C_ArtifactUI.GetEquippedArtifactInfo()
  2. 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:
  1. 16x FrameXML\MainMenuBar.lua:126: attempt to compare number with nil
  2. FrameXML\MainMenuBar.lua:126: in function `MainMenuBar_GetNumArtifactTraitsPurchasableFromXP'
  3. ElvUI_ProgressiveDataBarsColors\Artifact.lua:15: in function <ElvUI_ProgressiveDataBarsColors\Artifact.lua:5>
  4. (tail call): ?
  5. [C]: in function `UpdateArtifact'
  6. ElvUI_ProgressiveDataBarsColors\Artifact.lua:37: in function `HookArtifactBar'
  7. ...faceElvUI_ProgressiveDataBarsColors\Core.lua:64: in function `EnableDisable'
  8. ...faceElvUI_ProgressiveDataBarsColors\Core.lua:44: in function `Initialize'
  9. ...faceElvUI_ProgressiveDataBarsColors\Core.lua:38: in function <...faceElvUI_ProgressiveDataBarsColors\Core.lua:37>
  10. ...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:155: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:155>
  11. [string "safecall Dispatcher[1]"]:4: in function <[string "safecall Dispatcher[1]"]:4>
  12. [C]: ?
  13. [string "safecall Dispatcher[1]"]:13: in function `?'
  14. ...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:90: in function `Fire'
  15. ElvUI\core\core.lua:1299: in function `InitializeModules'
  16. ElvUI\core\core.lua:1467: in function `Initialize'
  17. ElvUI\init.lua:139: in function <ElvUI\init.lua:138>
  18.  
  19. Locals:
  20. pointsSpent = 68
  21. artifactXP = nil
  22. artifactTier = 2
  23. numPoints = 0
  24. xpForNextPoint = 45104000000
  25. (*temporary) = 68
  26. (*temporary) = 2
  27. (*temporary) = 45104000000
  28. (*temporary) = "attempt to compare number with nil"
  Reply With Quote