/trunk
}, {__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 |
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 |
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 |
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) |
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) |