Skip to content

Commit 1dbdb30

Browse files
committed
Updated README, refactored some code
1 parent cec7e75 commit 1dbdb30

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ A Skada module for tracking attunements
88

99
## Installation
1010

11-
Extract to Interface/AddOns and enable the addon in-game
11+
1. Download the [latest release](https://github.com/imevul/SkadaAttunes/releases)
12+
2. Extract to Interface/AddOns and enable the addon in-game
1213

1314

1415
## Commands
1516

17+
These commands are completely optional, and can be used to prevent specific items from being tracked by the addon. Replace `<id>` with the itemID you wish to block/unblock.
1618
```
1719
/run SkadaAttunes.addToBlockList(<id>)
1820
/run SkadaAttunes.removeFromBlockList(<id>)

src/SkadaAttunes/SkadaAttunes.lua

+18-5
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,21 @@ function SkadaAttunes.isInBlockList(itemId)
5252
return Skada.db.profile.modules.attuneblocklist[itemId] or false
5353
end
5454

55+
local function checkServer()
56+
if ItemAttuneHas then
57+
return true
58+
end
59+
60+
if not serverCheck then
61+
chat(L["Server attunement variables not loaded"])
62+
serverCheck = true
63+
end
64+
65+
return false
66+
end
67+
5568
local function getInProgressAttunes(force)
56-
if not ItemAttuneHas then
57-
if not serverCheck then
58-
chat(L["Server attunement variables not loaded"])
59-
serverCheck = true
60-
end
69+
if not checkServer() then
6170
return {}
6271
end
6372

@@ -278,6 +287,10 @@ function SkadaAttunes:Update(win, set)
278287
return
279288
end
280289

290+
if not checkServer() then
291+
return
292+
end
293+
281294
win.metadata.maxvalue = 100
282295

283296
-- Aggregate the data.

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.6
5+
## Version: 1.0.7
66
## Dependencies: Skada
77

88
SkadaAttunes.lua

0 commit comments

Comments
 (0)