Bagnon

Bagnon

132M Downloads

Error occurred when viewing character cache if it contains "Mythic Keystone"

hshh opened this issue ยท 3 comments

commented

Is there an existing issue for this?

  • I have searched the existing open and closed issues.

Description

6x BagBrother/core/classes/frameBase.lua:185: bad argument #4 to 'format' (string expected, got function)

for example, itemid=180653
item.name, item.iconFileID = C_PetJournal.GetPetInfoBySpeciesID(item.itemID)
The type of item.name is function

Bagnon Version

11.1.21

World of Warcraft Flavor

Retail

World of Warcraft Region

EU

Tested with only Bagnon

I got this issue with only Bagnon enabled

Lua Error


Reproduction Steps

  1. Mythic Keystone in bags of A
  2. Switch to B
  3. View the cache of A

Last Working Version

No response

Screenshots

No response

commented

Same thing happening to me. Characters bags with a keystone inside cannot be viewed by other characters

commented

Replace Frame:GetItemInfo Function in .../AddOns/BagBrother/core/classes/frameBase.lua Line 180

Replace

item.hyperlink = format('|c%s|Hbattlepet:%sx0|h[%s]|h|r', select(4, GetItemQualityColor(item.quality)), data, item.name)

with

local color = select(4, GetItemQualityColor(item.quality or 1)) or 'ffffffff'
item.name = tostring(item.name or "Unknown")
item.hyperlink = format('|c%s|Hbattlepet:%sx0|h[%s]|h|r', color, data, item.name)
commented

item.hyperlink = format('|c%s|Hbattlepet:%sx0|h[%s]|h|r', color, data, item.name)

The hyperlink is invalid because it's not a battle pet.