Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup.

  • Loading branch information...
commit 16d5d72b0b1eb1d9949628bcb5cf3cfe02aba8e8 1 parent c8139d2
@Shestak authored
View
116 ShestakUI/Core/Functions.lua
@@ -66,121 +66,6 @@ T.RGBToHex = function(r, g, b)
end
----------------------------------------------------------------------------------------
--- Pet and shapeshift bars style function
-----------------------------------------------------------------------------------------
-T.ShiftBarUpdate = function()
- local numForms = GetNumShapeshiftForms()
- local texture, name, isActive, isCastable
- local button, icon, cooldown
- local start, duration, enable
- for i = 1, NUM_SHAPESHIFT_SLOTS do
- button = _G["ShapeshiftButton"..i]
- icon = _G["ShapeshiftButton"..i.."Icon"]
- if i <= numForms then
- texture, name, isActive, isCastable = GetShapeshiftFormInfo(i)
- icon:SetTexture(texture)
-
- cooldown = _G["ShapeshiftButton"..i.."Cooldown"]
- if texture then
- cooldown:SetAlpha(1)
- else
- cooldown:SetAlpha(0)
- end
-
- start, duration, enable = GetShapeshiftFormCooldown(i)
- CooldownFrame_SetTimer(cooldown, start, duration, enable)
-
- if isActive then
- ShapeshiftBarFrame.lastSelected = button:GetID()
- button:SetChecked(1)
- else
- button:SetChecked(0)
- end
-
- if isCastable then
- icon:SetVertexColor(1.0, 1.0, 1.0)
- else
- icon:SetVertexColor(0.4, 0.4, 0.4)
- end
- end
- end
-end
-
-T.PetBarUpdate = function(self, event)
- local petActionButton, petActionIcon, petAutoCastableTexture, petAutoCastShine
- for i = 1, NUM_PET_ACTION_SLOTS, 1 do
- local buttonName = "PetActionButton" .. i
- petActionButton = _G[buttonName]
- petActionIcon = _G[buttonName.."Icon"]
- petAutoCastableTexture = _G[buttonName.."AutoCastable"]
- petAutoCastShine = _G[buttonName.."Shine"]
- local name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i)
-
- if not isToken then
- petActionIcon:SetTexture(texture)
- petActionButton.tooltipName = name
- else
- petActionIcon:SetTexture(_G[texture])
- petActionButton.tooltipName = _G[name]
- end
-
- petActionButton.isToken = isToken
- petActionButton.tooltipSubtext = subtext
-
- if isActive and name ~= "PET_ACTION_FOLLOW" then
- petActionButton:SetChecked(1)
- if IsPetAttackAction(i) then
- PetActionButton_StartFlash(petActionButton)
- end
- else
- petActionButton:SetChecked(0)
- if IsPetAttackAction(i) then
- PetActionButton_StopFlash(petActionButton)
- end
- end
-
- if autoCastAllowed then
- petAutoCastableTexture:Show()
- else
- petAutoCastableTexture:Hide()
- end
-
- if autoCastEnabled then
- AutoCastShine_AutoCastStart(petAutoCastShine)
- else
- AutoCastShine_AutoCastStop(petAutoCastShine)
- end
-
- if name then
- if not C.actionbar.show_grid then
- petActionButton:SetAlpha(1)
- end
- else
- if not C.actionbar.show_grid then
- petActionButton:SetAlpha(0)
- end
- end
-
- if texture then
- if GetPetActionSlotUsable(i) then
- SetDesaturation(petActionIcon, nil)
- else
- SetDesaturation(petActionIcon, 1)
- end
- petActionIcon:Show()
- else
- petActionIcon:Hide()
- end
-
- if not PetHasActionBar() and texture and name ~= "PET_ACTION_FOLLOW" then
- PetActionButton_StopFlash(petActionButton)
- SetDesaturation(petActionIcon, 1)
- petActionButton:SetChecked(0)
- end
- end
-end
-
-----------------------------------------------------------------------------------------
-- Player's Role and Talents spent
----------------------------------------------------------------------------------------
T.CheckForKnownTalent = function(spellid)
@@ -532,6 +417,7 @@ end)
----------------------------------------------------------------------------------------
-- Unit frames functions
----------------------------------------------------------------------------------------
+if C.unitframe.enable ~= true then return end
local _, ns = ...
local oUF = ns.oUF
View
2  ShestakUI/Modules/ActionBars/Bindings.lua
@@ -1,5 +1,5 @@
local T, C, L = unpack(select(2, ...))
-if IsAddOnLoaded("ncHoverBind") then return end
+if C.actionbar.enable ~= true or IsAddOnLoaded("ncHoverBind") then return end
----------------------------------------------------------------------------------------
-- Binding buttons(ncHoverBind by nightcracker)
Please sign in to comment.
Something went wrong with that request. Please try again.