WoWInterface SVN phUnitFrames

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

trunk/phUnitFrame.lua
60,6 → 60,7
end;
end);
 
frame.auras = {};
frame.buffs = phUnitFrame.createAuraButtons(frame,model.buffs);
frame.debuffs = phUnitFrame.createAuraButtons(frame,model.debuffs);
 
393,26 → 394,24
end,
 
updateAuras = function(frame,buttons,bconfig)
local list = {};
local list = frame.auras;
local auraCount = 0;
for i=1,100 do
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura(frame.unit,i,bconfig.filter);
if name == nil then
break;
break;
end;
local aura = {
index = i,
type = debuffType,
icon = icon,
count = count,
duration = duration,
expirationTime = expirationTime,
};
--print(name,spellId);
if not list[spellId] then
list[spellId] = aura;
else
list[spellId].count = list[spellId].count + 1;
end
if not list[i] then
list[i] = {};
end;
list[i].index = i;
list[i].type = debuffType;
list[i].icon = icon;
list[i].count = count;
list[i].duration = duration;
list[i].expirationTime = expirationTime;
list[i].spellId = spellId;
auraCount = i;
end;
 
for i=1,table.getn(buttons) do
427,15 → 426,16
break;
end;
local found;
for spellId,aura in pairs(list) do
for j=1,auraCount do
local aura = list[j];
if aura.type == button.type or (aura.type == nil and button.type == "None") then
found = spellId;
found = j;
break;
end;
end;
if found then
phUnitFrame.updateAura(button,bconfig.filter,list[found]);
list[found] = nil;
list[found].count = -1;
end;
end
 
448,16 → 448,23
order = bconfig.combat;
end;
 
for j=1,table.getn(order) do
local spellId = order[j];
if list[spellId] then
phUnitFrame.updateAura(buttons[b],bconfig.filter,list[spellId]);
b = b + 1;
if not buttons[b] then
return;
end;
end;
for i=1,table.getn(order) do
local spellId = order[i];
for j=1,auraCount do
local aura = list[j];
if aura.count >= 0 then
if aura.spellId == spellId then
phUnitFrame.updateAura(buttons[b],bconfig.filter,aura);
b = b + 1;
if not buttons[b] then
return;
end;
break;
end;
end;
end;
end;
 
--[[
local j = 1;
for i=1,table.getn(buttons) do
trunk/phUnitFrames.lua
238,6 → 238,7
end;
end;
end;
 
 
for i,child in pairs(childs) do
child:update();