Advertisement
Kygo

Untitled

Dec 30th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.74 KB | None | 0 0
  1. --[[-----------------------------------------------------------
  2.     oUF_Kygo
  3.     PvE oriented oUF layout.
  4.     Modifications and edits are allowed to be uploaded to http://www.wowinterface.com
  5.    
  6. ---------------------------------------------------------------]]
  7. local _, playerClass = UnitClass("player")
  8.  
  9. ------------------------------------------------------------------------
  10. -- Configurable stuff starts here
  11.  
  12. local BUFF_HEIGHT = 13
  13. local BUFF_SPACING = 0
  14. local MAX_NUM_BUFFS = 10
  15.  
  16. local auraElement = {
  17.     player = "Buffs",
  18.     target = "Debuffs",
  19. }
  20.  
  21. local auraFilter = {
  22.     player = function(element, unit, icon, name, rank, texture, count, debuffType, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff)
  23.         local ok = duration and duration > 0 and duration < 46
  24.         --print(unit, ok and "|cff7fff7fPASS|r" or "|cffff7f7fFAIL|r", name, duration, UnitAura)
  25.         return ok
  26.     end,
  27.     target = function(element, unit, icon, name, rank, texture, count, debuffType, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff)
  28.         local ok = canApplyAura
  29.         --print(unit, ok and "|cff7fff7fPASS|r" or "|cffff7f7fFAIL|r", name, canApplyAura)
  30.         return ok
  31.     end
  32. }
  33.  
  34.  
  35. -- Configurable stuff ends here
  36. ------------------------------------------------------------------------
  37.  
  38. local function auras_PostCreateIcon(element, icon)
  39.     local frame = element.__owner
  40.     --print("PostCreateIcon", frame.unit)
  41.     local BAR_TEXTURE = frame.Health and "Interface\\AddOns\\oUF_Kygo\\Media\\Minimalist"
  42.     local bar = CreateFrame("StatusBar", nil, icon)
  43.     bar:SetPoint("LEFT", icon, "RIGHT")
  44.     bar:SetWidth(frame:GetWidth() - BUFF_HEIGHT)
  45.     bar:SetHeight(BUFF_HEIGHT)
  46.     bar:SetStatusBarTexture(BAR_TEXTURE)
  47.     bar:SetStatusBarColor(0.3, 0.3, 0.3)
  48.    
  49.     local stime = bar:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
  50.     stime:SetPoint("RIGHT", -4, 0)
  51.     stime:SetTextColor(1, 1, 1)
  52.     --stime:SetFormattedText("%.1f", duration)
  53.     bar.stime = stime
  54.    
  55.     local name = bar:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
  56.     name:SetPoint("LEFT", 4, 0)
  57.     name:SetPoint("RIGHT", stime, "LEFT", -2, 0)
  58.     name:SetTextColor(1, 1, 1)
  59.     bar.name = name
  60.        
  61.     local bg = bar:CreateTexture(nil, "BACKGROUND")
  62.     bg:SetAllPoints(true)
  63.     bg:SetTexture(BAR_TEXTURE)
  64.     bg:SetVertexColor(0.2, 0.2, 0.2)
  65.     bar.bg = bg
  66.  
  67.     icon.bar = bar
  68. end
  69.  
  70. local function aurabar_OnUpdate(bar, elapsed, name, duration)
  71.     local t = bar.timeLeft - elapsed
  72.     bar:SetValue(t > 0 and t or 0)
  73.     bar.timeLeft = t
  74.    
  75. end
  76.  
  77. local function auras_PostUpdateIcon(element, unit, icon, index, offset)
  78.     local bar = icon.bar
  79.     local name, _, _, _, _, duration, expirationTime = UnitAura(unit, index, icon.filter, name)
  80.     --print("PostUpdateIcon", name,duration, timeLeft)
  81.     if duration > 0 then
  82.         bar.name:SetText(name)
  83.         bar.stime:SetFormattedText("%.1f", duration)
  84.         bar.timeLeft = expirationTime - GetTime()
  85.         bar:SetMinMaxValues(0, duration)
  86.         bar:SetScript("OnUpdate", aurabar_OnUpdate)
  87.         else
  88.         bar:SetScript("OnUpdate", nil)
  89.         bar:SetMinMaxValues(0, 1)
  90.         bar:SetValue(1)
  91.     end
  92. end
  93.  
  94.  
  95.  
  96. --Some Tags
  97. oUF.Tags.Events["shorthp"] = "UNIT_HEALTH"
  98. oUF.Tags.Methods["shorthp"] = function(unit)
  99.     if not UnitIsDeadOrGhost(unit) then
  100.         local hp = UnitHealth(unit)
  101.         return AbbreviateLargeNumbers(hp)
  102.     end
  103. end
  104.  
  105. oUF.Tags.Events["shortpp"] = "UNIT_POWER"
  106. oUF.Tags.Methods["shortpp"] = function(unit)
  107.     if not UnitIsDeadOrGhost(unit) then
  108.         local pp = UnitPower(unit)
  109.         return AbbreviateLargeNumbers(pp)
  110.     end
  111. end
  112.  
  113. oUF.Tags.Events["shortname"] = "UNIT_NAME"
  114. oUF.Tags.Methods["shortname"] = function(unit)
  115.     local name = UnitName(unit)
  116.     return string.sub(UnitName(unit), 1, 20)
  117. end
  118.  
  119. oUF.Tags.Events["readycheckicon"] = "DoReadyCheck"
  120. oUF.Tags.SharedEvents["IsInGroup"] = true
  121. oUF.Tags.Methods["readycheckicon"] = function(unit)
  122.     if unit == "player" and IsInGroup() then
  123.         return [[|TInterface\RAIDFRAME\ReadyCheck-Ready|t]]
  124.     end
  125. end
  126.  
  127. oUF.Tags.Events["rsicon"] = "PLAYER_UPDATE_RESTING"
  128. oUF.Tags.SharedEvents["PLAYER_UPDATE_RESTING"] = true
  129. oUF.Tags.Methods["rsicon"] = function(unit)
  130.     if unit == "player" and IsResting() then
  131.         return [[|TInterface\CharacterFrame\UI-StateIcon:0:0:0:-6:64:64:28:6:6:28|t]]
  132.     end
  133. end
  134. oUF.Tags.Events["combaticon"] = "PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED"
  135. oUF.Tags.SharedEvents["PLAYER_REGEN_DISABLED"] = true
  136. oUF.Tags.SharedEvents["PLAYER_REGEN_ENABLED"] = true
  137. oUF.Tags.Methods["combaticon"] = function(unit)
  138.     if unit == "player" and UnitAffectingCombat("player") then
  139.         return [[|TInterface\CharacterFrame\UI-StateIcon:0:0:0:0:64:64:37:58:5:26|t]]
  140.     end
  141. end
  142.  
  143. oUF.Tags.Events["leadericon"] = "GROUP_ROSTER_UPDATE"
  144. oUF.Tags.SharedEvents["GROUP_ROSTER_UPDATE"] = true
  145. oUF.Tags.Methods["leadericon"] = function(unit)
  146.     if UnitIsGroupLeader(unit) then
  147.         return [[|TInterface\GroupFrame\UI-Group-LeaderIcon:0|t]]
  148.     elseif UnitInRaid(unit) and UnitIsGroupAssistant(unit) then
  149.         return [[|TInterface\GroupFrame\UI-Group-AssistantIcon:0|t]]
  150.     end
  151. end
  152.  
  153. oUF.Tags.Events["mastericon"] = "PARTY_LOOT_METHOD_CHANGED GROUP_ROSTER_UPDATE"
  154. oUF.Tags.SharedEvents["PARTY_LOOT_METHOD_CHANGED"] = true
  155. oUF.Tags.SharedEvents["GROUP_ROSTER_UPDATE"] = true
  156. oUF.Tags.Methods["mastericon"] = function(unit)
  157.     local method, pid, rid = GetLootMethod()
  158.     if method ~= "master" then return end
  159.     local munit
  160.     if pid then
  161.         if pid == 0 then
  162.             munit = "player"
  163.         else
  164.             munit = "party" .. pid
  165.         end
  166.     elseif rid then
  167.         munit = "raid" .. rid
  168.     end
  169.     if munit and UnitIsUnit(munit, unit) then
  170.         return [[|TInterface\GroupFrame\UI-Group-MasterLooter:0:0:0:2|t]]
  171.     end
  172. end
  173.  
  174.  
  175. local function Portrait_PostUpdate(portrait, unit)
  176.     portrait:SetCamera(0)
  177. end
  178.  
  179.  
  180. local function Style(frame, unit, isSingle)
  181.     frame:SetSize(150, 35)
  182.    
  183.     frame:RegisterForClicks("AnyUp")
  184.  
  185.     frame:SetScript("OnEnter", UnitFrame_OnEnter)
  186.     frame:SetScript("OnLeave", UnitFrame_OnLeave)
  187.  
  188.  
  189.     -----------------------------------
  190.     --  Frame background and border  --
  191.     -----------------------------------
  192.    
  193.     frame:SetBackdrop({
  194.             bgFile = "Interface\\AddOns\\oUF_Kygo\\Media\\backdrop", tile = false,
  195.             edgeFile = "Interface\\AddOns\\oUF_Kygo\\Media\\backdrop_edge", edgeSize = 5,
  196.             insets = { left = 1, right = 1 , top = 1, bottom = 1 }
  197.     })
  198.     frame:SetBackdropColor(0, 0, 0, .1)
  199.     frame:SetBackdropBorderColor(0, 0, 0, 1)
  200.        
  201.  
  202.        
  203.     -----------------------------------
  204.     --           Health bar          --
  205.     -----------------------------------
  206.     local health = CreateFrame("StatusBar", nil, frame)
  207.     health:SetPoint("TOPLEFT", frame, 5, -5)
  208.     health:SetPoint("TOPRIGHT", frame, -5, 5)
  209.     health:SetHeight(20)
  210.  
  211.    
  212.     -- Health bar background
  213.     local healthBG = health:CreateTexture(nil, "BACKGROUND")
  214.     healthBG:SetAllPoints()
  215.     healthBG:SetTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Minimalist")  
  216.     health.bg = healthBG   
  217.    
  218.    
  219.     -- Health bar colors
  220.     health:SetStatusBarTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Runes")
  221.     health:SetStatusBarColor(0.2, 0.2, 0.2) -- foreground color
  222.     health.bg:SetVertexColor(0.2, 0, 0) --background color
  223.    
  224.    
  225.     --Health bar text
  226.     local healthText = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  227.     healthText:SetPoint("RIGHT", health, "RIGHT")
  228.     healthText:SetTextColor(1, 1, 1, 1)
  229.     healthText:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  230.     frame:Tag(healthText, "[raidcolor][dead][shorthp]")
  231.    
  232.    
  233.     -- % HP on target and target of target
  234.     if unit == "target" or unit == "targettarget" then
  235.     local healthPer = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  236.     healthPer:SetPoint("CENTER", health, "CENTER", 2, 0)
  237.     healthPer:SetTextColor(1, 1, 1, 1)
  238.     healthPer:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 6)
  239.     frame:Tag(healthPer, "[perhp]")
  240.     end
  241.    
  242.     frame.Health = health
  243.        
  244.        
  245.     -----------------------------------
  246.     --           Power bar           --
  247.     -----------------------------------
  248.     local power = CreateFrame("StatusBar", nil, frame)
  249.     power:SetPoint("TOPLEFT", health, "BOTTOMLEFT")
  250.     power:SetPoint("TOPRIGHT", health, "BOTTOMRIGHT")
  251.     power:SetPoint("BOTTOM", frame, 0, 5)
  252.    
  253.    
  254.     --Power background
  255.     local powerBG = power:CreateTexture(nil, "BACKGROUND")
  256.     powerBG:SetAllPoints()
  257.     powerBG:SetTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Minimalist")
  258.     power:SetStatusBarTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Minimalist")
  259.     powerBG.multiplier = 0.3
  260.     power.bg = powerBG
  261.    
  262.    
  263.     --Power Text
  264.     local powerText = power:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  265.     powerText:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 6)
  266.     powerText:SetPoint("RIGHT", power, "RIGHT")
  267.     powerText:SetTextColor(1, 1, 1, 1)
  268.     frame:Tag(powerText, "[shortpp]")
  269.        
  270.        
  271.     power.colorPower = true
  272.     frame.Power = power
  273.    
  274.  
  275.     ---------------------------------
  276.     --            Name text        --
  277.     ---------------------------------
  278.     if unit == "player" or unit == "pet" then
  279.    
  280.     else
  281.     local name = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  282.     name:SetPoint("LEFT", frame, 5, -22)
  283.     name:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  284.     name:SetTextColor(1, 1, 1, 1)
  285.     frame:Tag(name, "[shortname]")
  286.     end
  287.    
  288.     ---------------------------------
  289.     --Level and classification text--
  290.     ---------------------------------
  291.     if unit == "player" then
  292.    
  293.     else
  294.     local level = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  295.     level:SetPoint("RIGHT", frame, "RIGHT", -5, -22)
  296.     level:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  297.     level:SetTextColor(1, 1, 1, 1)
  298.     frame:Tag(level, "[smartlevel][shortclassification]")
  299.     end
  300.     --------------------------------
  301.     --             Misc           --
  302.     --------------------------------
  303.     local resting = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  304.     resting:SetPoint("TOPLEFT", frame)
  305.     resting:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  306.     frame:Tag(resting, "[rsicon]")
  307.    
  308.     local master = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  309.     master:SetPoint("TOPLEFT", frame, "TOPRIGHT", -15, 0)
  310.     master:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  311.     frame:Tag(master, "[mastericon]")
  312. --[[   
  313.     local combaticon = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  314.     combaticon:SetPoint("TOPLEFT", frame)
  315.     combaticon:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  316.     frame:Tag(combaticon, "[combaticon]")
  317. --]]   
  318.     local readycheckicon = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  319.     readycheckicon:SetPoint("CENTER", frame)
  320.     readycheckicon:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  321.     frame:Tag(readycheckicon, "[readycheckicon]")
  322.    
  323.     local leadericon = health:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  324.     leadericon:SetPoint("TOPLEFT", frame)
  325.     leadericon:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  326.     frame:Tag(leadericon, "[leadericon]")
  327.    
  328.     local LFDRole = health:CreateTexture(nil, "OVERLAY")
  329.     LFDRole:SetSize(12, 12)
  330.     LFDRole:SetPoint("BOTTOMLEFT", health)
  331.     LFDRole:SetTexture[[Interface\LFGFrame\UI-LFG-ICON-PORTRAITROLES]]
  332.     frame.LFDRole = LFDRole
  333.  
  334.     local ReadyCheck = health:CreateTexture(nil, 'OVERLAY')
  335.     ReadyCheck:SetSize(16, 16)
  336.     ReadyCheck:SetPoint('TOP')
  337.     ReadyCheck.finishedTime = 7
  338.     ReadyCheck.fadeTime = 3
  339.     frame.ReadyCheck = ReadyCheck
  340.  
  341.     local RaidIcon = health:CreateTexture(nil, "OVERLAY")
  342.     RaidIcon:SetSize(16, 16)
  343.     RaidIcon:SetPoint("CENTER", health)
  344.     frame.RaidIcon = RaidIcon
  345.    
  346.     --------------------------------
  347.     --          Portrait          --
  348.     --------------------------------
  349.     if unit == "player" or unit == "target" then
  350.         local portrait = CreateFrame("PlayerModel", nil, frame)
  351.         portrait:SetWidth(30)
  352.         portrait:SetAlpha(1)
  353.         if unit == "player" then
  354.             portrait:SetPoint("TOPRIGHT", frame, "TOPLEFT")
  355.             portrait:SetPoint("BOTTOMRIGHT", frame, "BOTTOMLEFT")
  356.         else
  357.             portrait:SetPoint("TOPLEFT", frame, "TOPRIGHT")
  358.             portrait:SetPoint("BOTTOMLEFT", frame, "BOTTOMRIGHT")
  359.         end
  360.    
  361.     frame.Portrait = portrait
  362.     end
  363.    
  364.     if unit == "player" or unit == "target" then
  365.         local portraitBG = frame:CreateTexture(nil, "BACKGROUND")
  366.         portraitBG:SetWidth(32)
  367.         portraitBG:SetTexture(.1, .1, .1)
  368.         portraitBG:SetAlpha(1)
  369.         if unit == "player" then
  370.             portraitBG:SetPoint("TOPRIGHT", frame, "TOPLEFT")
  371.             portraitBG:SetPoint("BOTTOMRIGHT", frame, "BOTTOMLEFT")
  372.         else
  373.             portraitBG:SetPoint("TOPLEFT", frame, "TOPRIGHT")
  374.             portraitBG:SetPoint("BOTTOMLEFT", frame, "BOTTOMRIGHT")
  375.     end
  376.     frame.portraitBG = portraitBG
  377.     end
  378.    
  379.     ------------------
  380.     --  Aurabars    --
  381.     ------------------
  382.     -- Dont change any values
  383.     local auraElementForUnit = auraElement[unit]
  384.     if auraElementForUnit then
  385.         local Auras = CreateFrame("Frame", nil, frame)
  386.         Auras:SetPoint("BOTTOMLEFT", frame, "TOPLEFT", 0, 0)
  387.         Auras:SetWidth(BUFF_HEIGHT + BUFF_SPACING)
  388.         Auras:SetHeight(1)
  389.  
  390.         Auras["initialAnchor"] = "BOTTOMLEFT"
  391.         Auras["growth-y"] = "UP"
  392.         Auras["spacing-y"] = BUFF_SPACING
  393.         Auras["num"] = MAX_NUM_BUFFS
  394.         Auras["size"] = BUFF_HEIGHT
  395.                
  396.         Auras.PostCreateIcon = auras_PostCreateIcon
  397.         Auras.PostUpdateIcon = auras_PostUpdateIcon
  398.  
  399.         Auras.CustomFilter = auraFilter[unit]
  400.         frame[auraElementForUnit] = Auras
  401.     end
  402.    
  403.     ---------------------------------  
  404.     --        Combo Points         --
  405.     ---------------------------------
  406.     if unit == "target" and playerClass == "ROGUE"  then
  407.             local CPoints = {}
  408.  
  409.             for index = 1, MAX_COMBO_POINTS do
  410.                     local CPoint = health:CreateTexture(nil, "OVERLAY")
  411.                     -- Position and size of the combo point.
  412.                     CPoint:SetSize(10, 10)
  413.                     CPoint:SetPoint("LEFT", health, "LEFT", index * CPoint:GetWidth(), 0, 20)
  414.                     CPoint:SetTexture("Interface\\AddOns\\oUF_Kygo\\Media\\OrbFG")
  415.                     CPoint:SetVertexColor(1, 0, 0)
  416.                     CPoints[index] = CPoint
  417.             end
  418.  
  419.             frame.CPoints = CPoints
  420.                    
  421.     end
  422.     ----------------------------------------------
  423.     --  Shards, Holy Power, Chi, Shadow Orbs    --
  424.     ----------------------------------------------
  425.  
  426.    
  427.     local CIf = CreateFrame("Frame", nil, frame)
  428.     CIf:SetSize(210, 32)
  429.         local ClassIcons = {}
  430.         for index = 1, 5 do
  431.             local Icon = health:CreateTexture(nil, "OVERLAY")
  432.             --Icon:SetSize(16, 16)  --Just here so I can see the default values
  433.             --Icon:SetPoint("TOPLEFT", frame, "BOTTOMLEFT", index * Icon:GetWidth(), 0, 20) --Just here so I can see the default values
  434.             Icon:SetTexture("Interface\\AddOns\\oUF_Kygo\\Media\\NCPoint")
  435.             ClassIcons[index] = Icon
  436.                 if unit == "player" and playerClass == "WARLOCK" then
  437.                 CIf:SetPoint("BOTTOM", health, 0, -8)
  438.                 Icon:SetSize(35, 10)
  439.                 Icon:SetPoint("TOPLEFT", CIf, "BOTTOMLEFT", index * Icon:GetWidth(), 0, 20)
  440.                
  441.                 elseif unit == "player" and playerClass == "MONK" then
  442.                 CIf:SetPoint("BOTTOM", health, 0, -8)
  443.                 Icon:SetSize(35, 16)
  444.                 Icon:SetPoint("TOPLEFT", CIf, "BOTTOMLEFT", index * Icon:GetWidth(), 0, 20)
  445.                
  446.                 elseif unit == "player" and playerClass == "PALADIN" then
  447.                 CIf:SetPoint("BOTTOM", health, 4, -8)
  448.                 Icon:SetSize(30, 13)
  449.                 Icon:SetPoint("TOPLEFT", CIf, "BOTTOMLEFT", index * Icon:GetWidth(), 0, 20)
  450.                
  451.                 elseif unit == "player" and playerClass == "PRIEST" then
  452.                 CIf:SetPoint("BOTTOM", health, -12, -8)
  453.                 Icon:SetSize(47, 13)
  454.                 Icon:SetPoint("TOPLEFT", CIf, "BOTTOMLEFT", index * Icon:GetWidth(), 0, 20)
  455.                 end
  456.         end
  457.         frame.ClassIcons = ClassIcons
  458.    
  459.  
  460.     -------------------------------
  461.     --      Burning Embers       --
  462.     -------------------------------
  463.     if unit == "player" and playerClass == "WARLOCK" then
  464.     local BEf = CreateFrame("Frame", nil, frame)
  465.     BEf:SetPoint("BOTTOM", health, -0, -8)
  466.     BEf:SetSize(210, 15)
  467.    
  468.         local BurningEmbers = {}
  469.             for index = 1, 4 do
  470.        
  471.             local BurningEmber = CreateFrame("StatusBar", nil, BEf)
  472.             BurningEmber:SetSize(210 / 6, 15)
  473.             BurningEmber:SetPoint("TOPLEFT", BEf, "BOTTOMLEFT", index * 210 / 6, 1)
  474.             BurningEmber:SetStatusBarTexture("Interface\\AddOns\\oUF_Kygo\\Media\\NCPoint")
  475.             BurningEmber:SetStatusBarColor(0, 1, 1)
  476.             BurningEmbers[index] = BurningEmber
  477.             end
  478.    
  479.         frame.BurningEmbers = BurningEmbers
  480.     end
  481.    
  482.     -----------------------------
  483.     --      Eclipse Bar        --
  484.     -----------------------------
  485.    
  486.     if unit == "player" and playerClass == "DRUID" then
  487.    
  488.         local EclipseBar = CreateFrame("Frame", nil, frame)
  489.         EclipseBar:SetPoint("BOTTOM", health)
  490.         EclipseBar:SetSize(140, 10)
  491.        
  492.         local SolarBar = CreateFrame("StatusBar", nil, EclipseBar)
  493.         SolarBar:SetPoint("RIGHT", health, "RIGHT",  0, -22)
  494.         SolarBar:SetStatusBarTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Minimalist")
  495.         SolarBar:SetStatusBarColor(0, 191, 255)
  496.         SolarBar:SetReverseFill(1)
  497.         SolarBar:SetSize(140, 10)
  498.        
  499.         local LunarBar = CreateFrame("StatusBar", nil, EclipseBar)
  500.         LunarBar:SetPoint("LEFT", health, 0, -22)
  501.         LunarBar:SetSize(140, 10)
  502.         LunarBar:SetStatusBarTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Minimalist")
  503.         LunarBar:SetStatusBarColor(255, 255, 0)
  504.    
  505.         EclipseBar.LunarBar = LunarBar
  506.         EclipseBar.SolarBar = SolarBar
  507.         frame.EclipseBar = EclipseBar
  508.    
  509.         local spark = SolarBar:CreateTexture(nil, "OVERLAY")
  510.         spark:SetSize(5, 10)
  511.         spark:SetPoint("LEFT", SolarBar)
  512.         spark:SetTexture("Interface\\PlayerFrame\\Direction_Eclipse")
  513.        
  514.         frame.spark = spark
  515.        
  516.         local perEclipse = SolarBar:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  517.         perEclipse:SetPoint("CENTER", EclipseBar, 0, -16)
  518.         perEclipse:SetFont("Interface\\AddOns\\oUF_Kygo\\Media\\neuropol.ttf", 10)
  519.         perEclipse:SetTextColor(1, 1, 1)
  520.         frame:Tag(perEclipse, "[pereclipse]")
  521.        
  522.     end
  523.    
  524.     ----------------------
  525.     --      Runebar     --
  526.     ----------------------
  527.     if unit == "player" and playerClass == "DEATHKNIGHT" then
  528.     local Rf = CreateFrame("Frame", nil, frame)
  529.     Rf:SetSize(110, 15)
  530.     Rf:SetPoint("BOTTOM", health, -40, -8)
  531.    
  532.         local Runes = {}
  533.         for index = 1, 6 do
  534.         -- Position and size of the rune bar indicators
  535.         local Rune = CreateFrame("StatusBar", nil, Rf)
  536.         Rune:SetSize(100 / 6, 10)
  537.         Rune:SetPoint("TOPLEFT", Rf, "BOTTOMLEFT", index * 100 / 4, 0)
  538.         Rune:SetStatusBarTexture("Interface\\AddOns\\oUF_Kygo\\Media\\Neal")
  539.    
  540.         Runes[index] = Rune
  541.         end
  542.    
  543.         -- Register with oUF
  544.     frame.Runes = Runes
  545.     end
  546.    
  547.     ---------------------
  548.     --   Plug-in's     --
  549.     ---------------------
  550.     ---------------------
  551.     --  oUF_Smooth     --
  552.     ---------------------
  553.     if IsAddOnLoaded("oUF_Smooth") and not strmatch(unit, ".target$") then
  554.         frame.Health.Smooth = true
  555.         if frame.Power then
  556.             frame.Power.Smooth = true
  557.         end
  558.     end
  559.    
  560.     --------------------
  561.     -- oUF_SpellRange --
  562.     --------------------
  563.     if IsAddOnLoaded("oUF_SpellRange") then
  564.         frame.SpellRange = {
  565.             insideAlpha = 1,
  566.             outsideAlpha = 0.7,
  567.         }
  568.  
  569.     elseif unit == "pet" or unit == "party"  then
  570.         frame.Range = {
  571.             insideAlpha = 1,
  572.             outsideAlpha = 0.7,
  573.         }
  574.     end
  575.  
  576.    
  577.     --------------------
  578.     --   oUF_AuraBars --
  579.     --------------------
  580.     --[[
  581.     if IsAddOnLoaded("oUF_AuraBars") then
  582.         if unit == "player" or unit == "target" then
  583.             frame.AuraBars = CreateFrame("Frame", nil, frame)
  584.             frame.AuraBars:SetHeight(1)
  585.             frame.AuraBars:SetWidth(142)
  586.             frame.AuraBars:SetPoint("TOP", 0, -3)
  587.             frame.AuraBars:SetPoint("RIGHT", -4, 0)
  588.             frame.AuraBars.auraBarHeight = 10
  589.             frame.AuraBars.spellNameSize = 5
  590.             frame.AuraBars.spellTimeSize = 5
  591.             frame.AuraBars.sort = 1
  592.             frame.AuraBars.auraBarTexture = "Interface\\AddOns\\oUF_Kygo\\Media\\Neal"
  593.             frame.AuraBars.filter =
  594.                 function(name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, canApplyAura, isBossDebuff)
  595.                     if(unitCaster == "player") and duration > 1 and duration < 305 then
  596.                     return true
  597.                     end
  598.                 end
  599.  
  600.         end
  601.     end
  602.     --]]
  603. end
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610. oUF:RegisterStyle("Kygo", Style)
  611. oUF:SetActiveStyle("Kygo")
  612. --Spawning units!
  613. local player = oUF:Spawn("player")
  614. player:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
  615.  
  616. local target = oUF:Spawn("target")
  617. target:SetPoint("LEFT", player, "RIGHT", 20, 0)
  618.  
  619. local pet = oUF:Spawn("pet")
  620. pet:SetPoint("BOTTOMLEFT", player, "TOPLEFT", 0, 20)
  621.  
  622. local tot = oUF:Spawn("targettarget")
  623. tot:SetPoint("BOTTOMLEFT", target, "TOPLEFT", 0, 20)
  624.  
  625. local focus = oUF:Spawn("focus")
  626. focus:SetPoint("CENTER", player, "CENTER", 0, 40)
  627.  
  628. local boss1 = oUF:Spawn("boss1")
  629. boss1:SetPoint("CENTER", player, "CENTER", 0, 70)
  630.  
  631. local boss2 = oUF:Spawn("boss2")
  632. boss2:SetPoint("CENTER", player, "CENTER", 0, 110)
  633.  
  634. local boss3 = oUF:Spawn("boss3")
  635. boss3:SetPoint("CENTER", player, "CENTER", 0, 140)
  636.  
  637. local boss4 = oUF:Spawn("boss4")
  638. boss4:SetPoint("CENTER", player, "CENTER", 0, 170)
  639.  
  640. local boss5 = oUF:Spawn("boss5")
  641. boss5:SetPoint("CENTER", player, "CENTER", 0, 210)
  642.  
  643. local party1 = oUF:Spawn("party1")
  644. party1:SetPoint("CENTER", player, "CENTER", 0, 110)
  645.  
  646. local party2 = oUF:Spawn("party2")
  647. party2:SetPoint("CENTER", player, "CENTER", 0, 110)
  648.  
  649. local party3 = oUF:Spawn("party3")
  650. party3:SetPoint("CENTER", player, "CENTER", 0, 110)
  651.  
  652. local party4 = oUF:Spawn("party4")
  653. party4:SetPoint("CENTER", player, "CENTER", 0, 110)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement