Krowi's Extended Vendor UI

Krowi's Extended Vendor UI

8.3k Downloads

Error GetNumCollectedInfo(speciesID)

gaveer opened this issue · 5 comments

commented

i got the follwoing error when you open vendor with following NPC
https://www.wowhead.com/npc=47764/murog
class : hunter
Race : goblin
Faction : horde

9x Krowi_ExtendedVendorUI/Filters.lua:84: Usage: GetNumCollectedInfo(speciesID)
[string "=[C]"]: in function `GetNumCollectedInfo'
[string "@Krowi_ExtendedVendorUI/Filters.lua"]:84: in function `IsPetCollected'
[string "@Krowi_ExtendedVendorUI/Filters.lua"]:52: in function `Validate'
[string "@Krowi_ExtendedVendorUI/Gui/MerchantFrame.lua"]:135: in function `GetMerchantNumItems'
[string "@FrameXML/MerchantFrame.lua"]:206: in function <FrameXML/MerchantFrame.lua:202>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `MerchantFrame_UpdateMerchantInfo'
[string "@FrameXML/MerchantFrame.lua"]:142: in function <FrameXML/MerchantFrame.lua:135>
[string "=[C]"]: in function `MerchantFrame_Update'
[string "@FrameXML/MerchantFrame.lua"]:983: in function `MerchantFrame_SetFilter'
[string "@Krowi_ExtendedVendorUI/Gui/SearchBox/SearchBoxMixin.lua"]:16: in function <...wi_ExtendedVendorUI/Gui/SearchBox/SearchBoxMixin.lua:15>
...
[string "@FrameXML/UIParent.lua"]:2938: in function `SetUIPanel'
[string "@FrameXML/UIParent.lua"]:2781: in function `ShowUIPanel'
[string "@FrameXML/UIParent.lua"]:2646: in function <FrameXML/UIParent.lua:2642>
[string "=[C]"]: in function `SetAttribute'
[string "@FrameXML/UIParent.lua"]:3248: in function `ShowUIPanel'
[string "@FrameXML/MerchantFrame.lua"]:27: in function `showFunc'
[string "@FrameXML/PlayerInteractionFrameManager.lua"]:188: in function <FrameXML/PlayerInteractionFrameManager.lua:177>
[string "=[C]"]: ?
[string "@BagBrother/core/features/autoDisplay.lua"]:84: in function `ShowFrame'
[string "@FrameXML/PlayerInteractionFrameManager.lua"]:220: in function <FrameXML/PlayerInteractionFrameManager.lua:217>

Locals:
(*temporary) = nil

commented

so in Filters.lua line 83
replace

function filters.IsPetCollected(itemId)
		return (C_PetJournal.GetNumCollectedInfo((select(13, C_PetJournal.GetPetInfoByItemID(itemId))))) ~= 0;
	end

with

function filters.IsPetCollected(itemId)
    local _, speciesID = C_PetJournal.GetPetInfoByItemID(itemId)
    if speciesID then
        return C_PetJournal.GetNumCollectedInfo(speciesID) ~= 0
    end
    return false
end

  • Solved By chatGPT
commented

I assume this is the beta version?

commented

@TheKrowi Krowi_ExtendedVendorUI-v6.1.zip

commented

Also triggers on https://wowhead.com/npc=185561

Trouble item is https://wowhead.com/item=37460. Blizz returns wrong item info for this one and game thinks it's a pet. Only triggers if both Hide Pets and Toys is selected because Pets are checked first in code.

Having a look at your npc it probably is the same issue.

commented

💯 Good job