Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. -- Casting Bar
  2. SBF={CastingBarFrame,TargetFrameSpellBar,FocusFrameSpellBar}
  3. for i,v in pairs(SBF) do
  4. v.Border:Hide()
  5. v.Text:ClearAllPoints()
  6. v.Text:SetPoint("CENTER",v)
  7. v.Text:SetFont(STANDARD_TEXT_FONT,14,"OUTLINE")
  8. v:SetSize(208,21)
  9. v.Icon:Show()
  10. v.Icon:SetSize(25,25)
  11. v.Icon:SetPoint("RIGHT",v,30,0)
  12. v:HookScript("OnShow",function (self)
  13. if self.BorderShield then
  14. self.BorderShield:SetSize(273,65)
  15. self.BorderShield:ClearAllPoints()
  16. self.BorderShield:SetPoint("CENTER",self,5,0)
  17. end
  18. end)
  19. v.Flash.Show=function() return end
  20. end
  21. CBF={CastingBarFrame}
  22. for i,v in pairs(CBF) do
  23. v:SetSize(230,28)
  24. v:ClearAllPoints()
  25. v:SetPoint("CENTER",0,-175)
  26. v.SetPoint = function() end
  27. v.Icon:SetSize(33,33)
  28. v.Icon:SetPoint("RIGHT",v,40,0)
  29. end
  30. FSB={TargetFrameSpellBar,FocusFrameSpellBar}
  31. for i,v in pairs(FSB) do
  32. v:HookScript("OnShow",function (self)
  33. Target_Spellbar_AdjustPosition(self)
  34. end)
  35. end
  36. function Target_Spellbar_AdjustPosition(self)
  37. local parentFrame = self:GetParent();
  38. if ( self.boss ) then
  39. self:SetPoint("TOPLEFT", parentFrame, "BOTTOMLEFT", 5, 10 );
  40. elseif ( parentFrame.haveToT ) then
  41. if ( parentFrame.buffsOnTop or parentFrame.auraRows <= 1 ) then
  42. self:SetPoint("TOPLEFT", parentFrame, "BOTTOMLEFT", 5, -21 );
  43. else
  44. self:SetPoint("TOPLEFT", parentFrame.spellbarAnchor, "BOTTOMLEFT", 0, -15);
  45. end
  46. elseif ( parentFrame.haveElite ) then
  47. if ( parentFrame.buffsOnTop or parentFrame.auraRows <= 1 ) then
  48. self:SetPoint("TOPLEFT", parentFrame, "BOTTOMLEFT", 5, -5 );
  49. else
  50. self:SetPoint("TOPLEFT", parentFrame.spellbarAnchor, "BOTTOMLEFT", 0, -15);
  51. end
  52. else
  53. if ( (not parentFrame.buffsOnTop) and parentFrame.auraRows > 0 ) then
  54. self:SetPoint("TOPLEFT", parentFrame.spellbarAnchor, "BOTTOMLEFT", 0, -15);
  55. else
  56. self:SetPoint("TOPLEFT", parentFrame, "BOTTOMLEFT", 5, 7 );
  57. end
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement