WoWInterface SVN oUF_P3lim

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 86 to Rev 85
    Reverse comparison

Rev 86 → Rev 85

trunk/oUF_P3lim/customtags.lua
36,7 → 36,7
oUF.TagEvents['[pthreat]'] = 'UNIT_THREAT_LIST_UPDATE'
oUF.Tags['[pthreat]'] = function()
local _, _, perc = UnitDetailedThreatSituation('player', 'target')
return perc and ('%s%d%%|r'):format(hex(GetThreatStatusColor(UnitThreatSituation('player', 'target'))), perc)
return perc and ('%s%d|r'):format(hex(GetThreatStatusColor(UnitThreatSituation('player', 'target'))), perc)
end
 
oUF.Tags['[phealth]'] = function(unit)
trunk/oUF_P3lim/oUF_P3lim.lua
26,15 → 26,6
}, {__index = oUF.colors.reaction}),
}, {__index = oUF.colors})
 
local buffFilter = {
['Survival Instincts'] = true,
['Frenzied Regeneration'] = true,
['Savage Roar'] = true,
['Barkskin'] = true,
['Clearcasting'] = true,
['Savage Defense'] = true,
}
 
local function menu(self)
local unit = gsub(self.unit, '(.)', string.upper, 1)
if(_G[unit..'FrameDropDown']) then
130,9 → 121,10
end
 
local function updateDebuff(self, icons, unit, icon, index)
if(not icon.debuff or UnitIsFriend('player', unit)) then return end
if(not icon.debuff or not UnitIsEnemy('player', unit)) then return end
 
if(icon.owner ~= 'player' and icon.owner ~= 'vehicle') then
local _, _, _, _, _, _, _, caster = UnitAura(unit, index, icon.filter)
if(caster ~= 'player' and caster ~= 'vehicle') then
icon.icon:SetDesaturated(true)
icon.overlay:SetVertexColor(0.25, 0.25, 0.25)
else
140,8 → 132,10
end
end
 
local function customFilter(icons, unit, icon, name)
if(buffFilter[name] and icon.owner == 'player') then
local function customFilter(icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster)
-- This filter is made for me specifically, but you can create
-- your own table with spells that this filter can match to.
if(oUF_P3lim_buffFilter and oUF_P3lim_buffFilter[name] and caster == 'player') then
-- todo: set the buffs.visibleBuffs so it works with buffs.num
return true
end
174,7 → 168,7
local hpvalue = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallRight')
hpvalue:SetPoint('RIGHT', self.Health, -2, -1)
hpvalue.frequentUpdates = 0.1
self:Tag(hpvalue, unit == 'player' and '[pthreat]|cffff0000[pvptime]|r [phealth]' or '[phealth]')
self:Tag(hpvalue, unit == 'player' and '[pthreat(%|r)]|cffff0000[pvptime]|r [phealth]' or '[phealth]')
 
self.RaidIcon = self.Health:CreateTexture(nil, 'OVERLAY')
self.RaidIcon:SetPoint('TOP', self, 0, 8)