-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrestCurrencies.lua
46 lines (36 loc) · 1.2 KB
/
crestCurrencies.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
-- init
aura_env.enabledCrests = {}
if aura_env.config.whelpling then aura_env.enabledCrests[2706] = true end
if aura_env.config.drake then aura_env.enabledCrests[2707] = true end
if aura_env.config.wyrm then aura_env.enabledCrests[2708] = true end
if aura_env.config.aspect then aura_env.enabledCrests[2709] = true end
-- TSU: CURRENCY_DISPLAY_UPDATE
function(allstates, event, currencyType, quantity)
if event == 'STATUS' then
for currencyId, _ in pairs(aura_env.enabledCrests) do
local info = C_CurrencyInfo.GetCurrencyInfo(currencyId)
allstates[currencyId] = {
["show"] = true,
["changed"] = true,
["link"] = C_CurrencyInfo.GetCurrencyLink(currencyId),
["index"] = currencyId,
["name"] = info.name,
["icon"] = info.iconFileID,
["progressType"] = "static",
["value"] = info.quantity
}
end
return true
end
local state = allstates[currencyType]
if state == nil then
return false
end
state.changed = true
state.value = quantity
return true
end
-- custom variables
{
["value"] = true
}