Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. function(states)
  2. for k,v in pairs(states) do
  3. v.show = false
  4. v.change = true
  5. end
  6.  
  7. for i = 1, 7 do -- talents
  8. states[i] = states[i] or {}
  9. for j = 1, 3 do
  10. local talentID, name, texture, selected, available, spellID, unknown, row, column, known = GetTalentInfo(i, j, 1)
  11. if known then
  12. states[i].index = i
  13. states[i].name = name
  14. states[i].icon = texture
  15. states[i].ilvl = ""
  16. states[i].changed = true
  17. states[i].show = true
  18. end
  19. end
  20. end
  21.  
  22. for i = 1, 15 do
  23. local itemId = GetInventoryItemLink("player", i)
  24. if itemId then
  25. local name, _, quality, ilvl = GetItemInfo(itemId)
  26. local icon = GetItemIcon(itemId)
  27. if quality == 5 then
  28. local index = 7 + i
  29. states[index] = states[index] or {}
  30. local state = states[index]
  31. state.name = aura_env.color[quality]..name.."|r"
  32. state.icon = icon
  33. state.index = index
  34. state.ilvl = aura_env.color[quality]..ilvl.."|r"
  35. state.changed = true
  36. state.show = true
  37. end
  38. end
  39. end
  40. for i = 1, 2 do
  41. local trinketSlot = 12 + i
  42. local itemId = GetInventoryItemLink("player", trinketSlot)
  43. if itemId then
  44. local name, _, quality, ilvl = GetItemInfo(itemId)
  45. local icon = GetItemIcon(itemId)
  46. if quality ~= legendary then
  47. local index = 7 + 15 + i
  48. states[index] = states[index] or {}
  49. local state = states[index]
  50. state.name = aura_env.color[quality]..name.."|r"
  51. state.icon = icon
  52. state.ilvl = aura_env.color[quality]..ilvl.."|r"
  53. state.index = index
  54. state.changed = true
  55. state.show = true
  56. end
  57. end
  58. end
  59. return true
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement