Skip to content

Commit

Permalink
Don't leak globals.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wetxius committed Sep 20, 2019
1 parent de8d430 commit 30d748b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ShestakUI/Modules/Misc/Archaeology.lua
Expand Up @@ -233,7 +233,7 @@ function stArch:UpdateFrameHeight(self)
end
end

function IsArchaeologist()
local function IsArchaeologist()
local _, _, arch = GetProfessions()
if arch then
return true
Expand Down
5 changes: 3 additions & 2 deletions ShestakUI/Modules/Misc/ClickCast.lua
Expand Up @@ -18,6 +18,7 @@ SpellBinder.title:SetText(L_MISC_BINDER_OPEN)
SpellBinder.sbOpen = false
SpellBinder.spellbuttons = {}

local DB
ClickCastFrames = _G.ClickCastFrames or {}
for _, v in pairs({
"PlayerFrame", "PetFrame",
Expand Down Expand Up @@ -70,7 +71,7 @@ SpellBinder.makeSpellsList = function(self, scroll, delete)
scroll:SetSize(270, 300)

if delete then
i = 1
local i = 1
while _G[i.."_cbs"] do
_G[i.."_fs"]:SetText("")
_G[i.."_texture"]:SetTexture(nil)
Expand All @@ -82,7 +83,7 @@ SpellBinder.makeSpellsList = function(self, scroll, delete)
end

for i, spell in ipairs(DB.spells) do
v = spell.spell
local v = spell.spell
if v and GetSpellBookItemName(v) then
local bf = _G[i.."_cbs"] or CreateFrame("Button", i.."_cbs", scroll)
spell.checked = spell.checked or false
Expand Down
4 changes: 2 additions & 2 deletions ShestakUI/Modules/Misc/Threat.lua
Expand Up @@ -96,8 +96,8 @@ local UpdateBars = function()
end
table.sort(barList, SortMethod)
for i = 1, #barList do
cur = tList[barList[i]]
max = tList[barList[1]]
local cur = tList[barList[i]]
local max = tList[barList[1]]
if i > C.threat.bar_rows or not cur or cur.pct == 0 then break end
if not bar[i] then
bar[i] = CreateBar()
Expand Down

0 comments on commit 30d748b

Please sign in to comment.