Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if C["unitframes"].classbar then
- if T.myclass == "DRUID" then
- local eclipseBar = CreateFrame('Frame', nil, self)
- eclipseBar:Point("BOTTOM", self, "TOP", 0, 3)
- eclipseBar:Size(frameWidth+4, 8)
- eclipseBar:SetFrameStrata("MEDIUM")
- eclipseBar:SetFrameLevel(8)
- eclipseBar:SetTemplate("Default")
- eclipseBar:SetBackdropColor(0,0,0)
- eclipseBar:SetScript("OnShow", function() T.EclipseDisplay(self, false) end)
- eclipseBar:SetScript("OnUpdate", function() T.EclipseDisplay(self, true) end) -- just forcing 1 update on login for buffs/shadow/etc.
- eclipseBar:SetScript("OnHide", function() T.EclipseDisplay(self, false) end)
- local lunarBar = CreateFrame('StatusBar', nil, eclipseBar)
- lunarBar:SetPoint('LEFT', eclipseBar, 'LEFT', 2, 0)
- lunarBar:SetSize(eclipseBar:GetWidth()-4, eclipseBar:GetHeight()-4)
- lunarBar:SetStatusBarTexture(normTex)
- lunarBar:SetStatusBarColor(.30, .52, .90)
- eclipseBar.LunarBar = lunarBar
- local solarBar = CreateFrame('StatusBar', nil, eclipseBar)
- solarBar:SetPoint('LEFT', lunarBar:GetStatusBarTexture(), 'RIGHT', 0, 0)
- solarBar:SetSize(eclipseBar:GetWidth()-4, eclipseBar:GetHeight()-4)
- solarBar:SetStatusBarTexture(normTex)
- solarBar:SetStatusBarColor(.80, .82, .60)
- eclipseBar.SolarBar = solarBar
- local eclipseBarText = eclipseBar:CreateFontString(nil, 'OVERLAY')
- eclipseBarText:SetPoint('TOP', panel)
- eclipseBarText:SetPoint('BOTTOM', panel)
- eclipseBarText:SetFont(font, fontsize, fontflags)
- eclipseBar.PostUpdatePower = T.EclipseDirection
- -- hide "low mana" text on load if eclipseBar is show
- if eclipseBar and eclipseBar:IsShown() then FlashInfo.ManaLevel:SetAlpha(0) end
- self.EclipseBar = eclipseBar
- self.EclipseBar.Text = eclipseBarText
- end
- -- set holy power bar or shard bar
- if (T.myclass == "WARLOCK" or T.myclass == "PALADIN") then
- local bars = CreateFrame("Frame", nil, self)
- bars:SetPoint("BOTTOM", self, "TOP", 0, 3)
- bars:Width(frameWidth+4)
- bars:Height(8)
- bars:SetTemplate("ThickBorder")
- bars:SetFrameLevel(2)
- bars:SetBackdropColor(0,0,0)
- for i = 1, 3 do
- bars[i]=CreateFrame("StatusBar", self:GetName().."_Shard"..i, self)
- bars[i]:Height(bars:GetHeight()-4)
- bars[i]:Width((frameWidth-2)/3)
- bars[i]:SetStatusBarTexture(normTex)
- bars[i]:GetStatusBarTexture():SetHorizTile(false)
- bars[i].bg = bars[i]:CreateTexture(nil, 'BORDER')
- if T.myclass == "WARLOCK" then
- bars[i]:SetStatusBarColor(255/255,101/255,101/255)
- bars[i].bg:SetTexture(255/255,101/255,101/255)
- elseif T.myclass == "PALADIN" then
- bars[i]:SetStatusBarColor(228/255,225/255,16/255)
- bars[i].bg:SetTexture(228/255,225/255,16/255)
- end
- if i == 1 then
- bars[i]:SetPoint("LEFT", bars, "LEFT", 2, 0)
- bars[i]:Width(bars[i]:GetWidth()+1)
- bars[i].bg:SetAllPoints(bars[i])
- else
- bars[i]:Point("LEFT", bars[i-1], "RIGHT", 1, 0)
- bars[i].bg:SetAllPoints(bars[i])
- end
- bars[i].bg:SetTexture(normTex)
- bars[i].bg:SetAlpha(.15)
- end
- if T.myclass == "WARLOCK" then
- bars.Override = T.UpdateShards
- self.SoulShards = bars
- elseif T.myclass == "PALADIN" then
- bars.Override = T.UpdateHoly
- self.HolyPower = bars
- end
- end
- -- deathknight runes
- if T.myclass == "DEATHKNIGHT" then
- local Runes = CreateFrame("Frame", nil, self)
- Runes:Point("BOTTOMLEFT", self, "TOPLEFT", 0,3)
- Runes:Height(8)
- Runes:SetWidth(frameWidth+4)
- Runes:SetTemplate("Default")
- Runes:SetBackdropColor(0, 0, 0)
- for i = 1, 6 do
- Runes[i] = CreateFrame("StatusBar", self:GetName().."_Runes"..i, health)
- Runes[i]:Height(Runes:GetHeight()-4)
- Runes[i]:Width((frameWidth-5)/6)
- if (i == 1) then
- Runes[i]:Point("LEFT", Runes, "LEFT", 2, 0)
- Runes[i]:Width(Runes[i]:GetWidth()+1)
- else
- Runes[i]:Point("TOPLEFT", Runes[i-1], "TOPRIGHT", 1, 0)
- end
- Runes[i]:SetStatusBarTexture(normTex)
- Runes[i]:GetStatusBarTexture():SetHorizTile(false)
- end
- self.Runes = Runes
- end
- -- shaman totem bar
- if T.myclass == "SHAMAN" then
- local TotemFrame = CreateFrame("Frame", self:GetName().."_TotemFrame", self)
- TotemFrame:SetPoint("BOTTOM", self, "TOP", 0, 3)
- TotemFrame:Width(frameWidth+4)
- TotemFrame:Height(8)
- TotemFrame:SetTemplate("ThickBorder")
- TotemFrame:SetFrameLevel(2)
- TotemFrame:SetBackdropColor(0,0,0)
- local TotemBar = {}
- TotemBar.Destroy = true
- for i = 1, 4 do
- TotemBar[i] = CreateFrame("StatusBar", self:GetName().."_TotemBar"..i, self)
- if (i == 1) then
- TotemBar[i]:SetPoint("LEFT", TotemFrame, "LEFT", 2, 0)
- else
- TotemBar[i]:SetPoint("TOPLEFT", TotemBar[i-1], "TOPRIGHT", TukuiDB.Scale(1), 0)
- end
- TotemBar[i]:SetStatusBarTexture(normTex)
- TotemBar[i]:Width((TotemFrame:GetWidth()-7) / 4)
- TotemBar[i]:Height(TotemFrame:GetHeight()-4)
- TotemBar[i]:SetFrameLevel(3)
- TotemBar[i]:SetMinMaxValues(0, 1)
- TotemBar[i].bg = TotemBar[i]:CreateTexture(nil, "BORDER")
- TotemBar[i].bg:SetAllPoints(TotemBar[i])
- TotemBar[i].bg:SetTexture(normTex)
- TotemBar[i].bg.multiplier = 0.1
- end
- self.TotemBar = TotemBar
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement