Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local _, class = UnitClass('player')
- local playerColor = RAID_CLASS_COLORS[select(2, UnitClass('player'))]
- local texture = 'Interface\\AddOns\\oUF_Aftermathh\\media\\texture.tga'
- local border = 'Interface\\AddOns\\oUF_Aftermathh\\media\\border.tga'
- local font = 'Interface\\AddOns\\oUF_Aftermathh\\media\\font.ttf'
- local borderbg = 'Interface\\AddOns\\oUF_Aftermathh\\media\\borderBackground.tga'
- local PowerMiddle = false
- local PowerRight = false
- local PowerNormal = true
- local Debuffs = true
- local Buffs = true
- local DebuffType = true
- local PvPIcon = false
- local Portraits = false
- local BossFrame = true
- local CastBars = true
- local Safezone = true
- local Latency = true
- local ClassColor = false
- local FocusShowInterruptHighlight = true
- local TargetShowInterruptHighlight = true
- local FocusCastBarIcon = true
- local TargetCastBarIcon = true
- local backdrop = {
- bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=],
- insets = {top = -1, left = -1, bottom = -1, right = -1},
- }
- local function UpdateChannelStart(self, event, unit, name, rank, text)
- if (self.Latency) then
- self.Latency:ClearAllPoints()
- self.Latency:SetPoint('LEFT', self, 'BOTTOMLEFT', 1, -1)
- local _, _, ms = GetNetStats()
- self.Latency:SetFormattedText('%dms', ms)
- end
- if (self.SafeZone) then
- self.SafeZone:SetDrawLayer('ARTWORK')
- self.SafeZone:SetPoint('TOPLEFT', self)
- self.SafeZone:SetPoint('BOTTOMLEFT', self)
- end
- end
- local function UpdateCastStart(self, event, unit, name, rank, text, castid)
- if (self.Latency) then
- self.Latency:ClearAllPoints()
- self.Latency:SetPoint('RIGHT', self, 'BOTTOMRIGHT', -1, 1)
- local _, _, ms = GetNetStats()
- self.Latency:SetFormattedText('%dms', ms)
- end
- if (self.SafeZone) then
- self.SafeZone:SetDrawLayer('BORDER')
- self.SafeZone:SetPoint('TOPRIGHT', self)
- self.SafeZone:SetPoint('BOTTOMRIGHT', self)
- end
- end
- local menu = function(self)
- local unit = self.unit:sub(1, -2)
- local cunit = self.unit:gsub('(.)', string.upper, 1)
- if(unit == 'party' or unit == 'partypet') then
- ToggleDropDownMenu(1, nil, _G['PartyMemberFrame'..self.id..'DropDown'], 'cursor', 0, 0)
- elseif(_G[cunit..'FrameDropDown']) then
- ToggleDropDownMenu(1, nil, _G[cunit..'FrameDropDown'], 'cursor', 0, 0)
- end
- end
- local function ShortenValue(value)
- if(value >= 1e6) then
- return ('%.2fm'):format(value / 1e6):gsub('%.?0+([km])$', '%1')
- elseif(value >= 1e4) then
- return ('%.1fk'):format(value / 1e3):gsub('%.?0+([km])$', '%1')
- else
- return value
- end
- end
- oUF.Tags['Afterpower'] = function(unit)
- local power = UnitPower(unit)
- if(power > 0 and not UnitIsDeadOrGhost(unit)) then
- local _, type = UnitPowerType(unit)
- local colors = _COLORS.power
- return ('%s%d'):format(Hex(colors[type] or colors['RUNES']), power)
- end
- end
- oUF.TagEvents['Afterpower'] = 'UNIT_POWER'
- oUF.Tags['Afterhealth'] = function(unit)
- local min, max = UnitHealth(unit), UnitHealthMax(unit)
- local status = not UnitIsConnected(unit) and 'Offline' or UnitIsGhost(unit) and 'Ghost' or UnitIsDead(unit) and 'Dead'
- if(status) then
- return status
- elseif(unit == 'target' and UnitCanAttack('player', unit)) then
- return ('%s | %d %%'):format(ShortenValue(min), min / max * 100)
- elseif(unit == 'player' and min ~= max) then
- return ('%d | %d%%'):format(min - max, min / max * 100)
- elseif(min ~= max) then
- return ('%s | %s'):format(ShortenValue(min), ShortenValue(max))
- else
- return max
- end
- end
- oUF.TagEvents['Afterhealth'] = 'UNIT_HEALTH'
- oUF.Tags['Aftermathh:BossHP'] = function(unit)
- local min, max = UnitHealth(unit), UnitHealthMax(unit)
- return ShortenValue(min)..' | '..math.floor(min/max*100+.5)..'%'
- end
- oUF.TagEvents['Aftermathh:BossHP'] = 'UNIT_HEALTH'
- local auraIcon = function(icons, button)
- if(DebuffType) then
- icons.showDebuffType = true
- end
- button.icon:SetTexCoord(0.03, 0.97, 0.03, 0.97)
- button.overlay:SetTexture(border)
- button.overlay:SetTexCoord(0, 1, 0, 1)
- button.overlay:ClearAllPoints()
- button.overlay:SetPoint('TOPRIGHT', button, 1.35, 1.35)
- button.overlay:SetPoint('BOTTOMLEFT', button, -1.35, -1.35)
- button.overlay.Hide = function(self) self:SetVertexColor(0.65, 0.65, 0.65) end
- button.cd.noCooldownCount = true
- button.cd:SetReverse()
- button.cd:ClearAllPoints()
- button.cd:SetPoint('TOPRIGHT', button.icon, 'TOPRIGHT', -1, -1)
- button.cd:SetPoint('BOTTOMLEFT', button.icon, 'BOTTOMLEFT', 1, 1)
- button.count:SetFont(font, 14, 'THINOUTLINE')
- button.count:ClearAllPoints()
- button.count:SetPoint('BOTTOMRIGHT', 1, 1)
- button.background = button:CreateTexture(nil, 'BACKGROUND')
- button.background:SetPoint('TOPLEFT', button.icon, 'TOPLEFT', -4, 4)
- button.background:SetPoint('BOTTOMRIGHT', button.icon, 'BOTTOMRIGHT', 4, -4)
- button.background:SetTexture(borderbg)
- button.background:SetVertexColor(0, 0, 0, 1)
- end
- local Shared = function(self, unit)
- self:SetScript('OnEnter', UnitFrame_OnEnter)
- self:SetScript('OnLeave', UnitFrame_OnLeave)
- self:RegisterForClicks'AnyDown'
- self:SetAttribute('*type2', 'menu')
- self.menu = menu
- self.disallowVehicleSwap = true
- self.DebuffHighlightBackdrop = true
- self.DebuffHighlightFilter = false
- self:SetBackdrop(backdrop)
- self:SetBackdropColor(0, 0, 0, 0.8)
- --CreateBorder(self, 12, R, G, B, 4, 4, 4, 4, 4, 4, 4, 4)
- local health = CreateFrame('StatusBar', nil, self)
- health:SetHeight(27*.85)
- health:SetStatusBarTexture(texture)
- health:SetStatusBarColor(.25, .25, .25)
- health:SetParent(self)
- health:SetPoint'TOP'
- health:SetPoint'LEFT'
- health:SetPoint'RIGHT'
- health.Smooth = true
- health.frequentUpdates = true
- self.Health = health
- local healthbg = health:CreateTexture(nil, 'BORDER')
- healthbg:SetAllPoints(health)
- healthbg:SetTexture(texture)
- healthbg:SetVertexColor(0, 0, 0, 0.7)
- local healthtext = health:CreateFontString(nil, 'OVERLAY')
- healthtext:SetFont(font, 15, 'THINOUTLINE')
- healthtext:SetPoint('RIGHT', health, -2, 0)
- self:Tag(healthtext, '[raidcolor][Afterhealth]')
- if(unit and unit:find('boss%d')) then
- self:Tag(healthtext, '[raidcolor][Aftermathh:BossHP]')
- end
- if(unit == 'focus' or unit == 'pet' or unit == 'targettarget' or unit == 'focustarget' or unit == 'party' or unit == 'player' or unit == 'target' or unit and unit:find('boss%d')) then
- local power = CreateFrame('StatusBar', nil, self)
- power:SetStatusBarTexture(texture)
- if(PowerNormal) then
- power:SetHeight(27*.11)
- power:SetParent(self)
- power:SetPoint('BOTTOM')
- power:SetPoint('LEFT', .2, 0)
- power:SetPoint('RIGHT', -.2, 0)
- CreateBorder(self.Health, 12, R, G, B, 4, 4, 4, 4, 4, 8, 4, 8)
- end
- if(PowerMiddle) then
- power:SetHeight(25)
- power:SetWidth(440)
- power:SetPoint('LEFT', health, 20, -11)
- power:SetPoint('RIGHT', health, -12, 20)
- power:SetFrameStrata('LOW')
- CreateBorder(self.Health, 12, R, G, B, 4, 4, 4, 4, 4, 4, 4, 4)
- CreateBorder(power, 12, R, G, B, 1, 1, 1, 1, 1, 1, 1, 1)
- end
- if(PowerRight) then
- power:SetHeight(25)
- power:SetWidth(440)
- power:SetPoint('LEFT', health, 20, -10)
- power:SetPoint('RIGHT', health, 10, 20)
- power:SetFrameStrata('LOW')
- CreateBorder(self.Health, 12, R, G, B, 4, 4, 4, 4, 4, 4, 4, 4)
- CreateBorder(power, 12, R, G, B, 1, 1, 1, 1, 1, 1, 1, 1)
- end
- power.Smooth = true
- power.frequentUpdates = true
- power.colorTapowering = true
- power.colorHapoweriness = true
- power.colorClass = true
- power.colorReaction = true
- self.Power = power
- local powerbg = power:CreateTexture(nil, 'BORDER')
- powerbg:SetAllPoints(power)
- powerbg:SetTexture(texture)
- powerbg.multiplier = .3
- power.bg = powerbg
- local powertext = health:CreateFontString(nil, 'OVERLAY')
- powertext:SetFont(font, 15, 'THINOUTLINE')
- powertext:SetPoint('LEFT', health, 2, 0)
- self:Tag(powertext, '[Afterpower]')
- self.colors.power.MANA = {0, 144/255, 1}
- self.colors.power.RUNIC_POWER = {0, 0.82, 1}
- self.Range = {
- insideAlpha = 1,
- outsideAlpha = 0.3,
- }
- self.SpellRange = {
- insideAlpha = 1,
- outsideAlpha = 0.3,
- }
- if(unit == 'focus' or unit == 'pet' or unit == 'targettarget' or unit == 'focustarget' or unit == 'party') then
- powertext:Hide()
- healthtext:Hide()
- end
- if(unit and unit:find('boss%d')) then
- powertext:Hide()
- end
- if(unit == 'focus' or unit == 'pet' or unit == 'targettarget' or unit == 'focustarget') then
- self:SetSize(150, 27)
- end
- if(unit == 'player' or unit == 'target') then
- self:SetSize(270, 27)
- end
- if(unit == 'focus' or unit == 'pet') then
- self:SetScale(0.95)
- end
- end
- if(CastBars) then
- if(unit == 'player' or unit == 'focus' or unit == 'target' or unit == 'pet') then
- self.Castbar = CreateFrame('StatusBar', nil, self)
- self.Castbar:SetStatusBarTexture(texture)
- self.Castbar:SetScale(1.139)
- self.Castbar:SetStatusBarColor(.25, .25, .25)
- CreateBorder(self.Castbar, 12, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.Castbar.Bg = self.Castbar:CreateTexture(nil, 'BACKGROUND')
- self.Castbar.Bg:SetAllPoints(self.Castbar)
- self.Castbar.Bg:SetTexture(texture)
- self.Castbar.Bg:SetVertexColor(0, 0, 0, 0.7)
- if(unit == 'player') then -- Player CastBar
- self.Castbar:SetPoint('BOTTOM', UIParent, -2, 80) -- here we move the player castbar.
- self.Castbar:SetHeight(25)
- self.Castbar:SetWidth(309)
- self.Castbar:SetParent(self)
- if(ClassColor) then
- self.Castbar:SetStatusBarColor(playerColor.r, playerColor.g, playerColor.b)
- self.Castbar.Bg:SetVertexColor(playerColor.r*0.3, playerColor.g*0.3, playerColor.b*0.3, 0.8)
- end
- if(Safezone) then
- self.Castbar.SafeZone = self.Castbar:CreateTexture(nil, 'BORDER')
- self.Castbar.SafeZone:SetTexture('Interface\\Buttons\\WHITE8x8')
- self.Castbar.SafeZone:SetVertexColor(1, 0.5, 0, 1)
- end
- if(Latency) then
- self.Castbar.Latency = self:CreateFontString(nil, 'ARTWORK')
- self.Castbar.Latency:SetFont(font, 12, 'OUTLINE')
- self.Castbar.Latency:SetParent(self.Castbar)
- self.Castbar.Latency:SetDrawLayer('OVERLAY')
- self.Castbar.Latency:SetVertexColor(0.6, 0.6, 0.6)
- self.Castbar.Latency:SetAlpha(1)
- end
- self.Castbar.PostCastStart = UpdateCastStart
- self.Castbar.PostChannelStart = UpdateChannelStart
- end
- self.Castbar.CustomDelayText = function(self, duration)
- self.Time:SetFormattedText('(|cffff0000-%.1f|r) %.1f | %.1f', self.delay, duration, self.max)
- end
- self.Castbar.CustomTimeText = function(self, duration)
- self.Time:SetFormattedText('%.1f | %.1f', duration, self.max)
- end
- self.Castbar.Time = self:CreateFontString(nil, 'ARTWORK')
- self.Castbar.Time:SetFont(font, 13, 'THINOUTLINE')
- self.Castbar.Time:SetPoint('RIGHT', self.Castbar, 'RIGHT', -7, 0)
- self.Castbar.Time:SetHeight(25)
- self.Castbar.Time:SetParent(self.Castbar)
- self.Castbar.Time:SetJustifyH('RIGHT')
- self.Castbar.Text = self:CreateFontString(nil, 'ARTWORK')
- self.Castbar.Text:SetFont(font, 13, 'THINOUTLINE')
- self.Castbar.Text:SetPoint('LEFT', self.Castbar, 4, 0)
- self.Castbar.Text:SetPoint('RIGHT', self.Castbar.Time, 'LEFT', -7, 0)
- self.Castbar.Text:SetHeight(25)
- self.Castbar.Text:SetParent(self.Castbar)
- self.Castbar.Text:SetJustifyH('LEFT')
- if(unit == 'target') then -- Target Castbar
- self.Castbar:SetWidth(200)
- self.Castbar:SetHeight(26)
- self.Castbar:SetStatusBarColor(.25, .25, .25)
- self.Castbar:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 143, 94) -- here we move the target castbar
- if(TargetCastBarIcon) then
- self.Castbar.Icon = self.Castbar:CreateTexture(nil, 'ARTWORK')
- self.Castbar.Icon:SetHeight(39)
- self.Castbar.Icon:SetWidth(39)
- self.Castbar.Icon:SetPoint('RIGHT', 47, 4)
- self.IconOverlay = self.Castbar:CreateTexture(nil, 'OVERLAY')
- self.IconOverlay:SetPoint('TOPLEFT', self.Castbar.Icon, 'TOPLEFT')
- self.IconOverlay:SetPoint('BOTTOMRIGHT', self.Castbar.Icon, 'BOTTOMRIGHT')
- self.IconOverlay:SetTexture(border)
- self.IconOverlay:SetVertexColor(0.75, 0.75, 0.75, 1)
- self.Castbar.IconBg = self.Castbar:CreateTexture(nil, 'BACKGROUND')
- self.Castbar.IconBg:SetPoint('TOPLEFT',self.Castbar.Icon,'TOPLEFT',-5,5)
- self.Castbar.IconBg:SetPoint('BOTTOMRIGHT',self.Castbar.Icon,'BOTTOMRIGHT',5,-5)
- self.Castbar.IconBg:SetTexture(borderbg)
- self.Castbar.IconBg:SetVertexColor(0, 0, 0, 9)
- end
- end
- if(unit == 'focus') then -- Focus Castbar
- self.Castbar:SetWidth(260)
- self.Castbar:SetHeight(25)
- self.Castbar:SetScale(1.210)
- self.Castbar:SetStatusBarColor(.25, .25, .25)
- self.Castbar:SetPoint('CENTER', UIParent, 'CENTER', -10, -10) -- here we move focus castbar
- if(FocusCastBarIcon) then
- self.Castbar.Icon = self.Castbar:CreateTexture(nil, 'ARTWORK')
- self.Castbar.Icon:SetHeight(39)
- self.Castbar.Icon:SetWidth(39)
- self.Castbar.Icon:SetPoint('LEFT', -48, 3)
- self.IconOverlay = self.Castbar:CreateTexture(nil, 'OVERLAY')
- self.IconOverlay:SetPoint('TOPLEFT', self.Castbar.Icon, 'TOPLEFT')
- self.IconOverlay:SetPoint('BOTTOMRIGHT', self.Castbar.Icon, 'BOTTOMRIGHT')
- self.IconOverlay:SetTexture(border)
- self.IconOverlay:SetVertexColor(0.75, 0.75, 0.75, 1)
- self.Castbar.IconBg = self.Castbar:CreateTexture(nil, 'BACKGROUND')
- self.Castbar.IconBg:SetPoint('TOPLEFT',self.Castbar.Icon,'TOPLEFT',-5,5)
- self.Castbar.IconBg:SetPoint('BOTTOMRIGHT',self.Castbar.Icon,'BOTTOMRIGHT',5,-5)
- self.Castbar.IconBg:SetTexture(borderbg)
- self.Castbar.IconBg:SetVertexColor(0, 0, 0, 9)
- end
- end
- if(unit == 'pet') then -- Pet Castbar
- self.Castbar:SetHeight(22)
- self.Castbar:SetWidth(200)
- self.Castbar:SetStatusBarColor(.25, .25, .25)
- self.Castbar:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', -12, 56) -- here we move the pet castbar
- end
- end
- -- Interrupt Highlight, don't touch this IF you know what your doing.
- if(unit == 'target' or unit == 'focus') then
- if ((unit == 'target' and TargetShowInterruptHighlight) or (unit == 'focus' and FocusShowInterruptHighlight)) then
- self.Shadow = {}
- for i = 1, 8 do
- self.Shadow[i] = self.Castbar:CreateTexture(nil, 'BACKGROUND')
- self.Shadow[i]:SetParent(self.Castbar)
- self.Shadow[i]:SetTexture(borderbg)
- self.Shadow[i]:SetWidth(20)
- self.Shadow[i]:SetHeight(20)
- self.Shadow[i]:SetVertexColor(1, 0, 1)
- end
- self.Shadow[1]:SetTexCoord(0, 1/3, 0, 1/3)
- self.Shadow[1]:SetPoint('TOPLEFT', self.Castbar, -10, 10)
- self.Shadow[2]:SetTexCoord(2/3, 1, 0, 1/3)
- self.Shadow[2]:SetPoint('TOPRIGHT', self.Castbar, 10, 10)
- self.Shadow[3]:SetTexCoord(0, 1/3, 2/3, 1)
- self.Shadow[3]:SetPoint('BOTTOMLEFT', self.Castbar, -10, -10)
- self.Shadow[4]:SetTexCoord(2/3, 1, 2/3, 1)
- self.Shadow[4]:SetPoint('BOTTOMRIGHT', self.Castbar, 10, -10)
- self.Shadow[5]:SetTexCoord(1/3, 2/3, 0, 1/3)
- self.Shadow[5]:SetPoint('TOPLEFT', self.Shadow[1], 'TOPRIGHT')
- self.Shadow[5]:SetPoint('TOPRIGHT', self.Shadow[2], 'TOPLEFT')
- self.Shadow[6]:SetTexCoord(1/3, 2/3, 2/3, 1)
- self.Shadow[6]:SetPoint('BOTTOMLEFT', self.Shadow[3], 'BOTTOMRIGHT')
- self.Shadow[6]:SetPoint('BOTTOMRIGHT', self.Shadow[4], 'BOTTOMLEFT')
- self.Shadow[7]:SetTexCoord(0, 1/3, 1/3, 2/3)
- self.Shadow[7]:SetPoint('TOPLEFT', self.Shadow[1], 'BOTTOMLEFT')
- self.Shadow[7]:SetPoint('BOTTOMLEFT', self.Shadow[3], 'TOPLEFT')
- self.Shadow[8]:SetTexCoord(2/3, 1, 1/3, 2/3)
- self.Shadow[8]:SetPoint('TOPRIGHT', self.Shadow[2], 'BOTTOMRIGHT')
- self.Shadow[8]:SetPoint('BOTTOMRIGHT', self.Shadow[4], 'TOPRIGHT')
- self.hasShadow = true
- else
- self.hasShadow = false
- end
- local interruptFrame = CreateFrame('Frame')
- interruptFrame:RegisterEvent('UNIT_SPELLCAST_START')
- interruptFrame:RegisterEvent('UNIT_SPELLCAST_DELAYED')
- interruptFrame:RegisterEvent('UNIT_SPELLCAST_CHANNEL_START')
- interruptFrame:RegisterEvent('UNIT_SPELLCAST_CHANNEL_UPDATE')
- interruptFrame:RegisterEvent('PLAYER_TARGET_CHANGED')
- interruptFrame:RegisterEvent('PLAYER_FOCUS_CHANGED')
- interruptFrame:SetScript('OnEvent', function()
- local name, _, _, _, _, _, _, _, interrupt = UnitCastingInfo(unit)
- if (self.hasShadow) then
- for i = 1, 8 do
- self.Shadow[i]:Hide()
- end
- end
- if (name) then
- if (interrupt) then
- self.Castbar:SetStatusBarColor(.25, .25, .25)
- self.Castbar.Bg:SetVertexColor(1, 0, 1)
- if (self.hasShadow) then
- for i = 1, 8 do
- self.Shadow[i]:Show()
- end
- end
- else
- self.Castbar:SetStatusBarColor(.25, .25, .25)
- self.Castbar.Bg:SetVertexColor(0, 0, 0, 0.6)
- if (self.hasShadow) then
- for i = 1, 8 do
- self.Shadow[i]:Hide()
- end
- end
- end
- end
- end)
- end
- end
- for _, bar in pairs({
- 'MirrorTimer1',
- 'MirrorTimer2',
- 'MirrorTimer3',
- }) do
- for i, region in pairs({_G[bar]:GetRegions()}) do
- if (region.GetTexture and region:GetTexture() == 'SolidTexture') then
- region:Hide()
- end
- end
- CreateBorder(_G[bar], 12, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- _G[bar..'Border']:Hide()
- _G[bar]:SetParent(UIParent)
- _G[bar]:SetScale(1)
- _G[bar]:SetHeight(27)
- _G[bar]:SetWidth(320)
- _G[bar..'Background'] = _G[bar]:CreateTexture(bar..'Background', 'BACKGROUND', _G[bar])
- _G[bar..'Background']:SetTexture('Interface\\Buttons\\WHITE8x8')
- _G[bar..'Background']:SetAllPoints(bar)
- _G[bar..'Background']:SetVertexColor(0, 0, 0, 0.5)
- _G[bar..'Text']:SetFont(font, 14, 'THINOUTLINE')
- _G[bar..'Text']:ClearAllPoints()
- _G[bar..'Text']:SetPoint('CENTER', MirrorTimer1StatusBar, 0, 1)
- _G[bar..'StatusBar']:SetAllPoints(_G[bar])
- end
- self.RaidIcon = health:CreateTexture(nil, 'OVERLAY')
- self.RaidIcon:SetHeight(25)
- self.RaidIcon:SetWidth(25)
- self.RaidIcon:SetPoint('CENTER', self, 'TOP', 0, 5)
- if(PvPIcon) then
- local PvPIcon = self:CreateTexture('$parentPVPIcon', 'OVERLAY')
- PvPIcon:SetHeight(33)
- PvPIcon:SetWidth(33)
- PvPIcon:SetPoint('BOTTOMRIGHT', health, 'TOPRIGHT', 21, -33)
- self.PvP = PvPIcon
- if(unit == 'target') then
- PvPIcon:SetPoint('BOTTOMRIGHT', self, 'TOPRIGHT', 111, -50)
- end
- if(unit == 'player') then
- PvPIcon:SetPoint('BOTTOMRIGHT', self, 'TOPRIGHT', 0, 0)
- else
- PvPIcon:SetPoint('BOTTOMRIGHT', health, 'TOPRIGHT', 21, -33)
- end
- self.PvPTimer = self.Health:CreateFontString('$parentPVPTimer', 'OVERLAY')
- self.PvPTimer:SetFont(font, 12, 'THINOUTLINE')
- self.PvPTimer:SetPoint('BOTTOM', self.PvP, 'TOP', -12, 0)
- self.LastUpdate = 0
- self:HookScript('OnUpdate', function(self, elapsed)
- local time = nil
- if (IsPVPTimerRunning()) then
- time = GetPVPTimer()
- end
- if (time) then
- time = time - elapsed * 1000
- local timeLeft = time
- if (timeLeft < 0) then
- self.PvPTimer:SetText('')
- end
- self.PvPTimer:SetFormattedText(SecondsToTimeAbbrev(floor(timeLeft/1000)))
- else
- self.PvPTimer:SetText('')
- end
- end)
- end
- if(unit == 'party') then
- local PhaseIcon = health:CreateTexture(nil, 'OVERLAY')
- PhaseIcon:SetSize(15, 15)
- PhaseIcon:SetPoint('RIGHT', self, 22, 0)
- self.PhaseIcon = PhaseIcon
- end
- if(unit == 'player' or unit == 'party') then
- local LeaderIcon = health:CreateTexture('$parentLeaderIcon', 'OVERLAY')
- LeaderIcon:SetHeight(15)
- LeaderIcon:SetWidth(15)
- LeaderIcon:SetPoint('BOTTOMLEFT', health, 'TOPLEFT', -5, -2)
- self.Leader = LeaderIcon
- local MasterLooterIcon = health:CreateTexture('$parentMasterLooterIcon', 'OVERLAY')
- MasterLooterIcon:SetHeight(12)
- MasterLooterIcon:SetWidth(12)
- MasterLooterIcon:SetPoint('BOTTOMLEFT', health, 'TOPLEFT', 12, 0)
- self.MasterLooter = MasterLooterIcon
- end
- if(unit == 'player' or unit == 'target') then
- local ComboPoints = self:CreateFontString(nil, 'OVERLAY')
- ComboPoints:SetFont(font, 26, 'THINOUTLINE')
- ComboPoints:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- ComboPoints:SetPoint('CENTER', self, 'RIGHT', -5, 32)
- ComboPoints:SetJustifyH('RIGHT')
- self:Tag(ComboPoints, '[cpoints]')
- end
- if(unit == 'player') then
- local CombatIcon = health:CreateTexture('$parentCombatIcon', 'OVERLAY')
- CombatIcon:SetSize(25, 25)
- CombatIcon:SetPoint('CENTER', health, -3, 0)
- self.Combat = CombatIcon
- local RestingIcon = health:CreateTexture(nil, 'OVERLAY')
- RestingIcon:SetSize(20, 20)
- RestingIcon:SetPoint('CENTER', health, -25, 2)
- self.Resting = RestingIcon
- end
- if(Portraits) then
- local Portrait = CreateFrame('PlayerModel', nil, self)
- Portrait:SetBackdrop(backdrop)
- Portrait:SetBackdropColor(0, 0, 0, 0.9)
- Portrait:SetWidth(27*3)
- Portrait:SetHeight(27*2)
- CreateBorder(Portrait, 12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)
- if(unit == 'player' or unit == 'focus' or unit == 'pet' or unit == 'party' or unit and unit:find('boss%d')) then
- Portrait:SetPoint('BOTTOMLEFT', self, 'BOTTOMLEFT', -92, -26)
- end
- if(unit == 'target') then
- Portrait:SetPoint('BOTTOMLEFT', self, 'BOTTOMRIGHT', 11, -26)
- end
- self.Portrait = Portrait
- end
- if unit then
- self.Name = health:CreateFontString(nil, 'OVERLAY')
- self.Name:SetFont(font, 15, 'THINOUTLINE')
- -- Boss + Player Name Hidden.
- if(unit == 'player' or unit and unit:find('boss%d')) then
- self.Name:Hide()
- end
- -- Target Name, Tags.
- if(unit == 'target')then
- self.Name:SetPoint('LEFT', health, 'LEFT', -5, 26)
- self:Tag(self.Name,'[difficulty][level][shortclassification] [raidcolor][AfterName]')
- end
- -- Target of Target, Focus, Pet, Focus Target and, Party Names, Tags.
- if(unit == 'targettarget' or unit == 'focus' or unit == 'pet' or unit =='focustarget' or unit == 'party') then
- self.Name:SetPoint('CENTER')
- self:Tag(self.Name, '[raidcolor][AfterShortName] [happiness]')
- end
- end
- if(Buffs) then
- -- Buffs Configure --
- local Buffs = CreateFrame('Frame', nil, self)
- Buffs:SetHeight(270)
- Buffs:SetWidth(270)
- Buffs.size = 28
- Buffs.spacing = 3
- Buffs.PostCreateIcon = auraIcon
- -- Player Buffs --
- if(unit == 'player') then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 0
- end
- -- Target Buffs --
- if(unit == 'target') then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 9
- end
- -- Target Of Target Buffs --
- if(unit == 'targettarget') then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 0
- end
- -- Party And Boss Buffs --
- if(unit == 'party' or unit and unit:find('boss%d')) then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 5
- end
- -- Pet Buffs --
- if(unit == 'pet') then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 6
- end
- -- Focus Buffs --
- if(unit == 'focus') then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 6
- end
- -- FocusTarget Buffs --
- if(unit == 'focustarget') then
- Buffs.initialAnchor = 'TOPLEFT'
- Buffs['growth-y'] = 'RIGHT'
- Buffs['growth-x'] = 'DOWN'
- Buffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', -3, -8)
- Buffs.num = 0
- end
- self.Buffs = Buffs
- end
- if(Debuffs) then
- -- Debuffs Configure --
- local Debuffs = CreateFrame('Frame', nil, self)
- Debuffs:SetHeight(270)
- Debuffs:SetWidth(270)
- Debuffs.size = 32
- Debuffs.spacing = 3
- Debuffs.PostCreateIcon = auraIcon
- -- Player Debuffs --
- if(unit == 'player') then
- Debuffs:SetPoint('LEFT', self, 'RIGHT', 20, 5)
- Debuffs['growth-x'] = 'RIGHT'
- Debuffs.initialAnchor = 'LEFT'
- Debuffs.num = 0
- Debuffs.onlyShowPlayer = false
- end
- -- Target Debuffs --
- if(unit == 'target') then
- Debuffs:SetPoint('BOTTOMLEFT', self, 'TOPLEFT', -3, 28)
- Debuffs['growth-y'] = 'UP'
- Debuffs.initialAnchor = 'BOTTOMLEFT'
- Debuffs.num = 7
- Debuffs.onlyShowPlayer = true
- end
- -- Target Of Target Debuffs --
- if(unit == 'targettarget') then
- Debuffs:SetPoint('LEFT', self, 'RIGHT', 20, 5)
- Debuffs['growth-x'] = 'RIGHT'
- Debuffs.initialAnchor = 'LEFT'
- Debuffs.num = 0
- Debuffs.onlyShowPlayer = false
- end
- -- Party Debuffs --
- if(unit == 'party') then
- Debuffs:SetPoint('LEFT', self, 'RIGHT', 8, 0)
- Debuffs['growth-x'] = 'RIGHT'
- Debuffs.initialAnchor = 'LEFT'
- Debuffs.num = 5
- Debuffs.onlyShowPlayer = false
- end
- -- Pet Debuffs --
- if(unit == 'pet') then
- Debuffs:SetPoint('LEFT', self, 'RIGHT', 8, 0)
- Debuffs['growth-x'] = 'RIGHT'
- Debuffs.initialAnchor = 'LEFT'
- Debuffs.num = 5
- Debuffs.onlyShowPlayer = false
- end
- -- Focus Debuffs --
- if(unit == 'focus') then
- Debuffs:SetPoint('LEFT', self, 'RIGHT', 8, 0)
- Debuffs['growth-x'] = 'RIGHT'
- Debuffs.initialAnchor = 'LEFT'
- Debuffs.num = 5
- Debuffs.onlyShowPlayer = false
- end
- -- Focus Target Debuffs --
- if(unit == 'focustarget') then
- Debuffs:SetPoint('LEFT', self, 'RIGHT', 8, 0)
- Debuffs['growth-x'] = 'RIGHT'
- Debuffs.initialAnchor = 'LEFT'
- Debuffs.num = 5
- Debuffs.onlyShowPlayer = true
- end
- self.Debuffs = Debuffs
- end
- if(unit == 'player') then
- if IsAddOnLoaded('oUF_Swing') then
- self.Swing = CreateFrame('StatusBar', nil, self)
- self.Swing:SetPoint('TOP', self, 'BOTTOM', 335, -68)
- self.Swing:SetStatusBarTexture(texture)
- self.Swing:SetStatusBarColor(playerColor.r, playerColor.g, playerColor.b)
- self.Swing:SetHeight(15)
- self.Swing:SetWidth(270)
- self.Swing:SetBackdrop(backdrop)
- self.Swing:SetBackdropColor(0, 0, 0)
- self.Swing.disableMelee = false
- self.Swing.disableRanged = false
- CreateBorder(self.Swing, 12, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.Swing.Text = self.Swing:CreateFontString(nil, 'OVERLAY')
- self.Swing.Text:SetFont(font, 24, 'THINOUTLINE')
- self.Swing.Text:SetPoint('CENTER', self.Swing)
- self.Swing.bg = self.Swing:CreateTexture(nil, 'BORDER')
- self.Swing.bg:SetAllPoints(self.Swing)
- self.Swing.bg:SetTexture(0, 0, 0, 0.1)
- end
- if IsAddOnLoaded('oUF_Experience') then
- self.Experience = CreateFrame('StatusBar', nil, self)
- self.Experience:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, 52)
- self.Experience:SetStatusBarTexture(texture)
- self.Experience:SetStatusBarColor(0,.7,1)
- self.Experience:SetHeight(15)
- self.Experience:SetWidth(235)
- self.Experience:SetBackdrop(backdrop)
- self.Experience:SetBackdropColor(0, 0, 0, .5)
- self.Experience.Tooltip = true
- CreateBorder(self.Experience, 12, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.Experience.Text = self.Experience:CreateFontString(nil, 'OVERLAY')
- self.Experience.Text:SetFont(font, 15, 'THINOUTLINE')
- self.Experience.Text:SetPoint('CENTER', self.Experience)
- self.Experience.bg = self.Experience:CreateTexture(nil, 'BORDER')
- self.Experience.bg:SetAllPoints(self.Experience)
- self.Experience.bg:SetTexture(0, 0, 0, .5)
- end
- if IsAddOnLoaded('oUF_TotemBar') and class == 'SHAMAN' then
- self.TotemBar = {}
- self.TotemBar.Destroy = true
- for i = 1, 4 do
- self.TotemBar[i] = CreateFrame('StatusBar', nil, self)
- self.TotemBar[i]:SetHeight(12)
- self.TotemBar[i]:SetWidth(265/4 - 5)
- if (i == 1) then
- self.TotemBar[i]:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', -1, -9)
- else
- self.TotemBar[i]:SetPoint('RIGHT', self.TotemBar[i-1], 'LEFT', -8, 0)
- end
- CreateBorder(self.TotemBar[i], 12, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.TotemBar[i]:SetStatusBarTexture(texture)
- self.TotemBar[i]:SetBackdrop(backdrop)
- self.TotemBar[i]:SetBackdropColor(0,0,0,6)
- self.TotemBar[i]:SetMinMaxValues(0, 1)
- self.TotemBar[i].bg = self.TotemBar[i]:CreateTexture(nil, 'BORDER')
- self.TotemBar[i].bg:SetAllPoints(self.TotemBar[i])
- self.TotemBar[i].bg:SetTexture(texture)
- self.TotemBar[i].bg.multiplier = 0.3
- end
- end
- if (class == 'DEATHKNIGHT') then
- self.Runes = CreateFrame('Frame', nil, self)
- for i = 1, 6 do
- self.Runes[i] = CreateFrame('StatusBar', self:GetName()..'_Runes'..i, self)
- self.Runes[i]:SetHeight(10)
- self.Runes[i]:SetWidth(250/6 - 0.85)
- if(i == 1) then
- self.Runes[i]:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -8)
- else
- self.Runes[i]:SetPoint('TOPLEFT', self.Runes[i-1], 'TOPRIGHT', 5, 0)
- end
- CreateBorder(self.Runes[i], 11, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.Runes[i]:SetStatusBarTexture(texture)
- self.Runes[i]:SetBackdrop(backdrop)
- self.Runes[i]:SetBackdropColor(0, 0, 0)
- self.Runes[i]:SetMinMaxValues(0, 1)
- self.Runes[i].bg = self.Runes[i]:CreateTexture(nil, 'BORDER')
- self.Runes[i].bg:SetAllPoints(self.Runes[i])
- self.Runes[i].bg:SetTexture(0.1, 0.1, 0.1)
- self.Runes[i].bg.multiplier = 0.2
- RuneFrame:Hide()
- end
- end
- if(class == 'DRUID') then
- local EclipseBar = CreateFrame('Frame', nil, self)
- EclipseBar:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -10)
- EclipseBar:SetWidth(270)
- EclipseBar:SetHeight(13)
- EclipseBar:SetBackdrop(backdrop)
- EclipseBar:SetBackdropColor(0, 0, 0, 0.8)
- CreateBorder(EclipseBar, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4)
- self.EclipseBar = EclipseBar
- local LunarBar = CreateFrame('StatusBar', nil, EclipseBar)
- LunarBar:SetPoint('LEFT', EclipseBar, 'LEFT', 0, 0)
- LunarBar:SetWidth(270)
- LunarBar:SetHeight(13)
- LunarBar:SetStatusBarTexture(texture)
- LunarBar:SetStatusBarColor(0.36, 0.45, 0.88)
- EclipseBar.LunarBar = LunarBar
- local SolarBar = CreateFrame('StatusBar', nil, EclipseBar)
- SolarBar:SetPoint('LEFT', LunarBar:GetStatusBarTexture(), 'RIGHT', 0, 0)
- SolarBar:SetWidth(270)
- SolarBar:SetHeight(13)
- SolarBar:SetStatusBarTexture(texture)
- SolarBar:SetStatusBarColor(0.85, 0.83, 0.1)
- EclipseBar.SolarBar = SolarBar
- local EclipseBarText = SolarBar:CreateFontString(nil, 'OVERLAY')
- EclipseBarText:SetPoint('CENTER', EclipseBar, 'CENTER', 0, 0)
- EclipseBarText:SetFont(font, 15, 'THINOUTLINE')
- self:Tag(EclipseBarText, '[pereclipse]%')
- end
- -- Here are some awsome tags.. ;)
- if(class == 'HUNTER') then
- local LockAndLoad = self:CreateFontString(nil, 'OVERLAY')
- LockAndLoad:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- LockAndLoad:SetFont(font, 25, 'THINOUTLINE')
- LockAndLoad:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- LockAndLoad:SetJustifyH('CENTER')
- self:Tag(LockAndLoad, '[Aftermathh:LockAndLoad]')
- end
- if(class == 'WARRIOR') then
- local ThunderStruck = self:CreateFontString(nil, 'OVERLAY')
- ThunderStruck:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- ThunderStruck:SetFont(font, 25, 'THINOUTLINE')
- ThunderStruck:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- ThunderStruck:SetJustifyH('CENTER')
- self:Tag(ThunderStruck, '[Aftermathh:ThunderStruck]')
- end
- if(class == 'PRIEST') then
- local ShadowOrbs = self:CreateFontString(nil, 'OVERLAY')
- ShadowOrbs:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- ShadowOrbs:SetFont(font, 25, 'THINOUTLINE')
- ShadowOrbs:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- ShadowOrbs:SetJustifyH('CENTER')
- self:Tag(ShadowOrbs, '[Aftermathh:ShadowOrbs]')
- local Evangelism = self:CreateFontString(nil, 'OVERLAY')
- Evangelism:SetPoint('CENTER', self, 'RIGHT', 15, -2)
- Evangelism:SetFont(font, 22, 'THINOUTLINE')
- Evangelism:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- Evangelism:SetJustifyH('CENTER')
- self:Tag(Evangelism, '[Aftermathh:Evangelism]')
- end
- if(class == 'SHAMAN') then
- local WaterShield = self:CreateFontString(nil, 'OVERLAY')
- WaterShield:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- WaterShield:SetFont(font, 25, 'THINOUTLINE')
- WaterShield:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- self:Tag(WaterShield, '[Aftermathh:WaterShield]')
- local LightingShield = self:CreateFontString(nil, 'OVERLAY')
- LightingShield:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- LightingShield:SetFont(font, 25, 'THINOUTLINE')
- LightingShield:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- LightingShield:SetJustifyH('CENTER')
- self:Tag(LightingShield, '[Aftermathh:LightningShield]')
- local Maelstorm = self:CreateFontString(nil, 'OVERLAY')
- Maelstorm:SetPoint('CENTER', self, 'RIGHT', 15, -2)
- Maelstorm:SetFont(font, 22, 'THINOUTLINE')
- Maelstorm:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- Maelstorm:SetJustifyH('CENTER')
- self:Tag(Maelstorm, '[Aftermathh:Maelstorm]')
- local TidalWaves = self:CreateFontString(nil, 'OVERLAY')
- TidalWaves:SetPoint('CENTER', self, 'RIGHT', 15, -2)
- TidalWaves:SetFont(font, 22, 'THINOUTLINE')
- TidalWaves:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- TidalWaves:SetJustifyH('CENTER')
- self:Tag(TidalWaves, '[Aftermathh:TidalWaves]')
- end
- if(class == 'WARLOCK') then
- local Shards = self:CreateFontString(nil, 'OVERLAY')
- Shards:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- Shards:SetFont(font, 25, 'THINOUTLINE')
- Shards:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- Shards:SetJustifyH('CENTER')
- self:Tag(Shards, '[Aftermathh:Shards]')
- end
- if(class == 'PALADIN') then
- local HolyPower = self:CreateFontString(nil, 'OVERLAY')
- HolyPower:SetPoint('CENTER', self, 'RIGHT', -5, 31)
- HolyPower:SetFont(font, 25, 'THINOUTLINE')
- HolyPower:SetTextColor(playerColor.r, playerColor.g, playerColor.b)
- HolyPower:SetJustifyH('CENTER')
- self:Tag(HolyPower, '[Aftermathh:HolyPower]')
- end
- end
- return self
- end
- local function menu(self)
- if(self.unit:match('party' or 'raid')) then
- ToggleDropDownMenu(1, nil, _G['PartyMemberFrame'..self.id..'DropDown'], 'cursor')
- else
- FriendsDropDown.unit = self.unit
- FriendsDropDown.id = self.id
- FriendsDropDown.initialize = RaidFrameDropDown_Initialize
- ToggleDropDownMenu(1, nil, FriendsDropDown, 'cursor')
- end
- end
- local function UpdateThreat(self, _, unit)
- if (self.unit ~= unit) then
- return
- end
- if (self.Aggro) then
- local threat = UnitThreatSituation(self.unit)
- if (threat == 3) then
- self.Aggro:SetText('|cFFFF0000AGGRO')
- self.Health:SetBackdropColor(0.9, 0, 0)
- else
- self.Aggro:SetText('')
- self.Health:SetBackdropColor(0, 0, 0)
- end
- end
- end
- local function RaidFrames(self, unit)
- self.menu = menu
- self:RegisterForClicks('AnyDown')
- self:SetScript('OnEnter', UnitFrame_OnEnter)
- self:SetScript('OnLeave', UnitFrame_OnLeave)
- self:SetAttribute('*type2', 'menu')
- CreateBorder(self, 11, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4)
- self:SetBackdrop({bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=], insets = {top = -1.5, left = -1.5, bottom = -1.5, right = -1.5}})
- self:SetBackdropColor(0, 0, 0, 0.8)
- self.DebuffHighlightBackdrop = true
- self.DebuffHighlightFilter = true
- self.Health = CreateFrame('StatusBar', nil, self)
- self.Health:SetStatusBarTexture(texture)
- self.Health:SetParent(self)
- self.Health:SetAllPoints(self)
- self.Health.Smooth = true
- self.Health.colorClass = true
- self.Health:SetOrientation('HORIZONTAL')
- self.Health:SetOrientation('VERTICAL')
- self.Health.bg = self.Health:CreateTexture(nil, 'BORDER')
- self.Health.bg:SetAllPoints(self.Health)
- self.Health.bg:SetTexture(texture)
- self.Health.bg:SetAlpha(0.4)
- self.Name = self.Health:CreateFontString(nil, 'OVERLAY')
- self.Name:SetPoint('TOP', 0, -12)
- self.Name:SetFont(font, 11, 'THINOUTLINE')
- self:Tag(self.Name, '|cffffffff[AfterRaidName]|r')
- self.MasterLooter = self.Health:CreateTexture('$parentMasterLooterIcon', 'OVERLAY', self)
- self.MasterLooter:SetHeight(12)
- self.MasterLooter:SetWidth(12)
- self.MasterLooter:SetPoint('RIGHT', self.Health, 'TOPRIGHT', 2, 2)
- self.Leader = self.Health:CreateTexture('$parentLeaderIcon', 'OVERLAY', self)
- self.Leader:SetHeight(14)
- self.Leader:SetWidth(14)
- self.Leader:SetPoint('LEFT', self.Health, 'TOPLEFT', -5, 2)
- self.RaidIcon = self.Health:CreateTexture(nil, 'OVERLAY')
- self.RaidIcon:SetHeight(17)
- self.RaidIcon:SetWidth(17)
- self.RaidIcon:SetPoint('CENTER', self, 'TOP')
- self.RaidIcon:SetTexture('Interface\\TargetingFrame\\UI-RaidTargetingIcons')
- self.ReadyCheck = self.Health:CreateTexture(nil, 'OVERLAY')
- self.ReadyCheck:SetPoint('TOPRIGHT', self.Health, -7, -7)
- self.ReadyCheck:SetPoint('BOTTOMLEFT', self.Health, 7, 7)
- self.ReadyCheck.delayTime = 4
- self.ReadyCheck.fadeTime = 1
- self.Aggro = self.Health:CreateFontString(nil, 'OVERLAY')
- self.Aggro:SetPoint('CENTER', self.Health, 'BOTTOM')
- self.Aggro:SetFont(font, 11, 'THINOUTLINE')
- table.insert(self.__elements, UpdateThreat)
- self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateThreat)
- self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', UpdateThreat)
- self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', UpdateThreat)
- self.Range = {
- insideAlpha = 1,
- outsideAlpha = 0.3,
- }
- self.SpellRange = {
- insideAlpha = 1,
- outsideAlpha = 0.3,
- }
- return self
- end
- CompactRaidFrameManager:UnregisterAllEvents()
- CompactRaidFrameManager:Hide()
- CompactRaidFrameContainer:UnregisterAllEvents()
- CompactRaidFrameContainer:Hide()
- CompactRaidFrameContainer:Hide()
- oUF:RegisterStyle('AftermathhRaid', RaidFrames)
- oUF:Factory(function(self)
- oUF:SetActiveStyle'AftermathhRaid'
- local Raid = self:SpawnHeader(nil, 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:SetHeight(38)
- self:SetWidth(42)
- self:SetScale(1)
- ]]
- )
- Raid:SetPoint('TOPLEFT', UIParent, 10, -9)
- end)
- oUF:RegisterStyle('Aftermathh', Shared)
- oUF:Factory(function(self)
- oUF:SetActiveStyle'Aftermathh'
- self:Spawn'Player':SetPoint('BOTTOMLEFT', UIParent, 196, 186)
- self:Spawn'Target':SetPoint('BOTTOMRIGHT', UIParent, -226, 186)
- self:Spawn'Targettarget':SetPoint('RIGHT', UIParent, -64, -188)
- self:Spawn'Pet':SetPoint('LEFT', UIParent, 105, -156)
- self:Spawn'Focus':SetPoint('LEFT', UIParent, 108, -45)
- --self:Spawn'Focustarget':SetPoint('LEFT', UIParent, 17, -3)
- local Party = self:SpawnHeader(nil, nil, 'party',
- 'showParty', true,
- 'showPlayer', false,
- 'xoffset', 25,
- 'yOffset', -50,
- 'oUF-initialConfigFunction', [[
- self:SetHeight(27)
- self:SetWidth(150)
- self:SetScale(0.95)
- ]]
- )
- Party:SetPoint('TOPLEFT', UIParent, 92, -12)
- if(BossFrame) then
- local boss = {}
- for i = 1, MAX_BOSS_FRAMES do
- boss[i] = oUF:Spawn('boss'..i, 'oUF_BossAftermathh'..i)
- if i == 1 then
- boss[i]:SetPoint('TOPRIGHT', UIParent, -16, -490)
- else
- boss[i]:SetPoint('BOTTOM', boss[i-1], 'TOP', 0, 55)
- end
- boss[i]:SetSize(150, 27)
- boss[i]:SetScale(0.95)
- end
- end
- end)
- SlashCmdList['TESTBOSS'] = function()
- oUF_BossAftermathh1:Show(); oUF_BossAftermathh1.Hide = function() end oUF_BossAftermathh1.unit = 'player'
- oUF_BossAftermathh2:Show(); oUF_BossAftermathh2.Hide = function() end oUF_BossAftermathh2.unit = 'player'
- oUF_BossAftermathh3:Show(); oUF_BossAftermathh3.Hide = function() end oUF_BossAftermathh3.unit = 'player'
- oUF_BossAftermathh4:Show(); oUF_BossAftermathh4.Hide = function() end oUF_BossAftermathh4.unit = 'player'
- end
- SLASH_TESTBOSS1 = '/testboss'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement