Broker Artifact
A simple LDB (LibDataBroker) display for Artifact Power.
It will show you the current Artifact Power (Artifact XP) and available rank points as a data feed for your favorite Data Broker display. If you're showing an icon, the icon will always reflect your equipped artifact.
Shift+Click on the feed will send the current Artifact Power to the chat box. Clicking the feed will open the Artifact Panel.
By itself this addon does nothing. You will need a LibDataBroker Display, like:
If you only display the broker as an icon the tooltip is rather crammed:
Current icon tooltip
I'm actually reusing the Blizzard tooltip. That is the exact same way the tooltip is on the default UI (unless they changed it since 7.0 and now they abbreviate numbers).
I love this addon but my OCD is compelling me to complain about the naming of the file. The addon is called Broker Artifact but the file is labeled as LDB-Artifact so it is not grouped with all the "B"/Broker labeled addons but off on its own in "L" labeled files.
:/
Rank 57 breaks linking, but not 100 percent sure its a LDB-Artifact issue. Here is the error:
8x integer overflow attempting to store 2516000000
[C]: in function `format'
LDB-Artifact\Artifact.lua:110: in function `OnClick'
Bazooka\Bazooka-v2.8.0.lua:1414: in function <Bazooka\Bazooka.lua:1411>
Locals:
(*temporary) = "%s: %d/%d (Rank %d)"
(*temporary) = "|cffe6cc80|Hitem:128292:3370:143700:142191:147757::::110:251:16777472:9:1:717:383:1:3:3394:1572:3337:3:3418:1522:3337:3:3572:1487:3336|h[Blades of the Fallen Prince]|h|r"
(*temporary) = 726050
(*temporary) = 2516000000
(*temporary) = 57
Should work now.
Confirmed. Alpha works. Thank you for keeping up with this app, it has allowed me to link my progress to guild and be told I need to go outside :)
thank you!
Possible to add a percent to the broker display so it looks something like
(45%) 22.1M/49.0M AP
Thanks for the short numbers :)
You're welcomed.
The addon no longer displays my total amount of AP for the weapon, all the text is merged at the bottom of the screen. I'm going to assume this is due to having an ap value above the old 32 bit integer bug (2143xxxxxx?), but I am not certain.
Edit: To clarify, I just got Concordence on one of my specs. I noticed shortly after crossing the 2 billion ap mark that the tooltip no longer displayed correctly. When I swap specializations, the tooltip returns to its normal function.
Edit2: A fix for this issue: Go to lines 81 and 84, change cff00ff00%d to cff00ff00%.0f and save it.
For the maintainer, I took a look at this and it just seems to be an issue with the string.format calls to display the total amount of AP earned:
Lines 81 and 84 respectively :
tooltip:AddLine(string.format("Earned AP: |cff00ff00%d|r", earnedXP), HIGHLIGHT_FONT_COLOR:GetRGB());
tooltip:AddLine(string.format("Artifact AP: |cff00ff00%d|r", spentXP), HIGHLIGHT_FONT_COLOR:GetRGB());
If you change those two format strings to be floats instead of integers (%.0f instead of %d), it works fine.
tooltip:AddLine(string.format("Earned AP: |cff00ff00%.0f|r", earnedXP), HIGHLIGHT_FONT_COLOR:GetRGB());
tooltip:AddLine(string.format("Artifact AP: |cff00ff00%.0f|r", spentXP), HIGHLIGHT_FONT_COLOR:GetRGB());
Should be fine now.
Hope that helps.
Regards
Nice! Worked like a charm. Here is the updated lua to save peeps some time.
http://s000.tinyupload.com/?file_id=07612546913922938081
FEATURE REQUEST:
make it start rounding to the x.x million when it gets there.
or at least add the option to do so, we can always mouse over to see more exacting numbers, but right now it EATS a huge chunk of my bar and I can't find any options to change it.
Can we get an option to truncate the numbers further or add commas.
Hi, can you please add the function to see AP gained in current session? It will be perfect then, thanks for the addon ^^
getting this error
50x LDB-Artifact\Artifact.lua:13: Usage: local cost = C_ArtifactUI.GetCostForPointAtRank(rank, tier)
[C]: in function `GetCostForPointAtRank'
LDB-Artifact\Artifact.lua:13: in function <LDB-Artifact\Artifact.lua:11>
LDB-Artifact\Artifact.lua:30: in function <LDB-Artifact\Artifact.lua:27>
LDB-Artifact\Artifact.lua:126: in function <LDB-Artifact\Artifact.lua:123>
Locals:
(*temporary) = 40
Update.
When I load it into ElvUI it shows for example 2153k/3975k.
After realoading UI it shows -1821.9k instead.
Any way to keep the first option instead of the second one?
Pic: http://imgur.com/a/rBE8j