fix leak of global values

This commit is contained in:
Pinya
2018-07-18 15:08:04 +03:00
parent c60324af12
commit 8b44916c87
9 changed files with 11 additions and 8 deletions
+3 -2
View File
@@ -208,7 +208,8 @@ function E:GetFormattedText(style, min, max)
if max == 0 then max = 1 end
gftDec = E.db.general.decimalLength or 1
local gftUseStyle
local gftDec = E.db.general.decimalLength or 1
if gftDec ~= 1 and find(style, "PERCENT") then
gftUseStyle = gsub(styles[style], "%%%.1f%%%%", "%%."..gftDec.."f%%%%")
else
@@ -216,7 +217,7 @@ function E:GetFormattedText(style, min, max)
end
if style == "DEFICIT" then
gftDeficit = max - min
local gftDeficit = max - min
return ((gftDeficit > 0) and format(gftUseStyle, E:ShortValue(gftDeficit))) or ""
elseif style == "PERCENT" then
return format(gftUseStyle, min / max * 100)
+1
View File
@@ -21,6 +21,7 @@ local SendAddonMessage = SendAddonMessage
local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local _
_, E.myclass = UnitClass("player") -- Constants
_, E.myrace = UnitRace("player")
_, E.myfaction = UnitFactionGroup("player")
+1 -1
View File
@@ -123,7 +123,7 @@ end
local function strsplit(delim, s, n)
if n and n < 2 then return s end
beg = beg or 1
local beg = beg or 1
local i,j = string.find(s,delim,beg)
if not i then
return s, nil
+1 -1
View File
@@ -248,7 +248,7 @@ function B:UpdateSlot(bagID, slotID)
if B.ProfessionColors[bagType] then
slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType]))
elseif clink then
local iLvl, itemEquipLoc
local _, iLvl, itemEquipLoc
slot.name, _, slot.rarity, iLvl, _, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
local r, g, b
+1 -1
View File
@@ -68,7 +68,7 @@ local function LoadSkin()
S:SecureHookScript(containerFrame, "OnShow", "ContainerFrame_Update")
local itemButton, itemButtonIcon
local itemButton, itemButtonIcon, itemButtonCooldown
for k = 1, MAX_CONTAINER_ITEMS, 1 do
itemButton = _G["ContainerFrame"..i.."Item"..k]
itemButtonIcon = _G["ContainerFrame"..i.."Item"..k.."IconTexture"]
+1 -1
View File
@@ -20,7 +20,7 @@ for k, v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do
localizedTable[v] = k
end
function LoadSkin()
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.friends ~= true then return end
-- Friends Frame
+1
View File
@@ -112,6 +112,7 @@ local function LoadSkin()
local function QuestQualityColors(frame, text, quality, link)
if link and not quality then
local _
_, _, quality = GetItemInfo(match(link, "item:(%d+)"))
end
+1 -1
View File
@@ -8,7 +8,7 @@ local pairs = pairs
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
function LoadSkin()
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.raid ~= true then return end
-- RaidFrame
+1 -1
View File
@@ -10,7 +10,7 @@ local HasPetUI = HasPetUI
local hooksecurefunc = hooksecurefunc
local UnitExists = UnitExists
function LoadSkin()
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.stable ~= true then return end
E:StripTextures(PetStableFrame)