Fix for battlepet cages

This commit is contained in:
Sandor Takacs
2014-02-10 23:45:47 +01:00
parent 6c519840ca
commit 3a0eef76dc
2 changed files with 85 additions and 27 deletions

View File

@ -9,9 +9,22 @@ local tonumber, pairs = tonumber, pairs
local function GetItemInfoFromLink(l)
if (not l) then
return
return
end
local c, id, il, n = select(3, strfind(l, "|cff(%x+)|Hitem:(%-?%d+)([^|]+)|h%[(.-)%]|h|r"))
local c, t, id, il, n = select(3, strfind(l, "|cff(%x+)|H(%l+):(%-?%d+)([^|]+)|h%[(.-)%]|h|r"))
--[[
return n, c, id .. il, id, t
if (strfind(l, "Hitem")) then
c, id ,il, n = select(3, strfind(l, "|cff(%x+)|Hitem:(%-?%d+)([^|]+)|h%[(.-)%]|h|r"))
else
if (strfind(l, "Hbattlepet")) then
c, id ,il, n = select(3, strfind(l, "|cff(%x+)|Hbattlepet:(%-?%d+)([^|]+)|h%[(.-)%]|h|r"))
end
end
]]
return n, c, id .. il, id
end