Skip to content
Permalink
Browse files

Cleanup.

  • Loading branch information...
Shestak committed Aug 18, 2015
1 parent f566d9c commit 231a22884881dfa1e5a5b102a4e233b72f96bf7d
Showing with 37 additions and 37 deletions.
  1. +34 −34 ShestakUI/Core/Functions.lua
  2. +3 −3 ShestakUI/Modules/Skins/Blizzard/Others.lua
@@ -1045,41 +1045,41 @@ T.UpdateReputationColor = function(self, event, unit, bar)
end

T.UpdateComboPoint = function(self, event, unit)
if unit == "pet" then return end

local cpoints = self.CPoints
local cp = (UnitHasVehicleUI("player") or UnitHasVehicleUI("vehicle")) and UnitPower("vehicle", 4) or UnitPower("player", 4)

for i = 1, MAX_COMBO_POINTS do
if i <= cp then
cpoints[i]:SetAlpha(1)
else
cpoints[i]:SetAlpha(0.2)
end
end

if (T.class == "DRUID" and C.unitframe_class_bar.comboalways ~= true) then
local CatForm = function(self, event, unit)
local unit = self.unit or "player"
local name = UnitBuff(unit, GetSpellInfo(768)) or UnitBuff(unit, GetSpellInfo(171745))
if name then
cpoints:Show()
if unit == "pet" then return end

local cpoints = self.CPoints
local cp = (UnitHasVehicleUI("player") or UnitHasVehicleUI("vehicle")) and UnitPower("vehicle", 4) or UnitPower("player", 4)

for i = 1, MAX_COMBO_POINTS do
if i <= cp then
cpoints[i]:SetAlpha(1)
else
cpoints[i]:SetAlpha(0.2)
end
end

if T.class == "DRUID" and C.unitframe_class_bar.comboalways ~= true then
local CatForm = function(self, event, unit)
local unit = self.unit or "player"
local name = UnitBuff(unit, GetSpellInfo(768)) or UnitBuff(unit, GetSpellInfo(171745))
if name then
cpoints:Show()
if self.Debuffs then self.Debuffs:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", 2, 19) end
else
cpoints:Hide()
else
cpoints:Hide()
if self.Debuffs then self.Debuffs:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", 2, 5) end
end
end

local CheckForm = CreateFrame("Frame", self:GetName().."_CheckForm", cpoints)
CheckForm:RegisterEvent("UNIT_AURA")
CheckForm:RegisterEvent("PLAYER_LOGIN")
CheckForm:RegisterEvent("PLAYER_ENTERING_WORLD")
CheckForm:SetScript("OnEvent", CatForm)
CheckForm:SetScript("OnUpdate", CatForm)
CheckForm:SetScript("OnShow", CatForm)
CheckForm:SetScript("OnHide", CatForm)
end
end
end

local CheckForm = CreateFrame("Frame", self:GetName().."_CheckForm", cpoints)
CheckForm:RegisterEvent("UNIT_AURA")
CheckForm:RegisterEvent("PLAYER_LOGIN")
CheckForm:RegisterEvent("PLAYER_ENTERING_WORLD")
CheckForm:SetScript("OnEvent", CatForm)
CheckForm:SetScript("OnUpdate", CatForm)
CheckForm:SetScript("OnShow", CatForm)
CheckForm:SetScript("OnHide", CatForm)
end
end

local ticks = {}
@@ -1501,4 +1501,4 @@ T.CreateAuraWatch = function(self, unit)
end

self.AuraWatch = auras
end
end
@@ -266,9 +266,9 @@ SkinBlizzUI:SetScript("OnEvent", function(self, event, addon)
_G["ChannelPulloutTabMiddle"]:SetTexture(nil)
_G["ChannelPulloutTabRight"]:SetTexture(nil)
_G["StaticPopup1CloseButton"]:HookScript("OnShow", function(self)
self:StripTextures(true)
T.SkinCloseButton(self, nil, "-")
end)
self:StripTextures(true)
T.SkinCloseButton(self, nil, "-")
end)
T.SkinCloseButton(_G["ChannelPulloutCloseButton"])
T.SkinCloseButton(_G["RolePollPopupCloseButton"])
T.SkinCloseButton(_G["ItemRefCloseButton"])

0 comments on commit 231a228

Please sign in to comment.
You can’t perform that action at this time.