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