Skip to content

Commit 8fabf37

Browse files
committed
* Fixes for new server API
1 parent 1dbdb30 commit 8fabf37

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/SkadaAttunes/SkadaAttunes.lua

+8-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function SkadaAttunes.isInBlockList(itemId)
5353
end
5454

5555
local function checkServer()
56-
if ItemAttuneHas then
56+
if GetItemAttuneProgress then
5757
return true
5858
end
5959

@@ -75,7 +75,12 @@ local function getInProgressAttunes(force)
7575
end
7676

7777
local inProgress = {}
78-
for id, progress in pairs(ItemAttuneHas) do
78+
79+
local count = GetCustomGameDataCount(11)
80+
for i=1, count do
81+
local id = GetCustomGameDataIndex(11, i)
82+
local progress = GetCustomGameData(11, id) or 0
83+
7984
-- Only attunements with some progress
8085
if progress > 0 and progress < 100 and not SkadaAttunes.isInBlockList(id) then
8186
table.insert(inProgress, {id = id, progress = progress})
@@ -300,7 +305,7 @@ function SkadaAttunes:Update(win, set)
300305
for id, attune in pairs(player.attunes) do
301306
if not tmp[id] then
302307
-- Extra check to remove old attunes
303-
if ItemAttuneHas[id] or 0 < 100 then
308+
if GetItemAttuneProgress(id) or 0 < 100 then
304309
tmp[id] = {id = attune.id, progress = attune.progress, name = attune.name, icon = attune.icon, link = attune.link}
305310
end
306311
else

src/SkadaAttunes/SkadaAttunes.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Title: Skada |r[|caaedc99fAttunes|r]
33
## Notes: Adds attunement tracking to Skada
44
## Author: Imevul
5-
## Version: 1.0.7
5+
## Version: 1.0.8
66
## Dependencies: Skada
77

88
SkadaAttunes.lua

0 commit comments

Comments
 (0)