WoWInterface SVN oUF_Pazrael

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches
    from Rev 3 to Rev 7
    Reverse comparison

Rev 3 → Rev 7

oUF_Pazrael _Beta/textures/Minimalist.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
oUF_Pazrael _Beta/textures/border.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
oUF_Pazrael _Beta/oUF_Pazrael.lua New file
0,0 → 1,534
-----------------------------------------------------------------------------------------------
-- 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 partyRaid = false -- enable party-style raid
-- Stylistic Elements --
-- Start of optimization
local pazcolors = {
[0] = { r = .35, g = .35, b = .45, a = 1}, -- Status Bar
[1] = { r = .25, g = .25, b = .25, a = .25}, -- Status Bar BG
[2] = { r = 0, g = 0, b = 0, a = 1}, -- Frame BGa
[3] = { r = .5, g = .5, b = .5, a = .3}, -- Highlight
[4] = { r = .33, g = .59, b = .33, a = 1} -- CastBar Safe
}
-- Function declarations --
local classification = { --Level Formatting Array
["worldboss"] = "%s Boss",
["rareelite"] = "%s+ Rare",
["elite"] = " %s+",
["rare"] = " %s Rare",
["normal"] = "%s",
["trivial"] = "%s",
}
local function updateColor(self, element, unit, func) -- unified frame coloring
local color
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
color = self.colors.reaction[UnitReaction(unit, 'player')]
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)
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 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) > 15 then name = name:sub(1,15).."..." 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)) then
self.Name:Hide()
end
end
self.Name:SetText(name)
end
 
end
end
 
local number = function(n)
if n <= 9999 then return n end
if n >= 1000000 then
return string.format("%.1fm", n/1000000)
elseif n >= 10000 then
return string.format("%.1fk", n/1000)
end
end
 
local function PostUpdateHealth(self, event, unit, bar, min, max)
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(max==100) then
if(min~=max) then
bar.value:SetText(floor(min/max*100).."%")
else
bar.value:SetText()
end
elseif(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
else
if(max==100) then
if(unit=="target" and not UnitIsPlayer("target")) then
bar.value:SetFormattedText("%s (%d|cff0090ff%%|r)", number(min), number(floor(min/max*100)))
else
bar.value:SetFormattedText("%s|cff0090ff%%", number(min))
end
else
bar.value:SetFormattedText("%s |cff0090ff/|r %s", number(min), number(max))
end
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)
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[2].r, pazcolors[2].g, pazcolors[2].b, pazcolors[2].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:SetVertexColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a)
 
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[3].r, pazcolors[3].g, pazcolors[3].b, pazcolors[3].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") then
self.Power.value = setFontString(self.Power, GameFontNormalSmall, 10)
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 -- Druid Bar Support
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)
end
 
if(class == "DEATHKNIGHT") then
RuneFrame:SetParent(self)
RuneFrame:SetScale(0.75)
RuneFrame:SetPoint("TOPLEFT", self, "BOTTOMLEFT",0 , -3)
end
 
self.CombatIcon = self.Health:CreateTexture(nil, 'OVERLAY')
self.CombatIcon:SetPoint('CENTER', self, 'BOTTOMRIGHT', -1, -2)
self.CombatIcon:SetHeight(14)
self.CombatIcon:SetWidth(14)
self.CombatIcon:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
self.CombatIcon:SetTexCoord(0.58, 0.90, 0.08, 0.41)
self.Combat = self.CombatIcon
 
self.RestingIcon = self.Health:CreateTexture(nil, 'OVERLAY')
self.RestingIcon:SetPoint('CENTER', self, 'TOPRIGHT', -1, -2)
self.RestingIcon:SetHeight(14)
self.RestingIcon:SetWidth(14)
self.RestingIcon:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
self.RestingIcon:SetTexCoord(0.09, 0.43, 0.08, 0.42)
self.Resting = self.RestingIcon
elseif(unit == 'target') then
self.Power.value = setFontString(self.Power, GameFontNormalSmall, 10)
self.Power.value:SetPoint("RIGHT", self.Health.value, "LEFT", 2, 0)
 
if(class == "ROGUE" or class == "DRUID") then
self.CPoints = setFontString(self, ChatFontSmall, 38)
self.CPoints:SetPoint("RIGHT", self, "LEFT", -9, 3)
self.CPoints:SetJustifyH("RIGHT")
end
 
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:SetPoint("TOPLEFT", self, "TOPRIGHT", 4, -1)
self.Buffs.initialAnchor = "TOPLEFT"
self.Buffs["growth-y"] = "DOWN"
self.Buffs.size = math.floor(self.Buffs:GetHeight())
 
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())
self.Debuffs.num = 9
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 = CreateFrame("Frame", nil, self)
self.Buffs.spacing = 5.3
self.Buffs:SetHeight(self.Health:GetHeight() -3)
self.Buffs:SetWidth(230/1.2)
self.Buffs:SetPoint("TOPRIGHT", self, "TOPLEFT", -4, -1)
self.Buffs["growth-x"] = "LEFT"
self.Buffs["growth-y"] = "UP"
self.Buffs.initialAnchor = "TOPRIGHT"
self.Buffs.size = math.floor(self.Buffs:GetHeight())
 
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())
self.Debuffs.num = 6
elseif(unit=='focus' or unit=='focustarget' or unit=='targettarget') then
self.Debuffs = CreateFrame("Frame", nil, self) -- Debuff Layout
self.Debuffs.spacing = 5.3
self.Debuffs.size = (21 - 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(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(unit=="player" or unit=="target") then
self.Castbar = CreateFrame("StatusBar")
self.Castbar:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", insets ={left = -1, right = -1, top = -1, bottom = -1}})
self.Castbar:SetBackdropColor(pazcolors[2].r, pazcolors[2].g, pazcolors[2].b, pazcolors[2].a)
self.Castbar:SetWidth(230)
self.Castbar:SetHeight(10)
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, 12)
self.Castbar:SetMinMaxValues(1, 100)
self.Castbar:SetValue(1)
self.Castbar:Hide()
self.Castbar.SetStatusBarColor = function(self) end
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:SetVertexColor(pazcolors[1].r, pazcolors[1].g, pazcolors[1].b, pazcolors[1].a )
self.Castbar.bg.SetVertexColor = function(self) end
self.Castbar.casttime = self.Castbar:CreateFontString(nil, "OVERLAY")
self.Castbar.casttime:SetPoint("RIGHT", self.Castbar, -2, 0)
self.Castbar.casttime:SetFontObject(GameFontNormalSmall)
self.Castbar.casttime:SetTextColor(1, 1, 1)
self.Castbar.casttime:SetJustifyH("RIGHT")
self.Castbar.text = self.Castbar:CreateFontString(nil, "OVERLAY")
self.Castbar.text:SetPoint("LEFT", self.Castbar, 2, 0)
self.Castbar.text:SetWidth(230)
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 = self.Castbar:CreateTexture(nil,"ARTWORK")
self.Castbar.safezone:SetTexture("Interface\\AddOns\\oUF_Pazrael\\textures\\Minimalist")
self.Castbar.safezone:SetVertexColor(pazcolors[4].r, pazcolors[4].g, pazcolors[4].b, pazcolors[4].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', 28)
self:SetAttribute('initial-width', 230)
self.Health:SetHeight(22)
self.Power:SetHeight(5)
elseif(unit == 'pet') then
self:SetAttribute('initial-height', 28)
self:SetAttribute('initial-width', 130)
self.Health:SetHeight(22)
self.Power:SetHeight(5)
elseif(self:GetParent():GetName():match"oUF_Raid") then
self:SetAttribute('initial-height', 24)
self:SetAttribute('initial-width', 50)
self.Health:SetHeight(21)
self.Power:SetHeight(2)
else
self:SetAttribute('initial-height', 21)
self:SetAttribute('initial-width', 130)
self.Health:SetHeight(17.5)
self.Power:SetHeight(2)
end
 
self.UNIT_NAME_UPDATE = OverrideUpdateName
self.PostCreateAuraIcon = PostCreateAuraIcon
self.PostUpdateHealth = PostUpdateHealth
self.PostUpdatePower = PostUpdatePower
 
return self
end
 
oUF:RegisterSubTypeMapping('UNIT_LEVEL')
oUF:RegisterStyle('Pazrael', styleFunc)
 
oUF:SetActiveStyle('Pazrael')
 
oUF:Spawn('player'):SetPoint('CENTER', UIParent, -150, -225)
oUF:Spawn('pet'):SetPoint('RIGHT', oUF.units.player, 'LEFT', -25, 0)
oUF:Spawn('target'):SetPoint('CENTER', UIParent, 150, -225)
oUF:Spawn('targettarget'):SetPoint('BOTTOMRIGHT', oUF.units.target, 'TOPRIGHT', 0, 14)
oUF:Spawn('focus'):SetPoint('BOTTOMLEFT', oUF.units.player, 'TOPLEFT', 0, 14)
if select(2, UnitClass('player')) == 'DEATHKNIGHT' then
oUF:Spawn('focustarget'):SetPoint('TOPLEFT', oUF.units.player, 'BOTTOMLEFT',0, -21)
else
oUF:Spawn('focustarget'):SetPoint('TOPLEFT', oUF.units.player, 'BOTTOMLEFT',0, -14)
end
 
local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("TOPLEFT", 15, -15)
party:SetAttribute("yOffset", -5)
party:Show()
 
local partyToggle = CreateFrame("Frame")
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()
elseif(GetNumPartyMembers() > 0) then
party:SetAttribute("showParty", true)
party:Show()
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", 15, -15)
else
raid:SetPoint("TOPLEFT", last[i-1], "TOPRIGHT", 8, 0)
end
raid:Show()
end
end
 
partyToggle:RegisterEvent("PARTY_MEMBERS_CHANGED")
partyToggle:RegisterEvent("PARTY_LEADER_CHANGED")
partyToggle:RegisterEvent("RAID_ROSTER_UPDATE")
partyToggle:RegisterEvent("PLAYER_LOGIN")
\ No newline at end of file
oUF_Pazrael _Beta/oUF_Pazrael.toc New file
0,0 → 1,9
## Interface: 20400
## Author: Pazrael of Silvermoon
## Title: oUF Pazrael
## Notes: Custom layout based on Lily
## RequiredDeps: oUF
## OptionalDeps: oUF_Banzai, oUF_DruidMana, oUF_CombatFeedback, oUF_DebuffHighlight, oUF_ReadyCheck, oUF_Voice, LibMobHealth-4.0
## X-Category: UnitFrame
 
oUF_Pazrael.lua
\ No newline at end of file