Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caged BattlePet handling #2

Closed
ckaotik opened this issue Oct 9, 2013 · 1 comment
Closed

Caged BattlePet handling #2

ckaotik opened this issue Oct 9, 2013 · 1 comment

Comments

@ckaotik
Copy link

ckaotik commented Oct 9, 2013

It seems to me that Lib:GetItemInfo(player, bag, slot) doesn't properly recognize (and handle) battle pet links. Running this ingame on a caged pet:

    local icon, count, locked, quality, readable, lootable, link = GetContainerItemInfo(bag, slot)
    -- returns: "INTERFACE\ICONS\ACHIEVEMENT_BOSS_THEBLACKSTALKER.BLP", 1, nil, -1, nil, nil, "|cff1eff00|Hbattlepet:308:1:2:151:10:10:0x0000000000000000|h[Beinchen]|h|r", false

The example is an uncommon pet, as indicated by :2: in the pet link, however the quality return is -1, meaning additional checks are required to get this working properly.
Also, it seems that this pattern no longer matches:

    local PetDataFormat = '^' .. strrep('%d+:', 6) .. '%d+$'

Getting this fixed would also help get pet quality highlighting, as requested in Jaliborc/Bagnon#183 :)

@Jaliborc
Copy link
Owner

Dam, wish they didn't keep changing that link format all the time... dam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants