Skip to content

Commit 81f9c61

Browse files
authored
Merge pull request #5 from ChronosSF/702-update
Upping TOC for 702. Fixing an issue with artifact API.
2 parents eb83944 + 89293a6 commit 81f9c61

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Elements/Artifact.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,18 @@ function Artifact:Refresh()
241241
end
242242
local sec_text = db.secText
243243
local per_text
244-
local current_ap = select(5, C_ArtifactUI.GetEquippedArtifactInfo())
245-
local traits_spent = select(6, C_ArtifactUI.GetEquippedArtifactInfo())
244+
local _, _, _, _, current_ap, traits_spent, _, _, _, _, _, _, artifact_tier = C_ArtifactUI.GetEquippedArtifactInfo();
246245

247246
local available = 0
248-
local next_rank_cost = C_ArtifactUI.GetCostForPointAtRank(traits_spent + available) or 0
247+
local next_rank_cost = C_ArtifactUI.GetCostForPointAtRank(traits_spent + available, artifact_tier) or 0
249248

250249
while current_ap >= next_rank_cost do
251250
current_ap = current_ap - next_rank_cost
252251
available = available + 1
253-
next_rank_cost = C_ArtifactUI.GetCostForPointAtRank(traits_spent + available) or 0
252+
next_rank_cost = C_ArtifactUI.GetCostForPointAtRank(traits_spent + available, artifact_tier) or 0
254253
end
255254

256-
per_rnd = round((current_ap / next_rank_cost) * 100, 1)
255+
per_rnd = math.ceil((current_ap / next_rank_cost) * 100, 1)
257256

258257
if string.len(sec_text) > 0 then
259258
local color = SLDataText:GetColor()

SLDataText.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 70000
1+
## Interface: 70200
22
## Title: |cff00ff00SLDT|r - Simple Light Data Text
33
## Notes: Text-based data display modules.
44
## Version: 7.0.1

0 commit comments

Comments
 (0)