Fix some locals
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
local MBC = "MyBagsCore-1.1"
|
local MBC = "MyBagsCore-1.1"
|
||||||
local MBC_MINOR = "2016.09.06.1"
|
local MBC_MINOR = "2016.09.06.1"
|
||||||
|
|
||||||
|
local error, assert = error, assert
|
||||||
|
|
||||||
if not LibStub then
|
if not LibStub then
|
||||||
error(MBC .. " requires LibStub.")
|
error(MBC .. " requires LibStub.")
|
||||||
end
|
end
|
||||||
@ -34,7 +37,7 @@ local ACEG_MAP_ONOFF = {[0]="|cffff5050Off|r",[1]="|cff00ff00On|r"}
|
|||||||
|
|
||||||
local L = LibStub("AceLocale-3.0"):GetLocale("MyBags")
|
local L = LibStub("AceLocale-3.0"):GetLocale("MyBags")
|
||||||
|
|
||||||
local pcall, error, pairs, unpack = pcall, error, pairs, unpack
|
local pairs, unpack = pairs, unpack
|
||||||
local strfind, strlen, strsub, strlower, strgmatch, strupper = string.find, string.len, string.sub, string.lower, string.gmatch, string.upper
|
local strfind, strlen, strsub, strlower, strgmatch, strupper = string.find, string.len, string.sub, string.lower, string.gmatch, string.upper
|
||||||
local strtrim = strtrim
|
local strtrim = strtrim
|
||||||
local tinsert, tremove = table.insert, table.remove
|
local tinsert, tremove = table.insert, table.remove
|
||||||
@ -87,9 +90,10 @@ local function GetBattlePetInfoFromLink(l)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local c, id, lvl, num, hp, pw, sp, u, 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
|
||||||
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"))
|
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"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user