WoWInterface SVN oUF_P3lim

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 58 to Rev 59
    Reverse comparison

Rev 58 → Rev 59

trunk/oUF_P3lim/oUF_P3lim.lua
132,6 → 132,15
end
end
 
local function UpdatePortrait(self, min, max)
if(UnitIsDeadOrGhost(self.unit)) then
self.Portrait:Hide()
else
self.Portrait:Show()
self.Portrait:SetWidth(230 * min/max)
end
end
 
local function PostUpdateReputation(self, event, unit, bar)
local name, id = GetWatchedFactionInfo()
bar:SetStatusBarColor(FACTION_BAR_COLORS[id].r, FACTION_BAR_COLORS[id].g, FACTION_BAR_COLORS[id].b)
162,6 → 171,10
end
end
end
 
if(self.Portrait) then
UpdatePortrait(self, min, max)
end
end
 
local function OverrideCastbarTime(self, duration)
273,6 → 286,7
 
local power = self.Power:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallLeft')
power:SetPoint('LEFT', self.Health, 2, -1)
power.frequentUpdates = true
 
if(unit == 'player') then
self:Tag(power, '[colorpp][curpp]|r')
342,9 → 356,9
self.DruidPower.Text:SetPoint('CENTER', self.DruidPower)
self.DruidPower.Text:SetTextColor(unpack(colors.power['MANA']))
 
table.insert(self.__elements, UpdateDruidPower)
self:RegisterEvent('UNIT_MANA', UpdateDruidPower)
self:RegisterEvent('UNIT_ENERGY', UpdateDruidPower)
self:RegisterEvent('PLAYER_LOGIN', UpdateDruidPower)
end
 
if(class == 'DEATHKNIGHT') then
421,7 → 435,7
self:SetAttribute('initial-width', 181)
end
 
if(unit == 'player' or unit == 'target') then
if(unit == 'player' or unit == 'target' or unit == 'pet') then
self.CombatFeedbackText = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontNormal')
self.CombatFeedbackText:SetPoint('CENTER', self)
 
444,7 → 458,16
self.Castbar.bg = self.Castbar:CreateTexture(nil, 'BORDER')
self.Castbar.bg:SetAllPoints(self.Castbar)
self.Castbar.bg:SetTexture(0.3, 0.3, 0.3)
end
 
if(unit == 'target' or unit == 'player') then
self.Portrait = CreateFrame('PlayerModel', nil, self)
self.Portrait:SetPoint('TOPLEFT', self.Health)
self.Portrait:SetPoint('BOTTOMLEFT', self.Health)
self.Portrait:SetAlpha(0.1)
self.Portrait:SetWidth(230)
self:RegisterEvent('PLAYER_DEAD', UpdatePortrait)
 
self:SetAttribute('initial-height', 27)
self:SetAttribute('initial-width', 230)
end