doadin / Baggins

zlib License
6 stars 7 forks source link

4.0.38 broken with infinite LUA error PawnGetItemData (a nil value) #62

Closed glajchs closed 2 years ago

glajchs commented 2 years ago

image Sorry I hit enter too early on this issue heh.

This is me trying the latest version with wrath classic beta, though from looking at the code I doubt this works in BC classic either? It's this logic:


        local data = _G.PawnGetItemData(link)
        local itemIsUpgrade = _G.PawnIsContainerItemAnUpgrade and _G.PawnIsContainerItemAnUpgrade(bag, slot) or _G.IsContainerItemAnUpgrade and _G.IsContainerItemAnUpgrade(bag, slot) or data and _G.PawnIsItemAnUpgrade(data)
        button.UpgradeIcon:SetShown(itemIsUpgrade or false)
    end```

Which was changed in a recent commit yesterday https://github.com/doadin/Baggins/commit/f944f72c8badded42b31d42a629206f923a5090f

If I revert this commit, it works again.

I don't find `PawnGetItemData` anywhere in my Interface/Addons folder at all, so I'm guessing that's a bad function name.
doadin commented 2 years ago

sorry about that, should be fixed in ee7d296900e9ab50841e1d8bcecd68772f520f97 which is included in v4.0.39 i just released(might take a min to distribute to curseforge and such). fixed: ee7d296900e9ab50841e1d8bcecd68772f520f97