View Single Post
02-14-12, 09:20 AM   #14
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by yj589794 View Post
Are you sure that the file you posted is the one that caused the error you posted previously?

I can't see any way that the 2 match up
Yes it is. This give me errors.

LUA Code:
  1. if AftermathhUI.ouf.showraid == false then return end
  2.  
  3. local parent, ns = ...
  4. local oUF = ns.oUF or oUF
  5.  
  6. local function RaidFrames(self, unit)
  7.     if AftermathhUI.ouf.dropdownmenu == true then
  8.         self.menu = CreateDropDown
  9.     end
  10.     self:RegisterForClicks('AnyDown')
  11.     if AftermathhUI.ouf.tooltiponraid == true then
  12.         self:SetScript('OnEnter', UnitFrame_OnEnter)
  13.         self:SetScript('OnLeave', UnitFrame_OnLeave)
  14.     end
  15.     self:SetAttribute('*type2', 'menu')
  16.    
  17.     self:SetBackdrop({
  18.         bgFile = AftermathhUI.media.blank,
  19.         insets = {top = -1, left = -1, bottom = -1, right = -1},
  20.     })
  21.     self:SetBackdropColor(0, 0, 0, 0.4)
  22.  
  23.     self.Health = CreateFrame('StatusBar', nil, self)
  24.     self.Health:SetStatusBarTexture(AftermathhUI.media.texture)
  25.     if AftermathhUI.ouf.custombarcoloronraid == true then
  26.         self.Health:SetStatusBarColor(unpack(AftermathhUI.ouf.healthbarcolorraid))
  27.     end
  28.     self.Health:SetParent(self)
  29.     self.Health:SetAllPoints(self)
  30.     self.Health.Smooth = true
  31.     self.Health.frequentUpdates = true
  32.     if AftermathhUI.ouf.custombarcoloronraid == false then
  33.         self.Health.colorClass = true
  34.     end
  35.     CreateBorderLight(self.Health, AftermathhUI.media.bordersize-1, AftermathhUI.bordercolor, AftermathhUI.bordercolor, AftermathhUI.bordercolor, 2)
  36.    
  37.     if AftermathhUI.ouf.raidframesvertical == true then
  38.         self.Health:SetOrientation('VERTICAL')
  39.     end
  40.  
  41.     self.Health.bg = self.Health:CreateTexture(nil, 'BORDER')
  42.     self.Health.bg:SetAllPoints(self.Health)
  43.     self.Health.bg:SetTexture(AftermathhUI.media.texture)
  44.     self.Health.bg:SetVertexColor(0,0,0,0.6)
  45.    
  46.     local HealthText = self.Health:CreateFontString(nil, 'OVERLAY')
  47.     HealthText:SetFont(AftermathhUI.media.font3, 11, AftermathhUI.media.fontflag)
  48.     HealthText:SetPoint('TOP', 1, -20)
  49.     if AftermathhUI.media.shadowoffset == true then
  50.         HealthText:SetShadowOffset(1, -1)
  51.         HealthText:SetShadowColor(0,0,0)
  52.     end
  53.     self:Tag(HealthText, '[Aftermathh:Deficit]')
  54.  
  55.     self.Name = self.Health:CreateFontString(nil, 'OVERLAY')
  56.     self.Name:SetPoint('TOP', 0, -6)
  57.     self.Name:SetFont(AftermathhUI.media.font, 11, AftermathhUI.media.fontflag)
  58.     if AftermathhUI.media.shadowoffset == true then
  59.         self.Name:SetShadowOffset(1, -1)
  60.         self.Name:SetShadowColor(0, 0, 0)
  61.     end
  62.     if AftermathhUI.ouf.custombarcoloronraid == true then
  63.         self:Tag(self.Name, '[raidcolor][Aftermathh:RaidName]')
  64.     end
  65.     if AftermathhUI.ouf.custombarcoloronraid == false then
  66.         self:Tag(self.Name, '|cffffffff[Aftermathh:RaidName]|r')
  67.     end
  68.  
  69.     local InvisFrame = CreateFrame("Frame", nil, self)
  70.     InvisFrame:SetFrameStrata("MEDIUM")
  71.     InvisFrame:SetFrameLevel(5)
  72.     InvisFrame:SetAllPoints()
  73.  
  74.     local Background = InvisFrame:CreateTexture(nil, 'BORDER')
  75.     Background:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
  76.     Background:SetAllPoints()
  77.     Background:SetAlpha(0)
  78.    
  79.     self:HookScript("OnEnter", function(self)
  80.         Background:SetVertexColor(1, 1, 1, 0.5)
  81.     end)
  82.  
  83.     self:HookScript("OnLeave", function(self)
  84.         Background:SetVertexColor(0, 0, 0, 0)
  85.     end)
  86.  
  87.     self.MasterLooter = InvisFrame:CreateTexture(nil, 'OVERLAY', self)
  88.     self.MasterLooter:SetSize(11, 11)
  89.     self.MasterLooter:SetPoint('RIGHT', self.Health, 'TOPRIGHT', 2, 2)
  90.    
  91.     self.Assistant = InvisFrame:CreateTexture(nil, 'OVERLAY', self)
  92.     self.Assistant:SetSize(12, 12)
  93.     self.Assistant:SetPoint('LEFT', self.Health, 'TOPLEFT', -5, 2)
  94.    
  95.     self.Leader = InvisFrame:CreateTexture(nil, 'OVERLAY', self)
  96.     self.Leader:SetSize(12, 12)
  97.     self.Leader:SetPoint('LEFT', self.Health, 'TOPLEFT', -5, 2)
  98.    
  99.     self.RaidIcon = InvisFrame:CreateTexture(nil, 'OVERLAY')
  100.     self.RaidIcon:SetSize(17, 17)
  101.     self.RaidIcon:SetPoint('CENTER', self, 'TOP')
  102.  
  103.     self.ReadyCheck = InvisFrame:CreateTexture(nil, 'OVERLAY')
  104.     self.ReadyCheck:SetSize(31, 25)
  105.     self.ReadyCheck:SetPoint('CENTER')  
  106.     self.ReadyCheck.delayTime = 4
  107.     self.ReadyCheck.fadeTime = 1
  108.    
  109.     if AftermathhUI.ouf.showroleicon == true then
  110.         self.LFDRole = InvisFrame:CreateTexture(nil, 'OVERLAY')
  111.         self.LFDRole:SetPoint('CENTER', self, 'BOTTOM', -1, 1)
  112.         self.LFDRole:SetSize(14, 14)
  113.         self.LFDRole:SetTexture(AftermathhUI.media.lfd)
  114.         self.LFDRole:SetDesaturated(1)
  115.     end
  116.  
  117.     if AftermathhUI.ouf.showaggroonraidframes == true then
  118.         table.insert(self.__elements, UpdateThreatRaid)
  119.         self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateThreatRaid)
  120.         self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', UpdateThreatRaid)
  121.         self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', UpdateThreatRaid)
  122.     end
  123.  
  124.     if AftermathhUI.ouf.aurawatch == true and AftermathhUI.ouf.gridlayout == true and AftermathhUI.ouf.dpslayout == false then
  125.         CreateAuraWatch(self,unit)
  126.     end
  127.    
  128.     if AftermathhUI.ouf.raiddebuffs == true then
  129.         self.RaidDebuffs = CreateFrame('Frame', nil, self)
  130.         self.RaidDebuffs:SetSize(20, 20)
  131.         self.RaidDebuffs:SetPoint('CENTER', self)
  132.         self.RaidDebuffs:SetFrameStrata('HIGH')
  133.        
  134.         local PerfectBorders = 768/string.match(GetCVar("gxResolution"), "%d+x(%d+)")/0.89999997615814
  135.         self.RaidDebuffs:SetBackdrop({
  136.             bgFile = AftermathhUI.media.borderlight,
  137.             insets = {top = -4+PerfectBorders, left = -4+PerfectBorders, bottom = -4+PerfectBorders, right = -4+PerfectBorders},
  138.         })
  139.  
  140.         self.RaidDebuffs.icon = self.RaidDebuffs:CreateTexture(nil, 'ARTWORK')
  141.         self.RaidDebuffs.icon:SetTexCoord(.07,.93,.07,.93)
  142.         self.RaidDebuffs.icon:SetAllPoints(self.RaidDebuffs)
  143.        
  144.         self.RaidDebuffs.cd = CreateFrame('Cooldown', nil, self.RaidDebuffs)
  145.         self.RaidDebuffs.cd:SetAllPoints(self.RaidDebuffs)
  146.        
  147.         local overlayFrame = CreateFrame("frame", nil, self.RaidDebuffs, nil)
  148.         overlayFrame:SetFrameStrata("HIGH")
  149.         overlayFrame:SetFrameLevel(5)
  150.    
  151.         self.RaidDebuffs.count = self.RaidDebuffs:CreateFontString(nil, 'OVERLAY')
  152.         self.RaidDebuffs.count:SetParent(overlayFrame)
  153.         self.RaidDebuffs.count:SetFont(AftermathhUI.media.font, 12, AftermathhUI.media.fontflag)
  154.         if AftermathhUI.media.shadowoffset == true then
  155.             self.RaidDebuffs.count:SetShadowOffset(1, -1)
  156.             self.RaidDebuffs.count:SetShadowColor(0, 0, 0)
  157.         end
  158.         self.RaidDebuffs.count:ClearAllPoints()
  159.         self.RaidDebuffs.count:SetPoint('TOPRIGHT', self.RaidDebuffs, 2, 3)
  160.     end
  161.    
  162.     if AftermathhUI.ouf.healprediction == true then
  163.         local myBars = CreateFrame('StatusBar', nil, self.Health)
  164.         myBars:SetStatusBarTexture(AftermathhUI.media.texture)
  165.         myBars:SetStatusBarColor(0, 1, 0.5, 0.45)
  166.         myBars:SetSize(55, 38)
  167.         if AftermathhUI.ouf.raidframesvertical == true then
  168.             myBars:SetOrientation("VERTICAL")
  169.             myBars:SetPoint('BOTTOM', self.Health:GetStatusBarTexture(), 'TOP', 0, 0)
  170.             myBars:SetSize(59, 39)
  171.         else
  172.             myBars:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
  173.             myBars:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
  174.         end
  175.  
  176.         local otherBars = CreateFrame('StatusBar', nil, myBars)
  177.         otherBars:SetStatusBarTexture(AftermathhUI.media.texture)
  178.         otherBars:SetStatusBarColor(0, 0.5, 1, 0.45)
  179.         otherBars:SetSize(55, 38)
  180.         if AftermathhUI.ouf.raidframesvertical == true then
  181.             otherBars:SetOrientation("VERTICAL")
  182.             otherBars:SetPoint('BOTTOM', myBars:GetStatusBarTexture(), 'TOP', 0, 0)
  183.             otherBars:SetSize(59, 39)
  184.         else
  185.             otherBars:SetPoint('TOPLEFT', myBars:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
  186.             otherBars:SetPoint('BOTTOMLEFT', myBars:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
  187.         end
  188.        
  189.         self.HealPrediction = {
  190.             myBar = myBars,
  191.             otherBar = otherBars,
  192.             maxOverflow = 1,
  193.         }
  194.     end
  195.  
  196.     self.SpellRange = {
  197.         insideAlpha = 1,
  198.         outsideAlpha = 0.3,
  199.     }
  200.  
  201.     return self
  202. end
  203.  
  204. oUF:RegisterStyle('Aftermathh_Raid', RaidFrames)
  205. oUF:Factory(function(self)
  206.     self:SetActiveStyle('Aftermathh_Raid')
  207.    
  208.     local toStr = tostring
  209.    
  210.     if AftermathhUI.ouf.showraid == true then
  211.         for group = 1, NUM_RAID_GROUPS do
  212.             local Raid = self:SpawnHeader("AftermathhRaidGrid", nil, 'solo,party,raid',
  213.                 'showPlayer', true,
  214.                 'showRaid', true,
  215.                 'showParty', true,
  216.                 'showSolo', true,
  217.                 'xoffset', 7,
  218.                 'yOffset', 0,
  219.                 'point', 'LEFT',
  220.                 'groupFilter', toStr(group),
  221.                 'groupingOrder', '1,2,3,4,5,6,7,8',
  222.                 'groupBy', 'GROUP',
  223.                 'sortMethod', 'GROUP',
  224.                 'maxColumns', 5,
  225.                 'unitsPerColumn', 5,
  226.                 'columnSpacing', 6,
  227.                 'columnAnchorPoint', 'TOP',
  228.                 'oUF-initialConfigFunction', [[
  229.                     self:SetWidth(59)
  230.                     self:SetHeight(38)
  231.                     self:SetScale(1)
  232.                 ]]
  233.             )  
  234.             Raid:SetPoint('LEFT', UIParent, 221, -54)
  235.         end
  236.         if AftermathhUI.ouf.gridlayout == false and AftermathhUI.ouf.dpslayout == true then
  237.             local Raid = self:SpawnHeader("AftermathhRaid", nil, 'solo,party,raid',
  238.                 'showPlayer', true,
  239.                 'showRaid', true,
  240.                 'showParty', false,
  241.                 'showSolo', false,
  242.                 'xoffset', 12,
  243.                 'yOffset', -5,
  244.                 'point', 'LEFT',
  245.                 'groupFilter', '1,2,3,4,5,6,7,8',
  246.                 'groupingOrder', '1,2,3,4,5,6,7,8',
  247.                 'groupBy', 'GROUP',
  248.                 'maxColumns', 12,
  249.                 'unitsPerColumn', 5,
  250.                 'columnSpacing', 12,
  251.                 'columnAnchorPoint', 'TOP',
  252.                 'oUF-initialConfigFunction', [[
  253.                     self:SetWidth(45)
  254.                     self:SetHeight(38)
  255.                     self:SetScale(1)
  256.                 ]]
  257.             )  
  258.             Raid:SetPoint('TOPLEFT', UIParent, 10, -9)
  259.         end
  260.     end
  261. end)

Last edited by Aftermathhqt : 02-14-12 at 09:22 AM.
  Reply With Quote