Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(states)
- for k,v in pairs(states) do
- v.show = false
- v.change = true
- end
- for i = 1, 7 do -- talents
- states[i] = states[i] or {}
- for j = 1, 3 do
- local talentID, name, texture, selected, available, spellID, unknown, row, column, known = GetTalentInfo(i, j, 1)
- if known then
- states[i].index = i
- states[i].name = name
- states[i].icon = texture
- states[i].ilvl = ""
- states[i].changed = true
- states[i].show = true
- end
- end
- end
- for i = 1, 15 do
- local itemId = GetInventoryItemLink("player", i)
- if itemId then
- local name, _, quality, ilvl = GetItemInfo(itemId)
- local icon = GetItemIcon(itemId)
- if quality == 5 then
- local index = 7 + i
- states[index] = states[index] or {}
- local state = states[index]
- state.name = aura_env.color[quality]..name.."|r"
- state.icon = icon
- state.index = index
- state.ilvl = aura_env.color[quality]..ilvl.."|r"
- state.changed = true
- state.show = true
- end
- end
- end
- for i = 1, 2 do
- local trinketSlot = 12 + i
- local itemId = GetInventoryItemLink("player", trinketSlot)
- if itemId then
- local name, _, quality, ilvl = GetItemInfo(itemId)
- local icon = GetItemIcon(itemId)
- if quality ~= legendary then
- local index = 7 + 15 + i
- states[index] = states[index] or {}
- local state = states[index]
- state.name = aura_env.color[quality]..name.."|r"
- state.icon = icon
- state.ilvl = aura_env.color[quality]..ilvl.."|r"
- state.index = index
- state.changed = true
- state.show = true
- end
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement