WoWInterface SVN phUnitFrames

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 6 to Rev 7
    Reverse comparison

Rev 6 → Rev 7

trunk/phUnitFrame.lua
1,5 → 1,4

phUnitFrame = {
phUnitFrame = {
create = function(parent,frame)
local config = parent.config;
local model = phUnitFramesModels[config.model];
281,20 → 280,34
 
createTooltip = function(button,unit)
if unit and UnitExists(unit) then
GameTooltip:SetOwner(button, "ANCHOR_BOTTOMRIGHT", 0, 0);
if button.auraIndex and button.filter then
if button.auraIndex and button.auraIndex > 0 and button.filter then
GameTooltip:SetOwner(button, "ANCHOR_BOTTOMRIGHT", 0, 0);
GameTooltip:SetUnitAura(unit,button.auraIndex,button.filter);
else
 
-- GameTooltip:AddLine(button:GetAlpha());
-- GameTooltip:AddLine(button:IsShown());
-- GameTooltip:AddLine(button.aura.icon);
 
if button.tooltip and not InCombatLockdown() then
GameTooltip:AddLine (" ");
GameTooltip:AddLine (phLib.getLocale("Cast spells on %s",UnitName(unit)).." :",1,1,1);
for i,msg in pairs(button.tooltip) do
GameTooltip:AddLine (msg);
end;
end;
GameTooltip:Show();
elseif not InCombatLockdown() then
GameTooltip:SetOwner(button, "ANCHOR_BOTTOMRIGHT", 0, 0);
GameTooltip:SetUnit(unit);
end
if button.tooltip then
GameTooltip:AddLine (" ");
GameTooltip:AddLine (phLib.getLocale("Cast spells on %s",UnitName(unit)).." :",1,1,1);
for i,msg in pairs(button.tooltip) do
GameTooltip:AddLine (msg);
end;
end;
GameTooltip:Show();
if button.tooltip then
GameTooltip:AddLine (" ");
GameTooltip:AddLine (phLib.getLocale("Cast spells on %s",UnitName(unit)).." :",1,1,1);
for i,msg in pairs(button.tooltip) do
GameTooltip:AddLine (msg);
end;
end;
GameTooltip:Show();
end;
end;
end,
 
400,7 → 413,12
end;
 
frame.ibar:SetMinMaxValues(0,UnitHealthMax(unit));
frame.ibar:SetValue(UnitHealth(unit)+UnitGetIncomingHeals(unit));
local ival = UnitHealth(unit);
local x = UnitGetIncomingHeals(unit);
if x then
ival = ival + x;
end
frame.ibar:SetValue(ival);
frame.bar:SetMinMaxValues(0,UnitHealthMax(unit));
frame.bar:SetValue(UnitHealth(unit));
 
449,15 → 467,6
auraCount = i;
end;
 
for i=1,table.getn(buttons) do
local button = buttons[i];
if button.isSecure then
button:SetAlpha(0);
else
button:Hide();
end;
end;
 
local b;
for i=1,table.getn(buttons) do
local button = buttons[i];
477,6 → 486,9
end;
if found then
phUnitFrame.updateAura(button,bconfig.filter,found,count);
else
button.auraIndex = 0;
button:SetAlpha(0);
end;
end
 
490,9 → 502,9
end;
 
for i=1,table.getn(order) do
 
if not buttons[b] then
return;
local button = buttons[b];
if not button then
break;
end;
 
local count = 0;
509,12 → 521,25
end;
 
if found then
phUnitFrame.updateAura(buttons[b],bconfig.filter,found,count);
phUnitFrame.updateAura(button,bconfig.filter,found,count);
b = b + 1;
end;
 
end;
 
while true do
local button = buttons[b];
if not button then
break;
end;
button.auraIndex = 0;
if button.isSecure then
button:SetAlpha(0);
else
button:Hide();
end;
b = b + 1;
end;
 
--[[
local j = 1;
for i=1,table.getn(buttons) do
531,6 → 556,7
updateAura = function(button,filter,aura,count)
button.filter = filter;
button.auraIndex = aura.index;
button.aura = aura;
if (count > 1) then
button.count:SetText(count);
else
538,14 → 564,15
end
if aura.duration then
CooldownFrame_SetTimer(button.cooldown,aura.expirationTime-aura.duration,aura.duration,1);
button.cooldown:SetAlpha(1);
button.cooldown:Show();
--button.cooldown:SetAlpha(1);
else
buff.cooldown:SetAlpha(0);
button.cooldown:Hide();
--button.cooldown:SetAlpha(0);
end;
button.icon:SetTexture(aura.icon);
if button.isSecure then
button:SetAlpha(1);
else
button:SetAlpha(1);
if not button.isSecure then
button:Show();
end;
end,
trunk/phUnitFrames.lua
13,7 → 13,14
end;
print(name,spellId,icon);
end;
end;
for i=1,100 do
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura(unit,i,"HARMFUL");
if name == nil then
break;
end;
print(name,spellId,icon);
end;
end;
 
phMenuFrame = CreateFrame("Frame", "phMenuFrame", UIParent, "UIDropDownMenuTemplate");
 
trunk/phUnitFramesModels.lua
45,31 → 45,30
79107, -- Ombre
 
588, -- Feu Intérieur
15286, -- Etreinte Vampirique
73413, -- Volonté intérieure
 
47788, -- Esprit Gardien
6346, -- Gardian Peur
 
77487, -- Orbre d'ombre
 
139, -- Renovation
17, -- Bouclier
41635, -- Priere de Guérison
15357, -- Inspiration
 
70772, -- Bonus T10
},
combat = {
47788, -- Esprit Gardian
6346, -- Gardian Peur
 
77487, -- Orbre d'ombre
 
 
139, -- Renovation
17, -- Bouclier
41635, -- Priere de Guérison
15357, -- Inspiration
 
70772, -- Bonus T10
 
15357, -- Inspiration
},
spells = {
{