Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while debuffNum <= debuffnumber do
- local debuffName = UnitDebuff(uid, index, filter)
- if ( debuffName ) then
- if ( CompactUnitFrame_UtilShouldDisplayDebuff(uid, index, filter) and isDebuff(uid, index, filter) and (not isPriorityDebuff(uid, index, filter) and not isPriorityWarning(uid, index, filter))) then
- local debuffFrame = v.debuffFrames[debuffNum]
- local name, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, _, spellId;
- name, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, _, spellId = UnitDebuff(uid, index, filter);
- debuffFrame.filter = filter;
- debuffFrame.icon:SetTexture(icon);
- debuffFrame.SpellId = spellId
- debuffFrame:SetScript("OnEnter", function(self)
- GameTooltip:SetOwner (self, "ANCHOR_RIGHT")
- GameTooltip:SetSpellByID(self.SpellId)
- GameTooltip:Show()
- end)
- debuffFrame:SetScript("OnLeave", function(self)
- GameTooltip:Hide()
- end)
- if count then
- if ( count > 1 ) then
- local countText = count;
- if ( count >= 100 ) then
- countText = BUFF_STACKS_OVERFLOW;
- end
- debuffFrame.count:Show();
- debuffFrame.count:SetText(countText);
- else
- debuffFrame.count:Hide();
- end
- end
- debuffFrame:SetID(index);
- local enabled = expirationTime and expirationTime ~= 0;
- if enabled then
- local startTime = expirationTime - duration;
- CooldownFrame_Set(debuffFrame.cooldown, startTime, duration, true);
- else
- CooldownFrame_Clear(debuffFrame.cooldown);
- end
- local color = DebuffTypeColor[debuffType] or DebuffTypeColor["none"];
- debuffFrame.border:SetVertexColor(color.r, color.g, color.b);
- --debuffFrame.border:Hide()
- debuffFrame:SetSize(f.buffFrames[3]:GetSize()*1,f.buffFrames[3]:GetSize()*1);
- debuffFrame:Show();
- debuffNum = debuffNum + 1
- end
- else
- break
- end
- index = index + 1
- end
- for i=debuffNum, debuffnumber do
- local debuffFrame = v.debuffFrames[i];
- if debuffFrame then
- debuffFrame:Hide()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement