Quantcast Current maximum Artifact power - WoWInterface
Thread Tools Display Modes
07-29-17, 04:29 AM   #1
yoshimo
A Deviate Faerie Dragon
Join Date: May 2006
Posts: 17
Current maximum Artifact power

I want to avoid showing a button to use Artifact power items when the character is capped and all that would happen after the cast is the red error "your artifact has maximum power".
The question is how to do this?
I could go for ranks purchased/learned from GetArtifactInfo, QuestCheck (maybe attack on the broken shore by Khadgar?), but i am unsure if this would be dynamic enough compared across classes.
  Reply With Quote
07-29-17, 04:41 AM   #2
lightspark
A Cobalt Mageweaver
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 246
Originally Posted by yoshimo View Post
I want to avoid showing a button to use Artifact power items when the character is capped and all that would happen after the cast is the red error "your artifact has maximum power".
The question is how to do this?
I could go for ranks purchased/learned from GetArtifactInfo, QuestCheck (maybe attack on the broken shore by Khadgar?), but i am unsure if this would be dynamic enough compared across classes.
Eh? It's kinda impossible to hit the cap. Why don't you just empower your artefact?

-- edit #1

The only dynamic aspect of this thingy is artefact empowerment quest, IIRC, it's different for each spec, so I'd just check if this quest was completed, if not, I'd check if artefact had all 54 traits, if yes, I'd disable the button.
__________________

Last edited by lightspark : 07-29-17 at 04:52 AM.
  Reply With Quote
07-29-17, 06:56 AM   #3
yoshimo
A Deviate Faerie Dragon
Join Date: May 2006
Posts: 17
Do all artifacts have the exact same amount of treats except maybe the fishing pole?
It is possible to hit that error, now if you don't do broken shore, later in the game maybe completely
  Reply With Quote
07-29-17, 08:19 AM   #4
lightspark
A Cobalt Mageweaver
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 246
Originally Posted by yoshimo View Post
Do all artifacts have the exact same amount of treats except maybe the fishing pole?
It is possible to hit that error, now if you don't do broken shore, later in the game maybe completely
Yes, all artefacts have the same number of traits and amount of AP that's required to purchase all traits.
__________________

Last edited by lightspark : 07-29-17 at 11:41 AM.
  Reply With Quote
07-29-17, 11:31 AM   #5
Kanegasi
A Flamescale Wyrmkin
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 143
Maximum AP a 7.2 weapon can hold is 865,842,644,766,330. The final 50th rank of Concordance costs exactly 200 trillion. It is literally impossible for anyone to reach that point, at least now on live servers. We're getting more AK in 7.3, so new calculations for farming will be needed. If you would like to treat the first rank of Concordance as the max (which is 52 traits purchased), total AP at that point is 2,228,766,330 with the 52nd trait costing 520,000,000.
  Reply With Quote
08-01-17, 04:10 PM   #6
CC_WOW
A Deviate Faerie Dragon
 
CC_WOW's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2016
Posts: 18
I have this exact functionality in my addon (assuming you are talking about non-empowered artifacts only). You can simply use the "artifact tier" available through the regular Artifact API in combination with the number of purchased traits (54 for tier 1, unlimited for tier 2 as mentioned by others).

Tier = 1 means it hasn't been empowered, tier = 2 is what you get after completing the quest. Presumably, the new ranks are going to turn it into a tier 3 artifact in future patches.
  Reply With Quote
08-08-17, 01:07 PM   #7
yoshimo
A Deviate Faerie Dragon
Join Date: May 2006
Posts: 17
Code:
print("--")
local a=C_ArtifactUI.GetPowers()
--print(a[18])

local data = C_ArtifactUI.GetPowerInfo(a[18]);

print(data.isFinal)

for i, j in pairs( C_ArtifactUI.GetPowerInfo(a[18]) ) do
   --   print(i,j)
end
if C_ArtifactUI.GetPowerInfo(a[18]).maxRank > 1 then
   print('Not unlocked')
end
Was quite intresting in ArtifactPowerHelper.
Now (as asked there), i am looking for the trigger that tells items apart that can be used with the empowered Weapon and those items that are "too old and weak" and will trigger the "your weapon is too powerful" barrier.
Is it encoded in the itemlink like the AK multiplier maybe?
  Reply With Quote
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: 836
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
10-22-17, 02:44 AM   #9
Yukyuk
A Flamescale Wyrmkin
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 117
There is a new addon, TotalAP, maybe in that code you can find what you want.
Looks like the solution is in there.
__________________
Better to fail then never have tried at all.
  Reply With Quote
10-22-17, 03:35 AM   #10
myrroddin
A Molten Giant
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 836
Cool, I will check out its code.
  Reply With Quote
10-22-17, 04:53 AM   #11
myrroddin
A Molten Giant
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 836
Huzzah!
Lua Code:
  1. local current = select(5, C_ArtifactUI.GetEquippedArtifactInfo())
  2. local numTraits = select(6, C_ArtifactUI.GetEquippedArtifactInfo())
  3. local tier = select(13, C_ArtifactUI.GetEquippedArtifactInfo())
  4. local nextCost = C_ArtifactUI.GetCostForPointAtRank(numTraits, tier)
  Reply With Quote
10-22-17, 10:50 PM   #12
Yukyuk
A Flamescale Wyrmkin
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 117
These forums work

Originally Posted by myrroddin View Post
Huzzah!
Lua Code:
  1. local current = select(5, C_ArtifactUI.GetEquippedArtifactInfo())
  2. local numTraits = select(6, C_ArtifactUI.GetEquippedArtifactInfo())
  3. local tier = select(13, C_ArtifactUI.GetEquippedArtifactInfo())
  4. local nextCost = C_ArtifactUI.GetCostForPointAtRank(numTraits, tier)
__________________
Better to fail then never have tried at all.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Current maximum Artifact power

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off