+ if ind.text then
+ needUpdate = remaining(ind.text, expires, current);
+ ind.text.expires = expires;
+ ind.text:Show();
+ end
+ if ind.stack and count > 1 then
+ ind.stack:SetText(count);
+ ind.stack:Show();
+ end
+ ind:Show();
+ return needUpdate;
+end
+
+local function hideInd(ind)
+ if ind.text then
+ ind.text.expires = nil;
+ ind.text:Hide();
+ end
+ if ind.stack then ind.stack:Hide() end
+ ind:Hide();
+end
+
+function M.UpdateAuras(frame, unit)
+ local current = GetTime();
+ if frame.throttled then
+ return;
+ elseif frame.prevUpdate and current - frame.prevUpdate < 0.2 then
+ frame.throttled = true;
+ return CTimerAfter(0.2, frame.throttle);
+ end
+
+ frame.prevUpdate = current;
+ for _, ind in pairs(frame.inds) do
+ hideInd(ind);
+ end
+ local icon, count, expires, id;
+ local showInds, needUpdate = false, false;
+ local i = 1;
+ while true do
+ _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "PLAYER HELPFUL");
+ if not id then break end
+ local pos = watchedAuras[id];
+ if pos then
+ needUpdate = showInd(frame.inds[pos], expires, current, count, icon) or needUpdate;
+ showInds = true;
+ end
+ i = i + 1;