SHARE
TWEET

Player.lua

a guest Apr 25th, 2019 119 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local T, C, L = Tukui:unpack()
  2.  
  3. ------------------------------------------------------------------------
  4. --  local variables
  5. ------------------------------------------------------------------------
  6.  
  7. local TukuiUnitFrames = T["UnitFrames"]
  8. local Noop = function() end
  9. local Class = select(2, UnitClass("player"))
  10.  
  11. local baseCreateUnits = TukuiUnitFrames.CreateUnits
  12. local basePlayer = TukuiUnitFrames.Player
  13.  
  14. function TukuiUnitFrames:CreateUnits()
  15.     -- Call the base function first
  16.     baseCreateUnits(self)
  17.    
  18.     -- Then my stuff
  19.     local Player = UnitFrames.Units.Player
  20.  
  21.     Player:SetHeight(23)
  22.     Player:SetWidth(240)
  23.    
  24.     Player.Shadow:Kill()
  25.    
  26.     Player:ClearAllPoints()
  27.     Player:SetPoint("BOTTOMLEFT", PatBar1, "TOPLEFT", -160, 50)
  28. end
  29.  
  30. function TukuiUnitFrames:Player(self)
  31.     -- Call the base function first
  32.     basePlayer(self)
  33.    
  34.     -- Then my stuff
  35.     local Panel = self.Panel
  36.     local Health = self.Health
  37.     local Power = self.Power
  38.     local AdditionalPower = self.AdditionalPower
  39.     local Castbar = self.Castbar
  40.     local Portrait = self.Portrait
  41.     local CombatFeedbackText = self.CombatFeedbackText
  42.     local RaidIcon = self.RaidTargetIndicator
  43.     local Combat = self.CombatIndicator
  44.     local MasterLooter = self.MasterLooterIndicator
  45.     local Leader = self.LeaderIndicator
  46.     local TotemBar = self.Totems
  47.     ComboPointsBar = self.ComboPointsBar
  48.     local myBar = self.HealthPrediction.myBar
  49.     local otherBar = self.HealthPrediction.otherBar
  50.     local absorbBar = self.HealthPrediction.absorbBar
  51.     local PowerPrediction = self.PowerPrediction.mainBar
  52.     local AdditionalPowerPrediction = self.PowerPrediction.altBar
  53.    
  54.     Panel:Hide()
  55.    
  56.     Health:SetHeight(23)
  57.     Health:CreateShadow()
  58.    
  59.     Health.Value:ClearAllPoints()
  60.     Health.Value:Point("LEFT", Health, "LEFT", 4, 0)
  61.    
  62.     Health:SetStatusBarColor(.2, .2, .2)
  63.     Health.Background:SetColorTexture(.1, .1, .1)
  64.    
  65.     Health.colorClass = false
  66.     Health.colorReaction = false
  67.    
  68.     Power:ClearAllPoints()
  69.     Power:Point("TOPRIGHT", Health, "BOTTOMRIGHT", -4, 1)
  70.     Power:SetHeight(3)
  71.     Power:SetWidth(90)
  72.     Power:SetFrameLevel(10)
  73.     Power:CreateBackdrop("Default")
  74.     Power:CreateShadow()
  75.     Power.Background:Hide()
  76.    
  77.     Power.Value:ClearAllPoints()
  78.     Power.Value:Point("RIGHT", Health, "RIGHT", -4, 0)
  79.     Power.Value:SetShadowOffset(0, 0)
  80.  
  81.     Castbar:ClearAllPoints()
  82.     Castbar:SetSize((PatBar1:GetWidth()) - 2, 12)
  83.     Castbar:SetPoint("BOTTOMRIGHT", PatBar1, "TOPRIGHT", -1, 3)
  84.     Castbar:CreateBackdrop("Transparent")
  85.     Castbar.Background:Hide()
  86.    
  87.     Castbar.Time:ClearAllPoints()
  88.     Castbar.Time:Point("RIGHT", Castbar, "RIGHT", -4, 1)
  89.  
  90.     Castbar.Text:ClearAllPoints()
  91.     Castbar.Text:Point("LEFT", Castbar, "LEFT", 4, 1)
  92.     Castbar.Text:Size(160, 10) -- prevent long cast names (ex: Bloodbathed Frostbrood Vanquisher) from wrapping and going outside of the castbar
  93.    
  94.     Combat:ClearAllPoints()
  95.     Combat:Point("CENTER", Health, "CENTER", 0, 0)
  96.    
  97.     CombatFeedbackText:ClearAllPoints()
  98.    
  99.     AdditionalPower:ClearAllPoints()
  100.     AdditionalPower:SetPoint("BOTTOM", Health, "TOP", 0, 3)
  101.     AdditionalPower:SetFrameLevel(3)
  102.     AdditionalPower:CreateShadow()
  103.     AdditionalPower:SetFrameStrata("BACKGROUND")
  104.     AdditionalPower:Width(240)
  105.     AdditionalPower:Height(5)
  106.    
  107.     if (Class == "ROGUE" or Class == "DRUID") then
  108.        
  109.         ComboPointsBar:ClearAllPoints()
  110.         ComboPointsBar:Size(240, 5)
  111.         ComboPointsBar:SetFrameLevel(15)
  112.         ComboPointsBar:SetAlpha(1)
  113.         ComboPointsBar:SetBackdrop(nil)
  114.         ComboPointsBar:CreateBackdrop("Transparent")
  115.        
  116.         ComboPointsBar:SetPoint("BOTTOM", Health, "TOP", 0, 3)
  117.        
  118.         for i = 1, 6 do
  119.         ComboPointsBar[i]:ClearAllPoints()
  120.         ComboPointsBar[i]:CreateBackdrop()
  121.         ComboPointsBar[i]:Height(5)
  122.  
  123.             if i == 1 then
  124.                 ComboPointsBar[i]:Point("LEFT", ComboPointsBar, "LEFT", 0, 0)
  125.                 ComboPointsBar[i]:SetWidth(32)
  126.                 ComboPointsBar[i].BarSizeForMaxComboIs6 = 40
  127.                 ComboPointsBar[i].BarSizeForMaxComboIs5 = 48
  128.             else
  129.                 ComboPointsBar[i]:Point("LEFT", ComboPointsBar[i-1], "RIGHT", 1, 0)
  130.                 ComboPointsBar[i]:SetWidth(32)
  131.                 ComboPointsBar[i].BarSizeForMaxComboIs6 = 39
  132.                 ComboPointsBar[i].BarSizeForMaxComboIs5 = 47
  133.             end
  134.         end
  135.     end
  136.    
  137. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top