Skip to content
This repository
Browse code

added totem tracker

  • Loading branch information...
commit 43828876e20acfbf99daf2ed589c7f1a9d67bcf8 1 parent d71f585
Andy Dote authored

Showing 2 changed files with 30 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  Darkui.xml
  2. +29 0 modules/tracker/totems.lua
1  Darkui.xml
@@ -51,6 +51,7 @@
51 51 <Script file="modules\tracker\bar.lua" />
52 52 <Script file="modules\tracker\line.lua" />
53 53 <Script file="modules\tracker\auras.lua" />
  54 + <Script file="modules\tracker\totems.lua" />
54 55
55 56 <Script file="modules\bags.lua" />
56 57 <Script file="modules\minimap.lua" />
29 modules/tracker/totems.lua
... ... @@ -0,0 +1,29 @@
  1 +local D, S, E = unpack(DarkUI)
  2 +local T = D.Tracker
  3 +
  4 +if S.tracker.enable ~= true then return end
  5 +
  6 +local function OnTotemUpdate()
  7 +
  8 + local totems = S.tracker.totems
  9 +
  10 + for i = 1, #totems do
  11 +
  12 + local current = totems[i]
  13 + local haveTotem, totemName, start, duration, icon = GetTotemInfo(current.slot)
  14 +
  15 + local data = {
  16 + ["id"] = "totem" .. current.slot,
  17 + ["display"] = (totemName ~= nil),
  18 + ["texture"] = icon,
  19 + ["expiry"] = start + duration,
  20 + ["filter"] = "HELPFUL",
  21 + }
  22 +
  23 + D.Tracker.UpdateDisplayData(current.display, data)
  24 +
  25 + end
  26 +
  27 +end
  28 +
  29 +E:Register("PLAYER_TOTEM_UPDATE", OnTotemUpdate)

0 comments on commit 4382887

Please sign in to comment.
Something went wrong with that request. Please try again.