/
local PostUpdateAuraIcon |
do |
local myunits = { |
local castby = { |
player = true, |
vehicle = true, |
pet = true |
} |
function PostUpdateAuraIcon(self, icons, unit, button, index) |
if myunits[button.owner] or unit == 'player' and button.debuff then |
local name, _, _, _, dtype, duration, expirationTime = UnitAura(unit, index, button.filter) |
if button.debuff and -- if aura is a debuff |
(castby[button.owner] or unit == 'player') and -- and aura is cast by me on other units or aura is affecting player |
not(expirationTIme == 0 and duration == 0) -- and aura has a remaining time. |
then |
button.cd:Show() |
else |
button.cd:Hide() |
if button.debuff then |
button.icon:SetDesaturated(not (myunits[button.owner] or unit == 'player' or unit=='pet' or unit=='vehicle')) |
local name, _, _, _, dtype = UnitAura(unit, index, button.filter) |
button.icon:SetPoint('TOPLEFT', 2, -2) |
button.icon:SetPoint('BOTTOMRIGHT', -2, 2) |
else |
button.overlay:SetDrawLayer('BORDER') |
end |
local function PostCreateAuraBar(bar, parent) |
bar:SetBackdrop(backdrop) |
bar:SetBackdropColor(0,0,0) |
bar:SetPoint('LEFT', bar:GetHeight() + 3, 0) |
bar:SetPoint'RIGHT' |
bar.icon:ClearAllPoints() |
bar.icon:SetPoint('LEFT', parent) |
bar.icon:SetPoint'BOTTOM' |
local bg = bar:CreateTexture(nil, 'BACKGROUND') |
bg:SetPoint('TOPRIGHT',bar.icon,1,1) |
bg:SetPoint('BOTTOMLEFT',bar.icon,-1,-1) |
bg:SetTexture(0,0,0) |
end |
local AuraBarFilter |
do |
local whitelist = {} |
for k, v in pairs({ |
51662, -- Hunger For Blood |
}) do |
whitelist[GetSpellInfo(v)] = true |
end |
function AuraBarFilter(name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable) |
if unitCaster == "player" |
and not (duration == 0 and expirationTime == 0) |
and duration <= 30 |
or whitelist[name] then |
return true |
end |
end |
end |
local function PostCreateEnchantIcon(self, button, icons) |
--[[--]]-- |
self:SetAttribute("*type2", "menu") |
--[[------------------------------------------------------------------------------------------------ |
Prevent making the player frame the vehicle one (pet will be vehicle frame instead) |
--]]------------------------------------------------------------------------------------------------ |
self.disallowVehicleSwap = true |
--[[------------------------------------------------------------------------------------------------ |
Health |
--]]------------------------------------------------------------------------------------------------ |
hp.colorSmooth = true -- will use smoothGradient instead of the internal gradient if set. |
hp.colorHealth = true |
hp.frequentUpdates = 1/12 |
hp.frequentUpdates = 1/24 |
local hpbg = hp:CreateTexture(nil, "BORDER") |
hpbg:SetAllPoints(hp) |
auras:SetHeight(500) |
auras:SetPoint'LEFT' |
auras:SetPoint'RIGHT' |
auras:SetPoint('TOP', 0, -portraitheight) |
auras:SetPoint('TOP', 0, -(portraitheight + 5)) |
self.Auras = auras |
debuffs:SetHeight(500) |
debuffs:SetPoint('LEFT', self) |
debuffs:SetPoint('RIGHT', self) |
debuffs:SetPoint('TOP', self, 0, -portraitheight) |
debuffs:SetPoint('TOP', self, 0, -(portraitheight + 5)) |
self.Debuffs = debuffs |
end |
end |
--[[------------------------------------------------------------------------------------------------ |
AuraTracker/DebuffHighlight |
AuraTracker/AuraBars/DebuffHighlight |
--]]------------------------------------------------------------------------------------------------ |
if self.Portrait then |
self.AuraTracker:SetScript("OnUpdate", updateAuraTrackerTime) |
end |
if unit=='player' or unit=='focus' or unit=='target' or unit=='pet' then |
local abars = CreateFrame("Frame", nil, unit=='player' and UIParent or self) |
abars:SetHeight(1) |
abars:SetPoint('BOTTOMLEFT', self.Power or self, 'TOPLEFT', 0, (unit=='focus' or unit=='pet') and 4 or 23) |
abars:SetPoint('BOTTOMRIGHT', self.Power or self, 'TOPRIGHT', 0, (unit=='focus' or unit=='pet') and 4 or 23) |
abars.auraBarHeight = (unit=='focus' or unit=='pet') and height or 16 |
abars.auraBarTexture = gradient |
abars.bgalpha = 1 |
abars.spacing = 3 |
abars.spellNameObject = font |
abars.spellTimeObject = font |
abars.filter = AuraBarFilter |
abars.scaleTime = 15 |
abars.PostCreateBar = PostCreateAuraBar |
self.AuraBars = abars |
end |
if mainunits[unit] or portraitunits[unit] then |
local dbh = (self.Health or self.Portrait):CreateTexture(nil, "OVERLAY") |
dbh:SetWidth(32) |
## Author: Mrruben5 |
## X-WoWI-ID: 16142 |
## Version: 30300.wowi:revision |
## OptionalDeps: oUF, oUF_AuraTracker, oUF_BarFader, oUF_CombatFeedback, oUF_DebuffHighlight, oUF_HealComm4, oUF_QuickHealth2, oUF_ResComm, oUF_SpellRange, oUF_ThreatFeedback, oUF_WeaponEnchant, Quartz, LibStub, LibSharedMedia-3.0 |
## OptionalDeps: oUF, oUF_AuraBars, oUF_AuraTracker, oUF_BarFader, oUF_CombatFeedback, oUF_DebuffHighlight, oUF_HealComm4, oUF_QuickHealth2, oUF_ResComm, oUF_SpellRange, oUF_ThreatFeedback, oUF_WeaponEnchant, Quartz, LibStub, LibSharedMedia-3.0 |
## X-Embeds: LibStub, LibSharedMedia-3.0 |
## Notes: Personal UF layout |