if AftermathhUI.ouf.showraid == false then return end
local parent, ns = ...
local oUF = ns.oUF or oUF
local function RaidFrames(self, unit)
if AftermathhUI.ouf.dropdownmenu == true then
self.menu = CreateDropDown
end
self:RegisterForClicks('AnyDown')
if AftermathhUI.ouf.tooltiponraid == true then
self:SetScript('OnEnter', UnitFrame_OnEnter)
self:SetScript('OnLeave', UnitFrame_OnLeave)
end
self:SetAttribute('*type2', 'menu')
self:SetBackdrop({
bgFile = AftermathhUI.media.blank,
insets = {top = -1, left = -1, bottom = -1, right = -1},
})
self:SetBackdropColor(0, 0, 0, 0.4)
self.Health = CreateFrame('StatusBar', nil, self)
self.Health:SetStatusBarTexture(AftermathhUI.media.texture)
if AftermathhUI.ouf.custombarcoloronraid == true then
self.Health:SetStatusBarColor(unpack(AftermathhUI.ouf.healthbarcolorraid))
end
self.Health:SetParent(self)
self.Health:SetAllPoints(self)
self.Health.Smooth = true
self.Health.frequentUpdates = true
if AftermathhUI.ouf.custombarcoloronraid == false then
self.Health.colorClass = true
end
--CreateBorderLight(self.Health, AftermathhUI.media.bordersize-1, AftermathhUI.bordercolor, AftermathhUI.bordercolor, AftermathhUI.bordercolor, 2)
if AftermathhUI.ouf.raidframesvertical == true then
self.Health:SetOrientation('VERTICAL')
end
self.Health.bg = self.Health:CreateTexture(nil, 'BORDER')
self.Health.bg:SetAllPoints(self.Health)
self.Health.bg:SetTexture(AftermathhUI.media.texture)
self.Health.bg:SetVertexColor(0,0,0,0.6)
local HealthText = self.Health:CreateFontString(nil, 'OVERLAY')
HealthText:SetFont(AftermathhUI.media.font3, 11, AftermathhUI.media.fontflag)
HealthText:SetPoint('TOP', 1, -20)
if AftermathhUI.media.shadowoffset == true then
HealthText:SetShadowOffset(1, -1)
HealthText:SetShadowColor(0,0,0)
end
self:Tag(HealthText, '[Aftermathh:Deficit]')
self.Name = self.Health:CreateFontString(nil, 'OVERLAY')
self.Name:SetPoint('TOP', 0, -6)
self.Name:SetFont(AftermathhUI.media.font, 11, AftermathhUI.media.fontflag)
if AftermathhUI.media.shadowoffset == true then
self.Name:SetShadowOffset(1, -1)
self.Name:SetShadowColor(0, 0, 0)
end
if AftermathhUI.ouf.custombarcoloronraid == true then
self:Tag(self.Name, '[raidcolor][Aftermathh:RaidName]')
end
if AftermathhUI.ouf.custombarcoloronraid == false then
self:Tag(self.Name, '|cffffffff[Aftermathh:RaidName]|r')
end
local InvisFrame = CreateFrame("Frame", nil, self)
InvisFrame:SetFrameStrata("MEDIUM")
InvisFrame:SetFrameLevel(5)
InvisFrame:SetAllPoints()
self.MasterLooter = InvisFrame:CreateTexture('$parentMasterLooterIcon', 'OVERLAY', self)
self.MasterLooter:SetSize(11, 11)
self.MasterLooter:SetPoint('RIGHT', self.Health, 'TOPRIGHT', 2, 2)
self.Assistant = InvisFrame:CreateTexture(nil, 'OVERLAY', self)
self.Assistant:SetSize(12, 12)
self.Assistant:SetPoint('LEFT', self.Health, 'TOPLEFT', -5, 2)
self.Leader = InvisFrame:CreateTexture('$parentLeaderIcon', 'OVERLAY', self)
self.Leader:SetSize(12, 12)
self.Leader:SetPoint('LEFT', self.Health, 'TOPLEFT', -5, 2)
self.RaidIcon = InvisFrame:CreateTexture(nil, 'OVERLAY')
self.RaidIcon:SetSize(17, 17)
self.RaidIcon:SetPoint('CENTER', self, 'TOP')
self.ReadyCheck = InvisFrame:CreateTexture(nil, 'OVERLAY')
self.ReadyCheck:SetSize(31, 25)
self.ReadyCheck:SetPoint('CENTER')
self.ReadyCheck.delayTime = 4
self.ReadyCheck.fadeTime = 1
if AftermathhUI.ouf.showroleicon == true then
self.LFDRole = InvisFrame:CreateTexture(nil, 'OVERLAY')
self.LFDRole:SetPoint('CENTER', self, 'BOTTOM', -1, 1)
self.LFDRole:SetSize(14, 14)
self.LFDRole:SetTexture(AftermathhUI.media.lfd)
self.LFDRole:SetDesaturated(1)
end
if AftermathhUI.ouf.showaggroonraidframes == true then
table.insert(self.__elements, UpdateThreatRaid)
self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateThreatRaid)
self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', UpdateThreatRaid)
self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', UpdateThreatRaid)
end
if AftermathhUI.ouf.aurawatch == true and AftermathhUI.ouf.gridlayout == true and AftermathhUI.ouf.dpslayout == false then
CreateAuraWatch(self,unit)
end
if AftermathhUI.ouf.raiddebuffs == true then
self.RaidDebuffs = CreateFrame('Frame', nil, self)
self.RaidDebuffs:SetSize(20, 20)
self.RaidDebuffs:SetPoint('CENTER', self)
self.RaidDebuffs:SetFrameStrata('HIGH')
local PerfectBorders = 768/string.match(GetCVar("gxResolution"), "%d+x(%d+)")/0.89999997615814
self.RaidDebuffs:SetBackdrop({
bgFile = AftermathhUI.media.borderlight,
insets = {top = -4+PerfectBorders, left = -4+PerfectBorders, bottom = -4+PerfectBorders, right = -4+PerfectBorders},
})
self.RaidDebuffs.icon = self.RaidDebuffs:CreateTexture(nil, 'ARTWORK')
self.RaidDebuffs.icon:SetTexCoord(.07,.93,.07,.93)
self.RaidDebuffs.icon:SetAllPoints(self.RaidDebuffs)
self.RaidDebuffs.cd = CreateFrame('Cooldown', nil, self.RaidDebuffs)
self.RaidDebuffs.cd:SetAllPoints(self.RaidDebuffs)
local overlayFrame = CreateFrame("frame", nil, self.RaidDebuffs, nil)
overlayFrame:SetFrameStrata("HIGH")
overlayFrame:SetFrameLevel(5)
self.RaidDebuffs.count = self.RaidDebuffs:CreateFontString(nil, 'OVERLAY')
self.RaidDebuffs.count:SetParent(overlayFrame)
self.RaidDebuffs.count:SetFont(AftermathhUI.media.font, 12, AftermathhUI.media.fontflag)
if AftermathhUI.media.shadowoffset == true then
self.RaidDebuffs.count:SetShadowOffset(1, -1)
self.RaidDebuffs.count:SetShadowColor(0, 0, 0)
end
self.RaidDebuffs.count:ClearAllPoints()
self.RaidDebuffs.count:SetPoint('TOPRIGHT', self.RaidDebuffs, 2, 3)
end
if AftermathhUI.ouf.healprediction == true then
local myBars = CreateFrame('StatusBar', nil, self.Health)
myBars:SetStatusBarTexture(AftermathhUI.media.texture)
myBars:SetStatusBarColor(0, 1, 0.5, 0.45)
myBars:SetSize(55, 38)
if AftermathhUI.ouf.raidframesvertical == true then
myBars:SetOrientation("VERTICAL")
myBars:SetPoint('BOTTOM', self.Health:GetStatusBarTexture(), 'TOP', 0, 0)
myBars:SetSize(59, 39)
else
myBars:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
myBars:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
end
local otherBars = CreateFrame('StatusBar', nil, myBars)
otherBars:SetStatusBarTexture(AftermathhUI.media.texture)
otherBars:SetStatusBarColor(0, 0.5, 1, 0.45)
otherBars:SetSize(55, 38)
if AftermathhUI.ouf.raidframesvertical == true then
otherBars:SetOrientation("VERTICAL")
otherBars:SetPoint('BOTTOM', myBars:GetStatusBarTexture(), 'TOP', 0, 0)
otherBars:SetSize(59, 39)
else
otherBars:SetPoint('TOPLEFT', myBars:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
otherBars:SetPoint('BOTTOMLEFT', myBars:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
end
self.HealPrediction = {
myBar = myBars,
otherBar = otherBars,
maxOverflow = 1,
}
end
self.SpellRange = {
insideAlpha = 1,
outsideAlpha = 0.3,
}
return self
end
oUF:RegisterStyle('Aftermathh_Raid', RaidFrames)
oUF:Factory(function(self)
self:SetActiveStyle('Aftermathh_Raid')
if AftermathhUI.ouf.showraid == true then
if AftermathhUI.ouf.gridlayout == true and AftermathhUI.ouf.dpslayout == false then
local Raid = self:SpawnHeader("AftermathhRaidGrid", nil, 'solo,party,raid',
'showPlayer', true,
'showRaid', true,
'showParty', true,
'showSolo', true,
'xoffset', 7,
'yOffset', 0,
'point', 'LEFT',
'groupFilter', '1,2,3,4,5,6,7,8',
'groupingOrder', '1,2,3,4,5,6,7,8',
'groupBy', 'GROUP',
'maxColumns', 5,
'unitsPerColumn', 5,
'columnSpacing', 6,
'columnAnchorPoint', 'TOP',
'oUF-initialConfigFunction', [[
self:SetWidth(59)
self:SetHeight(38)
self:SetScale(1)
]]
)
Raid:SetPoint('LEFT', UIParent, 221, -54)
end
if AftermathhUI.ouf.gridlayout == false and AftermathhUI.ouf.dpslayout == true then
local Raid = self:SpawnHeader("AftermathhRaid", nil, 'solo,party,raid',
'showPlayer', true,
'showRaid', true,
'showParty', false,
'showSolo', false,
'xoffset', 12,
'yOffset', -5,
'point', 'LEFT',
'groupFilter', '1,2,3,4,5,6,7,8',
'groupingOrder', '1,2,3,4,5,6,7,8',
'groupBy', 'GROUP',
'maxColumns', 12,
'unitsPerColumn', 5,
'columnSpacing', 12,
'columnAnchorPoint', 'TOP',
'oUF-initialConfigFunction', [[
self:SetWidth(45)
self:SetHeight(38)
self:SetScale(1)
]]
)
Raid:SetPoint('TOPLEFT', UIParent, 10, -9)
end
end
end)