- CS fixes

- Local variable fixes
This commit is contained in:
2016-09-06 17:51:08 +02:00
parent 6352b997d1
commit 4d657ecee1

View File

@ -93,8 +93,8 @@ local function GetBattlePetInfoFromLink(l)
local id, lvl, rar, hp, pw, sp, n
if (strfind(l, "Hbattlepet")) then
-- "|cff0070dd|Hbattlepet:1178:1:3:152:13:10:0x0000000000000000|h[Sunreaver Micro-Sentry]|h|r"
local c, num, u
c, id, lvl, rar, hp, pw, sp, u, n = select(3, strfind(l, "|cff(%x+)|Hbattlepet:(%-?%d+):(%d+):(%d+):(%d+):(%d+):(%d+):([^|]+)|h%[(.-)%]|h|r"))
local u
id, lvl, rar, hp, pw, sp, u, n = select(4, strfind(l, "|cff(%x+)|Hbattlepet:(%-?%d+):(%d+):(%d+):(%d+):(%d+):(%d+):([^|]+)|h%[(.-)%]|h|r"))
end
return tonum(id), tonum(lvl), tonum(rar), tonum(hp), tonum(pw), tonum(sp), n
@ -159,7 +159,6 @@ local function ParseWords(str, pat)
end
local list = {}
local word
for word in strgmatch(str, pat or "%S+") do
tinsert(list, word)
@ -222,9 +221,11 @@ function MyBagsCore:OnEmbedInitialize(addon)
if val == true then
val = 1
end
if (map) then
val = map[val or 0] or val
end
AC:Printf(format(L["ACE_CMD_RESULT"], addon.name, text .. " " .. L["ACEG_TEXT_NOW_SET_TO"] .. " " .. format(L["ACEG_DISPLAY_OPTION"], val or L["ACE_CMD_REPORT_NO_VAL"])))
end
@ -240,7 +241,6 @@ function MyBagsCore:OnEmbedInitialize(addon)
addon.frame = _G[addon.frameName]
addon.frame.self = addon
local inOptions = false
local key, value
for key, value in pairs(INTERFACEOPTIONS_ADDONCATEGORIES) do
if value.name == "MyBags" then
inOptions = true
@ -343,7 +343,6 @@ function MyBagsCore:CloseBag(bag)
end
function MyBagsCore:SetUISpecialFrames()
local k, v
if self.GetOpt("NoEsc") then
for k, v in pairs(UISpecialFrames) do
if v == (self.frameName) then
@ -371,6 +370,7 @@ function MyBagsCore:SetLockTexture()
if not self.GetOpt("Lock") then
texture = texture .. "Un"
end
texture = texture .. "Locked-Up"
button:SetTexture(texture)
if self.GetOpt("Lock") and self.GetOpt("Graphics") == "none" then