local GetSpecialization = GetSpecialization;
local UnitExists = UnitExists;
local UnitAura = UnitAura;
+local GetTotemInfo = GetTotemInfo;
-- character specific frames
local chars = {
height = 80,
},
},
+ ["Gedren"] = {
+ {
+ totems = {1},
+ x = 570,
+ y = 440,
+ width = 80,
+ height = 80,
+ },
+ },
},
};
end
end
-local function updateTotemFrame(frame)
- print("totem frame not implemented");
+local function updateTotemFrame(frame, slot)
+ local _, name, start, duration, icon = GetTotemInfo(slot);
+ if name ~= "" then
+ frame.cd:SetCooldown(start, duration);
+ frame.cd:Show();
+ frame.icon:SetTexture(icon);
+ frame:Show();
+ else
+ frame:Hide();
+ end
end
local function updateTotems(slot)
if totems[slot] then
for _, i in pairs(totems[slot]) do
- updateTotemFrame(frames[i]);
+ updateTotemFrame(frames[i], slot);
end
end
end
frame.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
frame.stack = frame:CreateFontString(nil, "OVERLAY", "NumberFontNormalLarge");
frame.stack:SetPoint("TOPLEFT");
+ frame.stack:Hide();
frame.cd = CreateFrame("Cooldown", name.."CD", frame, "CooldownFrameTemplate");
frame.cd:SetReverse(true);
frame.cd:SetAllPoints();
for _, frame in pairs(frames) do
if frame.auras then updateAuraFrame(frame) end
- if frame.totems then updateTotemFrame(frame) end
+ if frame.totems then
+ for _, slot in pairs(frame.totems) do updateTotemFrame(frame, slot) end
+ end
end
end