Quantcast
WoWInterface: SVN - oUF_Pazrael - Path Comparison - / Rev 62 and / Rev 63

WoWInterface SVN oUF_Pazrael

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 62 to Rev 63
    Reverse comparison

Rev 62 → Rev 63

trunk/oUF_Pazrael/oUF_Pazrael.lua New file
0,0 → 1,658
-----------------------------------------------------------------------------------------------
-- oUF_Pazrael an oUF layout based on the appearence of p3lim with some major overhauls
-- Based on oUF by Haste.
-----------------------------------------------------------------------------------------------
-- Functions for changing elements --
local castBar = true -- enable castbar support
local focuscast = true -- enable Focus Frame Castbar Support
local partyRaid = false -- enable party-style raid
local ttt = false -- enable TargetofTargetofTarget frame
local ptargets = true -- enable Party targets
local experience = true -- enable player and pet experience bars
local threat = true -- enable threat bars on most frames
 
-- Stylistic Elements --
local pazcolors = {
[0] = { r = .35, g = .35, b = .45, a = 1}, -- Status Bar
[1] = { r = 0, g = 0, b = 0, a = 1}, -- Frame BGa
[2] = { r = .5, g = .5, b = .5, a = .3}, -- Highlight
[3] = { r = .33, g = .59, b = .33, a = 1} -- CastBar Safe
}
 
local pazd = { [0] = 28, [1] = 21 , [2] = 24, [3] = 230, [4] = 130, [5] = 50 }
-- paz frame dimensions { 0 = Standard Frame Height, 1 = Small Frame Height, 2 = Raid Frame Height, 3 = Standard Frame Width, 4 = Small Frame Width, 5 = Raid Frame Width} --
local pazp = { [0] = -225, [1] = -150, [2] = 150, [3] = 15, [4] = -15, [5] = 15, [6] = -15}
-- paz frame positions { 0 = Player and Target Frame Vertical, 1 = Player Frame Horizontal 2 = Target Frame Horizontal, 3 and 4 = Party Horizontal/Vertical, 5 and 6 = Raid Horizontal/Vertical}
-- Function declarations --
local classification = { --Level Formatting Array
["worldboss"] = "%s Boss",
["rareelite"] = "%s+ R",
["elite"] = " %s+",
["rare"] = " %s R",
["normal"] = "%s",
["trivial"] = "%s",
}
local function updateColor(self, element, unit, func) -- unified frame coloring
local color, r, g, b
local _, class = UnitClass(unit)
if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) then
color = self.colors.tapped
elseif(UnitIsPlayer(unit)) then
color = self.colors.class[class]
else
if(UnitIsFriend(unit, "player") or UnitLevel(unit) < 0) then
r, g, b = UnitSelectionColor(unit)
element[func](element, r, g, b)
return self
else
color = GetDifficultyColor(UnitLevel(unit))
element[func](element, color.r, color.g, color.b)
return self
end
end
if(color) then
element[func](element, color[1], color[2], color[3])
end
end
 
local menu = function(self) -- Drop down menu for frames
if(self.unit:sub(1, -2) == "party" or self.unit:sub(1, -2) == "partypet") then
ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor", 0, 0)
elseif(_G[self.unit:gsub("(.)", string.upper, 1).."FrameDropDown"]) then
ToggleDropDownMenu(1, nil, _G[self.unit:gsub("(.)", string.upper, 1).."FrameDropDown"], "cursor", 0, 0)
elseif(self.unit:match('^raid')) then -- Thanks p3lim.
self.name = unit
RaidGroupButton_ShowMenu(self)
end
end
 
local setFontString = function(parent, fontStyle, fontHeight) -- default font settings
local fs = parent:CreateFontString(nil, "OVERLAY")
fs:SetFontObject(fontStyle)
fs:SetShadowColor(0,0,0)
fs:SetShadowOffset(0.8, -0.8)
fs:SetTextColor(1,1,1)
fs:SetJustifyH("LEFT")
return fs
end
 
local number = function(n) -- number reformating
if n >= 1e7 then
return ('%.1fm'):format(n / 1e6):gsub('%.?0+([km])$', '%1')
elseif n >= 1e6 then
return ('%.2fm'):format(n / 1e6):gsub('%.?0+([km])$', '%1')
elseif n >= 1e5 then
return ('%.0fk'):format(n / 1e3)
elseif n >= 1e3 then
return ('%.1fk'):format(n / 1e3)
else
return n
end
end
 
-- Override Functions
 
local function OverrideUpdateThreat(self, event, unit) --Threat update function
local isTanking, state, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation("player", unit)
if threatValue then
self.Threat:SetMinMaxValues(0, 100)
r, g, b = self.ColorGradient(scaledPercent/100, .35, .35, .45, 1, 1, 0, 1, 0, 0)
self.Threat:SetStatusBarColor(r,g,b)
self.Threat:SetValue(scaledPercent)
self.Threat:Show()
else
self.Threat:Hide()
end
end
 
local function OverrideUpdateName(self, event, unit) --Name Update Function
if(self.unit == unit) then
local name = UnitName(unit)
local lvl = UnitLevel(unit)
if lvl < 0 then lvl = "??" end
if string.len(name) > 10 then name = name:sub(1,10).."..." end
if(unit == 'player' or unit == 'pet') then
self.Name:Hide()
elseif unit == "target" then
updateColor(self, self.Name, unit, 'SetTextColor')
self.Name:SetText('|cffFFFFFF' .. name .. '|r' .. ' ' .. format(classification[UnitClassification(unit)], lvl))
else
self.Name:Show()
if(self:GetParent():GetName():match"oUF_Raid") then
if string.len(name) > 4 then name = name:sub(1,4) end
if (UnitIsDead(unit) or UnitIsGhost(unit) or not UnitIsConnected(unit)) then
self.Name:Hide()
end
end
self.Name:SetText(name)
end
end
end
 
local function PostUpdateHealth(self, event, unit, bar, min, max) --Health Update Thread
if(UnitIsDead(unit)) then
bar:SetValue(0)
bar.value:SetText("Dead")
elseif(UnitIsGhost(unit)) then
bar:SetValue(0)
bar.value:SetText("Ghost")
elseif(not UnitIsConnected(unit)) then
bar.value:SetText("Offline")
else
if(unit=="player") then
if(min~=max) then
bar.value:SetFormattedText("|cffff8080%s|r |cff0090ff/|r %d|cff0090ff%%|r", number(min-max), floor(min/max*100))
else
bar.value:SetText(number(max))
end
elseif(unit=="pet" or unit=="focus" or unit=="focustarget" or unit=="targettarget") then
if(min~=max) then
bar.value:SetText(floor(min/max*100).."%")
else
bar.value:SetFormattedText("|cffAF5050%s|r", number(max))
end
elseif(self:GetParent():GetName()=="oUF_Party") then
if(min~=max) then
bar.value:SetFormattedText("|cffAF5050%s|r", number(min-max), floor(min/max*100))
else
bar.value:SetText()
end
elseif(self:GetParent():GetName():sub(1,8)=="oUF_Raid") then
if(min~=max) then
bar.value:SetFormattedText("|cffAF5050%s|r", floor(min/max*100))
else
bar.value:SetText()
end
elseif(unit=="target" and not UnitIsFriend(unit, "player")) then
if(min~=max) then
bar.value:SetFormattedText("%s |cff0090ff/|r %s (%d|cff0090ff%%|r)", number(min), number(max), floor(min/max*100))
else
bar.value:SetFormattedText("%s |cff0090ff/|r %s", number(min), number(max))
end
else
bar.value:SetFormattedText("%s |cff0090ff/|r %s", number(min), number(max))
end
end
if((UnitIsTapped(unit) and not(UnitIsTappedByPlayer(unit))) or not(UnitIsConnected(unit))) then
bar:SetStatusBarColor(0.6, 0.6, 0.6)
elseif(self:GetParent():GetName():match"oUF_Raid") then
updateColor(self, self.Health, unit, 'SetStatusBarColor')
else
bar:SetStatusBarColor(pazcolors[0].r, pazcolors[0].g, pazcolors[0].b, pazcolors[0].a)
end
self.UNIT_NAME_UPDATE(self, event, unit)
OverrideUpdateThreat(self, event, unit)
end
 
local function PreUpdatePower(self, event, unit)
if(self.unit ~= 'player') then return end
 
local _, powertype = UnitPowerType('player')
local min = UnitPower('player', SPELL_POWER_MANA)
local max = UnitPowerMax('player', SPELL_POWER_MANA)
 
self.DruidMana:SetMinMaxValues(0, max)
self.DruidMana:SetValue(min)
 
if(min ~= max) then
self.DruidMana.Text:SetFormattedText('%d%%', math.floor(min / max * 100))
else
self.DruidMana.Text:SetText()
end
 
self.DruidMana:SetAlpha((powertype ~= 'MANA') and 1 or 0)
self.DruidMana.Text:SetAlpha((powertype ~= 'MANA') and 1 or 0)
end
 
local function PostUpdatePower(self, event, unit, bar, min, max)
if(self:GetParent():GetName():match"oUF_Raid") then
self.Power.colorPower = true
end
 
if(not bar.value) then return end
if(not UnitIsPlayer(unit)) then
bar.value:SetText()
else
if(min==0) then
bar.value:SetText()
elseif(not UnitIsConnected(unit)) then
bar.value:SetText()
elseif(unit=="player") then
color = self.colors.power[UnitPowerType(unit)]
if(color) then bar.value:SetTextColor(color[1], color[2], color[3]) end
if(min~=max) then
bar.value:SetText(number(max-(max-min)))
else
bar.value:SetText(number(max))
end
else
if(min~=max) then
bar.value:SetFormattedText("%s|cff0090ff - ", number(max-(max-min)))
else
bar.value:SetFormattedText("%s|cff0090ff - ", number(max))
end
end
end
self.UNIT_NAME_UPDATE(self, event, unit)
end
 
local function PostCreateAuraIcon(self, button, icons, index, debuff)
icons.showDebuffType = true
button.cd:SetReverse()
button.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
button.overlay:SetTexture('Interface\\AddOns\\oUF_Pazrael\\textures\\border')
button.overlay:SetTexCoord(0.0, 1.0, 0.0, 1.0)
button.overlay.Hide = function(self) self:SetVertexColor(pazcolors[0].r, pazcolors[0].g, pazcolors[0].b, pazcolors[0].a) end
end
 
local function styleFunc(self, unit)
local _, class = UnitClass('player')
self.menu = menu -- enable menus
self:SetScript("OnEnter", UnitFrame_OnEnter)
self:SetScript("OnLeave", UnitFrame_OnLeave)
self:RegisterForClicks("anyup") -- enable mouse click intercept
self:SetAttribute("*type2", "menu")
self:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", insets ={left = -1, right = -1, top = -1, bottom = -1}}) -- backdrop for frame using settings
self:SetBackdropColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a) -- backdrop color
self.Health = CreateFrame("StatusBar", nil, self) -- Healthbar
self.Health:SetHeight(22)
self.Health:SetStatusBarTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
if not(unit) then self.Health:SetFrameLevel(2) else self.Health:SetFrameLevel(1) end
self.Health:SetPoint("TOPLEFT")
self.Health:SetPoint("TOPRIGHT")
 
self.Health.bg = self.Health:CreateTexture(nil, "BORDER") -- Healthbar Background
self.Health.bg:SetAllPoints(self.Health)
self.Health.bg:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Health.bg:SetAlpha(0.05)
 
self.Health.value = setFontString(self.Health, GameFontNormalSmall, 10) -- Healthbar Text
self.Health.value:SetPoint("RIGHT", -2, 0)
 
self.Highlight = self:CreateTexture(nil, "HIGHLIGHT") --Mouse-over Highlighting
self.Highlight:SetTexture(pazcolors[2].r, pazcolors[2].g, pazcolors[2].b, pazcolors[2].a)
self.Highlight:SetBlendMode("ADD")
self.Highlight:SetAllPoints(self.Health)
 
self.Power = CreateFrame("StatusBar", nil, self) -- Powerbar
self.Power:SetHeight(unit and 5 or 2)
self.Power:SetStatusBarTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Power:SetPoint("LEFT")
self.Power:SetPoint("RIGHT")
self.Power:SetPoint("TOP", self.Health, "BOTTOM", 0, -1)
 
self.Power.colorTapping = true
self.Power.colorDisconnected = true
self.Power.colorClass = true
self.Power.colorReaction = true
 
self.Power.bg = self.Power:CreateTexture(nil, "BORDER") -- Powerbar Background
self.Power.bg:SetAllPoints(self.Power)
self.Power.bg:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Power.bg:SetAlpha(0.3)
 
self.Name = setFontString(self.Health, GameFontNormalSmall, 10)
self.Name:SetPoint("LEFT", 2, 0)
 
self.Leader = self.Health:CreateTexture(nil, 'OVERLAY') --Leader Icon
self.Leader:SetHeight(16)
self.Leader:SetWidth(16)
self.Leader:SetPoint('TOPLEFT', self, 0, 8)
self.Leader:SetTexture('Interface\\GroupFrame\\UI-Group-LeaderIcon')
 
self.RaidIcon = self.Health:CreateTexture(nil, "OVERLAY") --Raid Icons
self.RaidIcon:SetHeight(16)
self.RaidIcon:SetWidth(16)
self.RaidIcon:SetPoint("TOP", self, 0, 8)
self.RaidIcon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons")
 
self.PvP = self.Power:CreateTexture(nil, "OVERLAY")
self.PvP:SetPoint("CENTER", self.Health, "LEFT", 2, -5)
self.PvP:SetHeight(25)
self.PvP:SetWidth(25)
 
if(unit=="player" or unit=="target") then
self.Power.value = setFontString(self.Power, GameFontNormalSmall, 10)
if(unit=="player") then
self.Power.value:SetPoint("LEFT", self.Health, "LEFT", 2, 0)
self.Spark = self.Power:CreateTexture(nil, "OVERLAY")
self.Spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
self.Spark:SetBlendMode("ADD")
self.Spark:SetHeight(self.Power:GetHeight() * 2)
self.Spark:SetWidth(self.Power:GetHeight() * 2)
self.Spark.manatick = true
self.ignoreBanzai = true
 
if(class == 'DRUID') then
self.DruidMana = CreateFrame('StatusBar', nil, self)
self.DruidMana:SetPoint("BOTTOMRIGHT", self.Power, "TOPRIGHT")
self.DruidMana:SetPoint("BOTTOMLEFT", self.Power, "TOPLEFT")
self.DruidMana:SetStatusBarTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.DruidMana:SetStatusBarColor(0.3, 0.3, 1)
self.DruidMana:SetHeight(1.35)
self.DruidMana.Text = setFontString(self.DruidMana, GameFontNormalSmall, 10)
self.DruidMana.Text:SetPoint("CENTER", 0, 7)
self.PreUpdatePower = PreUpdatePower
end
 
self.Combat = self.Power:CreateTexture(nil, 'OVERLAY')
self.Combat:SetPoint('CENTER', self, 'BOTTOMRIGHT', -1, -2)
self.Combat:SetHeight(14)
self.Combat:SetWidth(14)
self.Combat:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
self.Combat:SetTexCoord(0.58, 0.90, 0.08, 0.41)
 
if UnitLevel("player") ~= MAX_PLAYER_LEVEL then
self.Resting = self.Health:CreateTexture(nil, 'OVERLAY')
self.Resting:SetPoint('CENTER', self, 'TOPRIGHT', -1, -2)
self.Resting:SetHeight(14)
self.Resting:SetWidth(14)
self.Resting:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
self.Resting:SetTexCoord(0.09, 0.43, 0.08, 0.42)
end
 
if(class == "DEATHKNIGHT") then
RuneFrame:SetParent(self)
RuneFrame:SetScale(0.75)
RuneFrame:SetPoint("TOPLEFT", self, "BOTTOMLEFT",0 , -10)
end
else
self.Power.value:SetPoint("RIGHT", self.Health.value, "LEFT", 2, 0)
 
self.CPoints = setFontString(self, ChatFontSmall, 38)
self.CPoints:SetPoint("RIGHT", self, "LEFT", -9, 3)
self.CPoints:SetJustifyH("RIGHT")
end
end
if(unit=="target" or unit=="pet") then
self.Buffs = CreateFrame("Frame", nil, self)
self.Buffs.spacing = 5.3
self.Buffs:SetHeight(self.Health:GetHeight() -3)
self.Buffs:SetWidth(230/1.2)
self.Buffs.size = math.floor(self.Buffs:GetHeight())
self.Buffs["growth-y"] = "DOWN"
self.Debuffs = CreateFrame("Frame", nil, self)
self.Debuffs.spacing = 5.3
self.Debuffs:SetHeight(self.Health:GetHeight() -3)
self.Debuffs:SetWidth(230)
self.Debuffs:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 1, -5)
self.Debuffs.initialAnchor = "TOPLEFT"
self.Debuffs["growth-y"] = "DOWN"
self.Debuffs.size = math.floor(self.Debuffs:GetHeight())
 
if(unit=="target") then
self.Buffs:SetPoint("TOPLEFT", self, "TOPRIGHT", 2+floor(pazd[0]/5), -1)
self.Buffs.initialAnchor = "TOPLEFT"
if (ttt) then
self.Debuffs.num = 10
else
self.Debuffs.num = 20
end
elseif(unit=='pet')then
if(class == 'HUNTER') then
self.Power.colorHappiness = true
self:RegisterEvent('UNIT_HAPPINESS')
self.UNIT_HAPPINESS = self.UNIT_MANA
else
self.Power.colorPower = true
end
self.Buffs:SetPoint("TOPRIGHT", self, "TOPLEFT", -4, -1)
self.Buffs["growth-x"] = "LEFT"
self.Buffs.initialAnchor = "TOPRIGHT"
self.Debuffs.num = 6
end
end
if(unit=='focus' or unit=='focustarget' or unit=='targettarget' or unit=='targettargettarget') then
self.Debuffs = CreateFrame("Frame", nil, self) -- Debuff Layout
self.Debuffs.spacing = 5.3
self.Debuffs.size = (pazd[1] - 3)
self.Debuffs:SetWidth(self.Debuffs.size * 4)
self.Debuffs:SetHeight(self.Debuffs.size)
self.Debuffs.num = 3
if(unit=='focus' or unit =='focustarget') then
self.Debuffs:SetPoint("LEFT", self, "RIGHT", 3, 0)
self.Debuffs.initialAnchor = "TOPLEFT"
self.Debuffs["growth-x"] = "RIGHT"
else
self.Debuffs:SetPoint("RIGHT", self, "LEFT", -3, 0)
self.Debuffs["growth-x"] = "LEFT"
self.Debuffs.initialAnchor = "TOPRIGHT"
end
end
 
if(unit == 'pet' or unit == 'player') then
if(experience) then
self.Experience = CreateFrame('StatusBar', nil, self)
self.Experience:SetPoint('TOP', self.Power, 'BOTTOM', 0, -2)
self.Experience:SetStatusBarTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Experience:SetAlpha(.75)
self.Experience:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", insets ={left = -1, right = -1, top = -1, bottom = -1}})
self.Experience:SetBackdropColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a)
self.Experience:SetHeight(2)
if(unit=='player') then
self.Experience:SetWidth(pazd[3])
else
self.Experience:SetWidth(pazd[4])
end
self.Experience.Tooltip = true
self.Experience.bg = self.Experience:CreateTexture(nil, 'BORDER')
self.Experience.bg:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Experience.bg:SetAllPoints(self.Experience)
self.Experience.bg:SetAlpha(0.05)
if(not IsAddOnLoaded('oUF_Experience')) then
self.Experience:Hide()
end
end
end
 
if(not unit) then
self.outsideRangeAlpha = 0.4
self.inRangeAlpha = 1.0
self.Range = true
 
self.ReadyCheck = self.Health:CreateTexture(nil, 'OVERLAY')
self.ReadyCheck:SetPoint('TOPRIGHT', self, 0, 8)
self.ReadyCheck:SetHeight(16)
self.ReadyCheck:SetWidth(16)
end
 
if threat then
self.Threat = CreateFrame("StatusBar")
self.Threat:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", insets ={left = -1, right = -1, top = -1, bottom = -1}})
self.Threat:SetStatusBarTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Threat:SetParent(self)
self.Threat:SetOrientation("VERTICAL")
if unit == "target" then
self.Threat:SetBackdropColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a)
self.Threat:SetWidth(floor(pazd[0])/5)
self.Threat:SetHeight(pazd[0])
self.Threat:SetPoint("RIGHT", 1+floor(pazd[0]/5), 0)
elseif unit == "targettarget" or unit == "targettargettarget" then
self.Threat:SetBackdropColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a)
self.Threat:SetWidth(floor(pazd[1])/5)
self.Threat:SetHeight(pazd[1])
self.Threat:SetPoint("RIGHT", 1+floor(pazd[1]/5), 0)
else
self.Threat:SetBackdropColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a)
self.Threat:SetWidth(floor(pazd[1])/5)
self.Threat:SetHeight(pazd[1])
self.Threat:SetPoint("LEFT", -(1+floor(pazd[1]/5)), 0)
end
self.Threat.bg = self.Threat:CreateTexture(nil, "BORDER")
self.Threat.bg:SetAllPoints(self.Threat)
self.Threat.bg:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Threat.bg:SetAlpha(0.05)
end
 
if castBar and (unit=="player" or unit=="target" or (focuscast and unit=="focus")) then
self.Castbar = CreateFrame("StatusBar")
if(unit=="player" or unit=="target") then
self.Castbar:SetWidth(pazd[3])
else
self.Castbar:SetWidth(pazd[4])
end
self.Castbar:SetHeight(10)
self.Castbar:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", insets ={left = -1, right = -1, top = -1, bottom = -1}})
self.Castbar:SetBackdropColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a)
self.Castbar:SetStatusBarTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Castbar:SetStatusBarColor(pazcolors[0].r, pazcolors[0].g, pazcolors[0].b, pazcolors[0].a)
self.Castbar:SetParent(self)
self.Castbar:SetPoint("TOP", 0, 11)
self.Castbar:SetMinMaxValues(1, 100)
self.Castbar:SetValue(1)
self.Castbar:Hide()
self.Castbar.bg = self.Castbar:CreateTexture(nil, "BORDER")
self.Castbar.bg:SetAllPoints(self.Castbar)
self.Castbar.bg:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Castbar.bg:SetAlpha(0.05)
self.Castbar.Spark = self.Power:CreateTexture(nil, "OVERLAY")
self.Castbar.Spark:SetParent(self.Castbar)
self.Castbar.Spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
self.Castbar.Spark:SetBlendMode("ADD")
self.Castbar.Spark:SetHeight(self.Castbar:GetHeight() * 2)
self.Castbar.Spark:SetWidth(self.Castbar:GetHeight() * 2)
self.Castbar.Time = self.Castbar:CreateFontString(nil, "OVERLAY")
self.Castbar.Time:SetPoint("RIGHT", self.Castbar, -2, 0)
self.Castbar.Time:SetFontObject(GameFontNormalSmall)
self.Castbar.Time:SetTextColor(1, 1, 1)
self.Castbar.Time:SetJustifyH("RIGHT")
self.Castbar.Text = self.Castbar:CreateFontString(nil, "OVERLAY")
self.Castbar.Text:SetPoint("LEFT", self.Castbar, 2, 0)
self.Castbar.Text:SetWidth(self.Castbar:GetWidth()*4/5)
self.Castbar.Text:SetHeight(10)
self.Castbar.Text:SetFontObject(GameFontNormalSmall)
self.Castbar.Text:SetTextColor(1, 1, 1)
self.Castbar.Text:SetJustifyH"LEFT"
self.Castbar.SafeZone = self.Castbar:CreateTexture(nil,"ARTWORK")
self.Castbar.SafeZone:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Castbar.SafeZone:SetVertexColor(pazcolors[3].r, pazcolors[3].g, pazcolors[3].b, pazcolors[3].a)
self.Castbar.SafeZone:SetPoint("TOPRIGHT")
self.Castbar.SafeZone:SetPoint("BOTTOMRIGHT")
end
 
self.DebuffHighlightBackdrop = true
self.DebuffHighlightFilter = true
 
if(unit == 'player' or unit == 'target') then
self.CombatFeedbackText = setFontString(self.Health, GameFontNormalSmall, 18, 'OUTLINE')
self.CombatFeedbackText:SetPoint('CENTER', self.Health, 'CENTER', 0, 0)
self:SetAttribute('initial-height', pazd[0])
self:SetAttribute('initial-width', pazd[3])
self.Health:SetHeight(floor(pazd[0]*0.875)+1)
self.Power:SetHeight(pazd[0]-(1+self.Health:GetHeight()))
elseif(unit == "pet") then
self:SetAttribute('initial-height', pazd[0])
self:SetAttribute('initial-width', pazd[4])
self.Health:SetHeight(floor(pazd[0]*0.875)+1)
self.Power:SetHeight(pazd[0]-(1+self.Health:GetHeight()))
elseif(self:GetParent():GetName():match"oUF_Raid") then
self:SetAttribute('initial-height', pazd[2])
self:SetAttribute('initial-width', pazd[5])
self.Health:SetHeight(pazd[2]*0.875)
self.Power:SetHeight(pazd[2]-(1+self.Health:GetHeight()))
else
self:SetAttribute('initial-height', pazd[1])
self:SetAttribute('initial-width', pazd[4])
self.Health:SetHeight(pazd[1]*0.875)
self.Power:SetHeight(pazd[1]-(1+self.Health:GetHeight()))
end
 
self.UNIT_NAME_UPDATE = OverrideUpdateName
self.PostCreateAuraIcon = PostCreateAuraIcon
self.PostUpdateHealth = PostUpdateHealth
self.PostUpdatePower = PostUpdatePower
self.OverrideUpdateThreat = OverrideUpdateThreat
 
return self
end
 
oUF:RegisterSubTypeMapping('UNIT_LEVEL')
oUF:RegisterStyle('Pazrael', styleFunc)
 
oUF:SetActiveStyle('Pazrael')
 
oUF:Spawn('player'):SetPoint('CENTER', UIParent, pazp[1], pazp[0])
oUF:Spawn('pet'):SetPoint('RIGHT', oUF.units.player, 'LEFT', -25, 0)
oUF:Spawn('target'):SetPoint('CENTER', UIParent, pazp[2], pazp[0])
oUF:Spawn('targettarget'):SetPoint('BOTTOMRIGHT', oUF.units.target, 'TOPRIGHT', 0, 13)
oUF:Spawn('focus'):SetPoint('BOTTOMLEFT', oUF.units.player, 'TOPLEFT', 0, 13)
if (ttt) then
oUF:Spawn('targettargettarget'):SetPoint('TOPLEFT',oUF.units.targettarget, 'BOTTOMLEFT', 0, -70)
end
if select(2, UnitClass('player')) == 'DEATHKNIGHT' then
oUF:Spawn('focustarget'):SetPoint('TOPLEFT', oUF.units.player, 'BOTTOMLEFT',0, -26)
else
oUF:Spawn('focustarget'):SetPoint('TOPLEFT', oUF.units.player, 'BOTTOMLEFT',0, -13)
end
 
local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("TOPLEFT", pazp[3], pazp[4])
party:SetAttribute("yOffset", -5)
party:Show()
 
local partyToggle = CreateFrame("Frame")
 
local partytarget = {}
if ptargets then
for i = 1, 5 do
partytarget[i] = oUF:Spawn("party"..i.."target", "oUF_Party"..i.."Target")
if i == 1 then
partytarget[i]:SetPoint("TOPLEFT", party, "TOPRIGHT", 8, 0)
else
partytarget[i]:SetPoint("TOP", partytarget[i-1], "BOTTOM", 0, -5)
end
end
end
 
partyToggle:RegisterEvent("PARTY_MEMBERS_CHANGED")
partyToggle:RegisterEvent("PARTY_LEADER_CHANGED")
partyToggle:RegisterEvent("RAID_ROSTER_UPDATE")
partyToggle:RegisterEvent("PLAYER_LOGIN")
if partyRaid then
partyToggle:SetScript("OnEvent", function(self)
if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED")
else self:UnregisterEvent("PLAYER_REGEN_ENABLED")
if(GetNumRaidMembers() > 0) then
party:SetAttribute("showRaid", true)
party:SetAttribute("showParty", false)
elseif(GetNumPartyMembers() > 0) then
party:SetAttribute("showRaid", false)
party:SetAttribute("showParty", true)
end
end
end)
else
partyToggle:SetScript("OnEvent", function(self)
if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED")
else self:UnregisterEvent("PLAYER_REGEN_ENABLED")
if(GetNumRaidMembers() > 0) then
party:Hide()
if ptargets then
for i,v in ipairs(partytarget) do
v:Disable()
end
end
elseif(GetNumPartyMembers() > 0) then
party:SetAttribute("showParty", true)
party:Show()
if ptargets then
for i,v in ipairs(partytarget) do
v:Enable()
end
end
end
end
end)
local last = {}
for i = 1, 8 do
local raid = oUF:Spawn("header", "oUF_Raid"..i)
raid:SetManyAttributes("groupFilter", tostring(i), "showRaid", true, "yOffSet", -8)
table.insert(last, raid)
if(i==1) then
raid:SetPoint("TOPLEFT", UIParent, "TOPLEFT", pazp[5], pazp[6])
else
raid:SetPoint("TOPLEFT", last[i-1], "TOPRIGHT", 8, 0)
end
raid:Show()
end
end
\ No newline at end of file