Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. LoadAddOn("Blizzard_ArenaUI")
  2. ArenaEnemyFrame1:ClearAllPoints()
  3. ArenaEnemyFrame2:ClearAllPoints()
  4. ArenaEnemyFrame3:ClearAllPoints()
  5.  
  6. ArenaEnemyFrame1:SetPoint("CENTER",UIParent,"CENTER",240,40)
  7. ArenaEnemyFrame2:SetPoint("CENTER",UIParent,"CENTER",240,0)
  8. ArenaEnemyFrame3:SetPoint("CENTER",UIParent,"CENTER",240,-40)
  9.  
  10. ArenaEnemyFrame1.SetPoint = function() end
  11. ArenaEnemyFrame2.SetPoint = function() end
  12. ArenaEnemyFrame3.SetPoint = function() end
  13.  
  14. ArenaEnemyFrames:SetScale(1.6)
  15.  
  16.  
  17. hooksecurefunc("UnitFramePortrait_Update",function(self)
  18. if self.portrait then
  19. if UnitIsPlayer(self.unit) then
  20. local t = CLASS_ICON_TCOORDS[select(2, UnitClass(self.unit))]
  21. if t then
  22. self.portrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
  23. self.portrait:SetTexCoord(unpack(t))
  24. end
  25. else
  26. self.portrait:SetTexCoord(0,1,0,1)
  27. end
  28. end
  29. end)
  30.  
  31.  
  32. PlayerFrame:SetScale(1.6)
  33. TargetFrame:SetScale(1.6)
  34. BuffFrame:SetScale(1.3)
  35. FocusFrame:SetScale(1.25)
  36. FocusFrameSpellBar:SetScale(1.3)
  37.  
  38.  
  39. local ClassColorUnits = {
  40. ["target"] = {
  41. ["name"] = "TargetFrame",
  42. ["back"] = "TargetFrame",
  43. ["x-offset"] = -104,
  44. ["y-offset"] = 60,
  45. ["x-offset2"] = 6,
  46. ["y-offset2"] = -22,
  47. },
  48. ["player"] = {
  49. ["name"] = "PlayerFrame",
  50. ["back"] = "PlayerFrameBackground",
  51. ["x-offset"] = 0,
  52. ["y-offset"] = 22,
  53. ["x-offset2"] = 0,
  54. ["y-offset2"] = 0,
  55. },
  56. ["focus"] = {
  57. ["name"] = "FocusFrame",
  58. ["back"] = "FocusFrame",
  59. ["x-offset"] = -104,
  60. ["y-offset"] = 60,
  61. ["x-offset2"] = 6,
  62. ["y-offset2"] = -22,
  63. },
  64. }
  65. local function updateClassColor(unit)
  66. if(unit and UnitExists(unit)) then
  67. local _,class = UnitClass(unit)
  68. if(class and RAID_CLASS_COLORS[class]) then
  69. if(ClassColorUnits[unit]) then
  70. local uf = _G[ClassColorUnits[unit]['name']]
  71. local bg = _G[ClassColorUnits[unit]['back']]
  72. if(not uf['unitClassColorBack']) then
  73. uf['unitClassColorBack'] = uf:CreateTexture(nil, "ARTWORK")
  74. uf['unitClassColorBack']:SetPoint("TOPLEFT", bg, ClassColorUnits[unit]['x-offset2'], ClassColorUnits[unit]['y-offset2'])
  75. uf['unitClassColorBack']:SetPoint("BOTTOMRIGHT", bg, ClassColorUnits[unit]['x-offset'], ClassColorUnits[unit]['y-offset'])
  76. uf['unitClassColorBack']:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
  77. end
  78. local col = RAID_CLASS_COLORS[class]
  79. uf['unitClassColorBack']:SetVertexColor(col['r'], col['g'], col['b'])
  80. end
  81. end
  82. end
  83. end
  84.  
  85. local frame = CreateFrame("Frame")
  86. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  87. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  88. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  89. frame:SetScript("OnEvent", function(self, event)
  90. if(event=="PLAYER_FOCUS_CHANGED") then
  91. updateClassColor('focus')
  92. elseif(event=="PLAYER_TARGET_CHANGED") then
  93. updateClassColor('target')
  94. elseif(event=="PLAYER_ENTERING_WORLD") then
  95. updateClassColor('player')
  96. self:UnregisterEvent(event)
  97. end
  98. end)
  99.  
  100. UFP = "UnitFramePortrait_Update"; UICC = "Interface\\TargetingFrame\\UI-Classes-Circles"; CIT = CLASS_ICON_TCOORDS
  101. hooksecurefunc(UFP,function(self) if self.portrait then local t = CIT[select(2,UnitClass(self.unit))] if t then self.portrait:SetTexture(UICC) self.portrait:SetTexCoord(unpack(t)) end end end)
  102.  
  103. local UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS =
  104. UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS
  105. local _, class, c
  106.  
  107. local function colour(statusbar, unit)
  108. if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
  109. _, class = UnitClass(unit)
  110. c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
  111. statusbar:SetStatusBarColor(c.r, c.g, c.b)
  112. end
  113. end
  114.  
  115. hooksecurefunc("UnitFrameHealthBar_Update", colour)
  116. hooksecurefunc("HealthBar_OnValueChanged", function(self)
  117. colour(self, self.unit)
  118. end)
  119.  
  120. local sb = _G.GameTooltipStatusBar
  121. local addon = CreateFrame("Frame", "StatusColour")
  122. addon:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
  123. addon:SetScript("OnEvent", function()
  124. colour(sb, "mouseover")
  125. end)
  126.  
  127.  
  128. for i=1, 12 do
  129. _G["ActionButton"..i.."HotKey"]:SetAlpha(0) -- main bar
  130. _G["MultiBarBottomRightButton"..i.."HotKey"]:SetAlpha(0) -- bottom right bar
  131. _G["MultiBarBottomLeftButton"..i.."HotKey"]:SetAlpha(0) -- bottom left bar
  132. _G["MultiBarRightButton"..i.."HotKey"]:SetAlpha(0) -- right bar
  133. _G["MultiBarLeftButton"..i.."HotKey"]:SetAlpha(0) -- left bar
  134. end
  135.  
  136. for i=1,4 do
  137. local f = _G["PartyMemberFrame"..i]
  138. f:UnregisterEvent("UNIT_AURA")
  139. local g = CreateFrame("Frame")
  140. g:RegisterEvent("UNIT_AURA")
  141. g:SetScript("OnEvent",function(self,event,a1)
  142. if a1 == f.unit then
  143. RefreshDebuffs(f,a1,20,nil,1)
  144. else
  145. if a1 == f.unit.."pet" then
  146. PartyMemberFrame_RefreshPetDebuffs(f)
  147. end
  148. end
  149. end)
  150. local b = _G[f:GetName().."Debuff1"]
  151. b:ClearAllPoints()
  152. b:SetPoint("LEFT",f,"RIGHT",-7,5)
  153. for j=5,20 do
  154. local l = f:GetName().."Debuff"
  155. local n = l..j
  156. local c = CreateFrame("Frame",n,f,"PartyDebuffFrameTemplate")
  157. c:SetPoint("LEFT",_G[l..(j-1)],"RIGHT")
  158. end
  159. end
  160.  
  161. for i=1,4 do
  162. local f = _G["PartyMemberFrame"..i]
  163. f:UnregisterEvent("UNIT_AURA")
  164. local g = CreateFrame("Frame")
  165. g:RegisterEvent("UNIT_AURA")
  166. g:SetScript("OnEvent",function(self,event,a1)
  167. if a1 == f.unit then
  168. RefreshBuffs(f,a1,20,nil,1)
  169. end
  170. end)
  171. for j=1,20 do
  172. local l = f:GetName().."Buff"
  173. local n = l..j
  174. local c = CreateFrame("Frame",n,f,"TargetBuffFrameTemplate")
  175. c:EnableMouse(false)
  176. if j == 1 then
  177. c:SetPoint("TOPLEFT",48,-32)
  178. else
  179. c:SetPoint("LEFT",_G[l..(j-1)],"RIGHT",1,0)
  180. end
  181. end
  182. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement