Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local _, class = UnitClass('player')
- local texture = "Interface\\AddOns\\oUF_Aftermathh\\media\\Cabaret"
- local border = "Interface\\AddOns\\oUF_Aftermathh\\media\\border"
- local font = "Interface\\AddOns\\oUF_Aftermathh\\media\\font.ttf"
- local fontsize = 15
- local height, width = 27, 270
- local buffsize = 26
- local CBSafezone = true
- local CBLatency = true
- local castBars = true
- local castsafeZone = true
- local playerOnlyDebuffs = true
- RuneFrame:Hide()
- local backdrop = {
- bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=],
- insets = {top = -1, left = -1, bottom = -1, right = -1},
- }
- 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
- -- Icon
- local updateRIcon = function(self, event)
- local index = GetRaidTargetIndex(self.unit)
- if(index) then
- self.RIcon:SetText(ICON_LIST[index].."22|t")
- else
- self.RIcon:SetText()
- end
- end
- oUF.TagEvents['AfterRaidName'] = 'UNIT_NAME_UPDATE'
- oUF.Tags['AfterRaidName'] = function(unit)
- local Name = string.sub(UnitName(unit), 1, 4)
- return Name
- end
- -- Health And Mana Value
- 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
- -- Health Function
- 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|cffffffff%%|r)'):format(ShortenValue(min), min / max * 100)
- elseif(unit == 'player' and min ~= max) then
- return ('|cffffffff%d|r %d|cffffffff%%|r'):format(min - max, min / max * 100)
- elseif(min ~= max) then
- return ('%s |cffffffff/|r %s'):format(ShortenValue(min), ShortenValue(max))
- else
- return max
- end
- end
- oUF.TagEvents["Afterhealth"] = "UNIT_HEALTH UNIT_MAXHEALTH"
- -- Powerz!
- oUF.Tags['Afterpower'] = function(unit)
- local power = UnitPower(unit)
- if(power > 0 and not UnitIsDeadOrGhost(unit)) then
- return power
- end
- end
- oUF.TagEvents['Afterpower'] = oUF.TagEvents.missingpp
- -- Druid Power
- local function UpdateDruidPower(self)
- local bar = self.DruidPower
- local num, str = UnitPowerType('player')
- local min = UnitPower('player', (num ~= 0) and 0 or 3)
- local max = UnitPowerMax('player', (num ~= 0) and 0 or 3)
- bar:SetMinMaxValues(0, max)
- if(min ~= max) then
- bar:SetValue(min)
- bar:SetAlpha(1)
- if(num ~= 0) then
- bar:SetStatusBarColor(unpack(colors.power['MANA']))
- bar.Text:SetFormattedText('%d - %d%%', min, math.floor(min / max * 100))
- else
- bar:SetStatusBarColor(unpack(colors.power['ENERGY']))
- bar.Text:SetText()
- end
- else
- bar:SetAlpha(0)
- bar.Text:SetText()
- end
- end
- -- Aura
- local auraIcon = function(icons, button)
- button.icon:SetTexCoord(0.03, 0.97, 0.03, 0.97)
- icons.showDebuffType = false
- button.cd.noCooldownCount = false
- 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.35, 0.35, 0.35, 1) end
- 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('Interface\\Add0ns\\oUF_Aftermathh\\media\\ohy.tff', 16, 'OUTLINE')
- button.count:ClearAllPoints()
- button.count:SetPoint('BOTTOMRIGHT', 1, 1)
- if (not button.background) then
- 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('Interface\\AddOns\\oUF_Aftermathh\\media\\borderBackground')
- button.background:SetVertexColor(0, 0, 0, 1)
- end
- end
- -- custom channeling function
- local function UpdateChannelStart(self, event, unit, name, rank, text)
- if (self.Castbar.Latency) then
- self.Castbar.Latency:ClearAllPoints()
- self.Castbar.Latency:SetPoint('LEFT', self.Castbar, 'BOTTOMLEFT', 1, -1)
- local _, _, ms = GetNetStats()
- self.Castbar.Latency:SetText(ms..'ms')
- end
- if (self.Castbar.SafeZone) then
- self.Castbar.SafeZone:SetDrawLayer('ARTWORK')
- self.Castbar.SafeZone:SetPoint('TOPLEFT', self.Castbar)
- self.Castbar.SafeZone:SetPoint('BOTTOMLEFT', self.Castbar)
- end
- end
- -- custom casting function
- local function UpdateCastStart(self, event, unit, name, rank, text, castid)
- if (self.Castbar.Latency and unit == 'player') then
- self.Castbar.Latency:ClearAllPoints()
- self.Castbar.Latency:SetPoint('RIGHT', self.Castbar, 'BOTTOMRIGHT', -1, -1)
- local _, _, ms = GetNetStats()
- self.Castbar.Latency:SetText(ms..'ms')
- end
- if (self.Castbar.SafeZone) then
- self.Castbar.SafeZone:SetDrawLayer('BORDER')
- self.Castbar.SafeZone:SetPoint('TOPRIGHT', self.Castbar)
- self.Castbar.SafeZone:SetPoint('BOTTOMRIGHT', self.Castbar)
- end
- end
- -- Style
- local func = function(self, unit)
- self.colors = colors
- self.menu = menu
- self.ignoreHealComm = true
- self:EnableMouse(true)
- self:SetScript("OnEnter", UnitFrame_OnEnter)
- self:SetScript("OnLeave", UnitFrame_OnLeave)
- self:RegisterForClicks"anyup"
- self:SetAttribute("*type2", "menu")
- CreateBorder(self, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4)
- -- Health
- local hp = CreateFrame"StatusBar"
- if(unit == 'targettarget')then
- hp:SetHeight(height*.85)
- else
- hp:SetHeight(height*.85)
- end
- hp:SetStatusBarTexture(texture)
- -- Smooth
- hp.Smooth = true
- hp:SetStatusBarColor(.25, .25, .25)
- hp.frequentUpdates = true
- hp:SetParent(self)
- hp:SetPoint"TOP"
- hp:SetPoint"LEFT"
- hp:SetPoint"RIGHT"
- local hpbg = hp:CreateTexture(nil, "BORDER")
- hpbg:SetAllPoints(hp)
- hpbg:SetTexture(0, 0, 0, 0.9)
- self:SetBackdrop(backdrop)
- self:SetBackdropColor(0, 0, 0, 0.9)
- local hpp = hp:CreateFontString(nil, "OVERLAY")
- hpp:SetFont(font, fontsize, 'OUTLINE')
- hpp:SetPoint("RIGHT",hp, -2, 0)
- self:Tag(hpp, '[raidcolor][Afterhealth]')
- if unit == "player" then
- hpp:SetPoint("RIGHT",hp, -2, 0)
- elseif unit == "target" then
- hpp:SetPoint("RIGHT",hp, -2, 0)
- elseif unit == "focus" or unit == "pet" or unit == "targettarget" then
- hpp:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", 500000000, -500000000)
- end
- hp.bg = hpbg
- hp.value = hpp
- self.Health = hp
- self.OverrideUpdateHealth = updateHealth
- -- Power
- if not(unit == 'targettarget') then
- local pp = CreateFrame"StatusBar"
- pp:SetHeight(height*.11)
- pp:SetStatusBarTexture(texture)
- pp.frequentUpdates = true
- pp.colorTapping = true
- pp.colorHappiness = true
- pp.colorClass = true
- pp.colorReaction = true
- -- Smooth
- pp.Smooth = true
- pp:SetParent(self)
- pp:SetPoint("BOTTOM")
- pp:SetPoint("LEFT", .2, 0)
- pp:SetPoint("RIGHT", -.2, 0)
- local ppbg = pp:CreateTexture(nil, "BORDER")
- ppbg:SetAllPoints(pp)
- ppbg:SetTexture(texture)
- ppbg.multiplier = .3
- -- Power Text
- local ppp = pp:CreateFontString(nil, "OVERLAY")
- ppp:SetFont(font, fontsize, 'OUTLINE')
- ppp:SetPoint("LEFT",hpp,"RIGHT", -265, 0)
- self:Tag(ppp, '[raidcolor][Afterpower]')
- pp.value = ppp
- pp.bg = ppbg
- self.Power = pp
- self.PostUpdatePower = updatePower
- else
- local pp = CreateFrame"StatusBar"
- pp:SetHeight(height*.11)
- pp:SetStatusBarTexture(texture)
- pp.frequentUpdates = true
- pp.colorTapping = true
- pp.colorHappiness = true
- pp.colorClass = true
- pp.colorReaction = true
- -- Smooth
- pp.Smooth = true
- pp:SetParent(self)
- pp:SetPoint("BOTTOM")
- pp:SetPoint("LEFT", .2, 0)
- pp:SetPoint("RIGHT", -.2, 0)
- local ppbg = pp:CreateTexture(nil, "BORDER")
- ppbg:SetAllPoints(pp)
- ppbg:SetTexture(texture)
- -- Power Text
- local ppp = pp:CreateFontString(nil, "OVERLAY")
- ppp:SetFont(font, fontsize)
- ppp:SetPoint("RIGHT",hpp,"LEFT", 50000, 0)
- self:Tag(ppp, '[raidcolor][Afterpower]')
- pp.value = ppp
- pp.bg = ppbg
- self.Power = pp
- self.PostUpdatePower = updatePower
- end
- -- CastBar
- if(castBars)then
- if(unit == 'player' or unit == 'focus' or unit == 'target') then
- self.Castbar = CreateFrame('StatusBar', nil, self)
- self.Castbar:SetStatusBarTexture(texture)
- self.Castbar:SetScale(1.139)
- self.Castbar:SetStatusBarColor(0.659, 0.843, 1)
- CreateBorder(self.Castbar, 11, 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.6)
- if (unit == 'player') then
- self.Castbar:SetPoint("TOPRIGHT", self, "BOTTOMRIGHT", 327, -55)
- self.Castbar:SetHeight(25)
- self.Castbar:SetWidth(309)
- self.Castbar:SetParent(UIParent)
- if (CBSafezone) 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 (CBLatency) then
- self.Castbar.Latency = self:CreateFontString(nil, 'ARTWORK')
- self.Castbar.Latency:SetFont(font, fontsize, '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.PostCastStart = UpdateCastStart
- self.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.Castbar:CreateFontString(nil, 'OVERLAY')
- self.Castbar.Time:SetFont(font, 13, 'OUTLINE')
- self.Castbar.Time:SetPoint("RIGHT", self.Castbar, "RIGHT", -2, 0)
- self.Castbar.Time:SetParent(self.Castbar)
- self.Castbar.Time:SetJustifyH('RIGHT')
- self.Castbar.Time:SetParent(self.Castbar)
- self.Castbar.Text = self.Castbar:CreateFontString(nil, "OVERLAY")
- self.Castbar.Text:SetFont(font, 13, 'OUTLINE')
- self.Castbar.Text:SetPoint("LEFT", self.Castbar, "LEFT", 2, 0)
- self.Castbar.Text:SetHeight(fontsize)
- self.Castbar.Text:SetWidth(250)
- self.Castbar.Text:SetJustifyH"LEFT"
- self.Castbar.Text:SetParent(self.Castbar)
- if (unit == 'focus') then
- self.Castbar:SetPoint("CENTER", UIParent, "CENTER", -10, -10)
- self.Castbar:SetWidth(260)
- self.Castbar:SetHeight(25)
- elseif (unit == 'target') then
- self.Castbar:SetPoint("TOPRIGHT", self, "BOTTOMRIGHT", 141, 97)
- self.Castbar:SetWidth(230)
- self.Castbar:SetHeight(26)
- self.Castbar:SetParent(self)
- end
- end
- -- mirrortimers --
- 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], 11, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- _G[bar..'Border']:Hide()
- _G[bar]:SetParent(UIParent)
- _G[bar]:SetScale(1.132)
- _G[bar]:SetHeight(20)
- _G[bar]:SetWidth(280)
- _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(CastingBarFrameText:GetFont(), 13)
- _G[bar..'Text']:ClearAllPoints()
- _G[bar..'Text']:SetPoint('CENTER', MirrorTimer1StatusBar, 0, 1)
- _G[bar..'StatusBar']:SetAllPoints(_G[bar])
- end
- -- Leader/MasterLoot Icon
- if(unit == 'player') then
- local leader = hp:CreateTexture(nil, "OVERLAY")
- leader:SetHeight(16)
- leader:SetWidth(16)
- leader:SetPoint("BOTTOMLEFT", hp, "TOPLEFT", -5, -2)
- leader:SetTexture"Interface\\GroupFrame\\UI-Group-LeaderIcon"
- self.Leader = leader
- local masterlooter = hp:CreateTexture(nil, 'OVERLAY')
- masterlooter:SetHeight(16)
- masterlooter:SetWidth(16)
- masterlooter:SetPoint('LEFT', leader, 'RIGHT')
- self.MasterLooter = masterlooter
- end
- -- Portraits
- local portrait = CreateFrame("PlayerModel", nil, self)
- portrait:SetBackdrop(backdrop)
- portrait:SetBackdropColor(0, 0, 0, .9)
- portrait:SetScript("OnShow", function(self) self:SetCamera(0) end)
- portrait:SetWidth(height*3)
- portrait:SetHeight(height*2)
- portrait.type = "3D"
- self.Portrait = portrait
- CreateBorder(portrait, 12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)
- if unit == "player" then
- portrait:SetPoint("BOTTOMLEFT", self, "BOTTOMLEFT", -92, -26)
- elseif unit == "target" then
- portrait:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", 11, -26)
- elseif unit == "focus" or unit == "pet" or unit == "targettarget" then
- portrait:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", 500000000, -500000000)
- end
- local pvp = hp:CreateTexture(nil, "OVERLAY")
- pvp:SetPoint("BOTTOMRIGHT", hp, "TOPRIGHT", 18, -45)
- pvp:SetHeight(28)
- pvp:SetWidth(28)
- self.PvP = pvp
- local LFDRole = hp:CreateTexture(nil, 'OVERLAY')
- LFDRole:SetSize(16, 16)
- LFDRole:SetPoint('LEFT', hp, 'RIGHT', -7, 12)
- self.LFDRole = LFDRole
- local Combat = hp:CreateTexture(nil, 'OVERLAY')
- Combat:SetSize(20, 20)
- Combat:SetPoint('BOTTOMLEFT', hp, -10, -10)
- self.Combat = Combat
- local ricon = hp:CreateFontString(nil, "OVERLAY")
- ricon:SetFontObject(GameFontNormalSmall)
- ricon:SetTextColor(1, 1, 1)
- ricon:SetPoint("CENTER", hp, 0, 12)
- ricon:SetHeight(24)
- ricon:SetWidth(24)
- self.RIcon = ricon
- self:RegisterEvent("RAID_TARGET_UPDATE", updateRIcon)
- table.insert(self.__elements, updateRIcon)
- -- Combo Points
- if(unit=='target') then
- local cpoints = self:CreateFontString(nil, 'OVERLAY')
- cpoints:SetFont(font, 18, 'OUTLINE')
- cpoints:SetPoint('RIGHT', self, 'LEFT', -10, 0)
- cpoints:SetJustifyH('RIGHT')
- self:Tag(cpoints, '[cpoints]')
- end
- if(unit~='player')then
- -- Name
- local name = hp:CreateFontString(nil, "OVERLAY")
- if(unit == "targettarget" or unit == "focus" or unit == "pet") then
- name:SetPoint("CENTER")
- name:SetWidth(150)
- else
- name:SetPoint("LEFT", hp, "LEFT", -2, 27)
- name:SetJustifyH"LEFT"
- name:SetWidth(300)
- end
- name:SetFont(font, fontsize, 'OUTLINE')
- name:SetTextColor(1, 1, 1)
- name:SetHeight(fontsize)
- self.Info = name
- if(unit == 'target')then
- self:Tag(self.Info,'[difficulty][level][shortclassification] [raidcolor][name]')
- else
- self:Tag(self.Info,'[raidcolor][name]')
- end
- end
- -- Buffs
- if(unit) then
- local buffs = CreateFrame("Frame", nil, self)
- buffs:SetHeight(buffsize)
- buffs:SetWidth(width)
- buffs.PostCreateIcon = auraIcon
- if(unit == 'pet' or unit == 'focus' or unit == 'target') then
- buffs.initialAnchor = "TOPLEFT"
- buffs["growth-y"] = "RIGHT"
- buffs["growth-x"] = "DOWN"
- buffs:SetPoint("TOPLEFT", self, "BOTTOMLEFT", -2, -8)
- buffs.size = 28
- buffs.spacing = 3
- if(unit == "focus" or unit == "pet") then
- buffs.num = 6
- elseif(unit=="target") then
- buffs.num = 9
- else
- buffs.num = 6
- end
- self.Buffs = buffs
- end
- -- Debuffs
- if(unit) then
- local debuffs = CreateFrame("Frame", nil, self)
- debuffs:SetHeight(width)
- debuffs:SetWidth(width)
- debuffs.PostCreateIcon = auraIcon
- if(unit == 'pet'or unit == 'focus') then
- debuffs:SetPoint("LEFT", self, "RIGHT", 7, 0)
- debuffs["growth-x"] = "RIGHT"
- debuffs.initialAnchor = "LEFT"
- elseif(unit == 'player' or unit == 'targettarget') then
- debuffs:SetPoint("LEFT", self, "RIGHT", 20, 5)
- debuffs["growth-x"] = "RIGHT"
- debuffs.initialAnchor = "LEFT"
- else
- debuffs:SetPoint("BOTTOMLEFT", self, "TOPLEFT", -4, 27)
- debuffs["growth-y"] = "UP"
- debuffs.initialAnchor = "BOTTOMLEFT"
- if(playerOnlyDebuffs)then
- debuffs.onlyShowPlayer = true
- end
- end
- debuffs.size = 32
- debuffs.spacing = 3
- if(unit == "targettarget" or unit == "player") then
- debuffs.num = 0
- elseif(unit=="target") then
- debuffs.num = 5
- else
- debuffs.num = 4
- end
- self.Debuffs = debuffs
- end
- if(unit == 'player' and UnitLevel('player') ~= MAX_PLAYER_LEVEL) then
- self.Resting = self.Power:CreateTexture(nil, 'OVERLAY')
- self.Resting:SetHeight(18)
- self.Resting:SetWidth(20)
- self.Resting:SetPoint('BOTTOMLEFT', -8.5, -8.5)
- self.Resting:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
- self.Resting:SetTexCoord(0,0.5,0,0.421875)
- end
- -- DebuffHidghtlight
- self.DebuffHighlightBackdrop = false
- self.DebuffHighlightFilter = true
- if(unit == 'player') then
- if(IsAddOnLoaded('oUF_Swing')) then
- self.Swing = CreateFrame('StatusBar', nil, self)
- self.Swing:SetPoint('TOP', self, 'BOTTOM', 0, -10)
- self.Swing:SetStatusBarTexture(texture)
- self.Swing:SetStatusBarColor(1, 0.7, 0)
- self.Swing:SetHeight(6)
- self.Swing:SetWidth(width)
- self.Swing:SetBackdrop(backdrop)
- self.Swing:SetBackdropColor(0, 0, 0)
- self.Swing.Text = self.Swing:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
- 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.3, 0.3, 0.3)
- self.Swing.disableMelee = true
- self.Swing.disableRanged = true
- end
- if(IsAddOnLoaded('oUF_RuneBar') and class == 'DEATHKNIGHT') then
- self.RuneBar = {}
- for i = 1, 6 do
- self.RuneBar[i] = CreateFrame('StatusBar', nil, self)
- if(i == 1) then
- self.RuneBar[i]:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -8)
- else
- self.RuneBar[i]:SetPoint('TOPLEFT', self.RuneBar[i-1], 'TOPRIGHT', 5, 0)
- end
- self.RuneBar[i]:SetStatusBarTexture(texture)
- self.RuneBar[i]:SetHeight(10)
- self.RuneBar[i]:SetWidth(250/6 - 0.85)
- self.RuneBar[i]:SetBackdrop(backdrop)
- self.RuneBar[i]:SetBackdropColor(0, 0, 0)
- self.RuneBar[i]:SetMinMaxValues(0, 1)
- CreateBorder(self.RuneBar[i], 11, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.RuneBar[i].bg = self.RuneBar[i]:CreateTexture(nil, 'BORDER')
- self.RuneBar[i].bg:SetAllPoints(self.RuneBar[i])
- self.RuneBar[i].bg:SetTexture(0.1, 0.1, 0.1)
- end
- 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(33)
- self.TotemBar[i]:SetWidth(200/4 - 5)
- if (i == 1) then
- self.TotemBar[i]:SetPoint("TOPRIGHT", self, "BOTTOMRIGHT", -1, 70)
- else
- self.TotemBar[i]:SetPoint("RIGHT", self.TotemBar[i-1], "LEFT", -10, 0)
- end
- CreateBorder(self.TotemBar[i], 12, 3, 3, 3, 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(backdrop)
- self.TotemBar[i].bg.multiplier = 0.3
- end
- end
- if(IsAddOnLoaded('oUF_Experience')) then
- self.Experience = CreateFrame('StatusBar', nil, self)
- self.Experience:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -25)
- self.Experience:SetStatusBarTexture(texture)
- self.Experience:SetStatusBarColor(0,.7,1)
- self.Experience:SetHeight(15)
- self.Experience:SetWidth((unit == 'pet') and 150 or width)
- self.Experience:SetBackdrop(backdrop)
- self.Experience:SetBackdropColor(0, 0, 0)
- self.Experience.Tooltip = true
- CreateBorder(self.Experience, 11, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3)
- self.Experience.Text = self.Experience:CreateFontString(nil, 'OVERLAY')
- self.Experience.Text:SetFont(font, fontsize, 'OUTLINE')
- 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.25, 0.25, 0.25)
- end
- if(class == 'DRUID') then
- self.DruidPower = CreateFrame('StatusBar', nil, self)
- self.DruidPower:SetPoint('BOTTOM', self.Power, 'TOP')
- self.DruidPower:SetStatusBarTexture(texture)
- self.DruidPower:SetHeight(1)
- self.DruidPower:SetWidth(width)
- self.DruidPower:SetAlpha(0)
- self.DruidPower.Text = self.DruidPower:CreateFontString(nil, 'OVERLAY')
- self.DruidPower.Text:SetFont(font, fontsize, 'OUTLINE')
- self.DruidPower.Text:SetPoint('CENTER', self.DruidPower)
- self.DruidPower.Text:SetTextColor(unpack(colors.power['MANA']))
- self:RegisterEvent('UNIT_MANA', UpdateDruidPower)
- self:RegisterEvent('UNIT_ENERGY', UpdateDruidPower)
- self:RegisterEvent('PLAYER_LOGIN', UpdateDruidPower)
- end
- end
- -- CombatFeedback
- if not (unit == "player")then
- local cbft = hp:CreateFontString(nil, "OVERLAY")
- cbft:SetPoint("CENTER", self)
- cbft:SetFont(font, 21)
- cbft:SetShadowOffset(2, 2)
- self.CombatFeedbackText = cbft
- self.CombatFeedbackText.maxAlpha = 1
- end
- if(not unit) then
- self.Range = {
- insideAlpha = 1,
- outsideAlpha = 0.5,
- }
- end
- if(unit == "targettarget" or unit == "focus" or unit == "pet") then
- self:SetAttribute('initial-height', height)
- self:SetAttribute('initial-width', 150)
- else
- self:SetAttribute('initial-height', height)
- self:SetAttribute('initial-width', width)
- end
- self.disallowVehicleSwap = true
- return self
- end end end
- local function menu(self)
- if(self.unit:match('party')) 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
- -- Raid Layout
- local function raidlayout(self, unit)
- self.menu = menu
- self:RegisterForClicks('AnyUp')
- self:SetScript('OnEnter', UnitFrame_OnEnter)
- self:SetScript('OnLeave', UnitFrame_OnLeave)
- self:SetAttribute('*type2', 'menu')
- self:SetAttribute('initial-height', 38)
- self:SetAttribute('initial-width', 42)
- 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)
- -- DebuffHidghtlight
- self.DebuffHighlightBackdrop = true
- self.DebuffHighlightFilter = true
- -- health bar
- self.Health = CreateFrame('StatusBar', nil, self)
- self.Health:SetStatusBarTexture(bartexture)
- self.Health:SetHeight(10)
- self.Health:SetParent(self)
- self.Health:SetAllPoints(self)
- self.Health.colorClass = true
- self.Health:SetOrientation('HORIZONTAL')
- self.Health:SetOrientation('VERTICAL')
- -- health bar background
- self.Health.bg = self.Health:CreateTexture(nil, 'BORDER')
- self.Health.bg:SetAllPoints(self.Health)
- self.Health.bg:SetTexture(bartexture)
- self.Health.bg:SetAlpha(0.4)
- -- name text
- self.Name = self.Health:CreateFontString(nil, 'OVERLAY')
- self.Name:SetPoint('TOP', 0, -1)
- self.Name:SetFont(font, 11, 'OUTLINE')
- self.Name:SetTextColor(1, 1, 1)
- self:Tag(self.Name, '|cffffffff[AfterRaidName]|r')
- -- ready check
- self.ReadyCheck = self.Health:CreateTexture(nil, 'OVERLAY')
- self.ReadyCheck:SetPoint('LEFT', self, -16, 0)
- self.ReadyCheck:SetHeight(14)
- self.ReadyCheck:SetWidth(14)
- -- Raid Icon
- self.RaidIcon = self.Health:CreateTexture(nil, 'OVERLAY')
- self.RaidIcon:SetHeight(15)
- self.RaidIcon:SetWidth(15)
- self.RaidIcon:SetPoint('CENTER', self, 'CENTER')
- self.RaidIcon:SetTexture('Interface\\TargetingFrame\\UI-RaidTargetingIcons')
- -- range fading
- self.Range = {
- insideAlpha = 1,
- outsideAlpha = 0.4,
- }
- -- smooth update support
- self.Health.Smooth = true
- return self
- end
- oUF:RegisterStyle('AftermathhRaid', raidlayout)
- oUF:SetActiveStyle('AftermathhRaid')
- local raid = oUF:SpawnHeader(nil, nil, 'raid,party,solo',
- 'showPlayer', true,
- 'showSolo', true,
- 'showParty', true,
- 'showRaid', true,
- '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"
- )
- raid:SetPoint("TOPLEFT", UIParent, 10, -8)
- oUF:RegisterStyle("Aftermathh", func)
- oUF:SetActiveStyle"Aftermathh"
- local player = oUF:Spawn("player")
- player:SetPoint("BOTTOMLEFT", UIParent, 196, 182)
- local target = oUF:Spawn("target")
- target:SetPoint("BOTTOMRIGHT", UIParent, -237, 184)
- local tot = oUF:Spawn("targettarget")
- tot:SetPoint("RIGHT", UIParent, -75, -189)
- local pet = oUF:Spawn("pet")
- pet:SetPoint("LEFT", UIParent, 20, -81)
- local focus = oUF:Spawn("focus")
- focus:SetPoint("LEFT", UIParent, 20, -157)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement