Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

C_Item.GetItemLocation() returns invalid itemLocation results for GUIDs of bank bag slots #537

Open zealvurte opened 3 months ago

zealvurte commented 3 months ago

Type: Functional Severity: Minor Version: 10.2.5.53584

Problem

C_Item.GetIemLocation() returns invalid itemLocations when given an item GUID for a bank bag slot. Crucially it will be missing its equipment slot, and using it with functions that take an itemLocation as an argument will result in an argument error.

Reproduction steps

  1. Enter /run TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Item,function (t,d) l=C_Item.GetItemLocation(d.guid);print(l:HasAnyLocation(),l:IsEquipmentSlot(),(select(2,pcall(ItemLocationMixin.IsValid,l))));end) in chat
  2. Mouseover a bag in any of your bag bank slots

Expected result

Prints true true true.

Actual result

Prints false false Interface/FrameXML/ObjectAPI/ItemLocation.lua69: bad argument #1 to 'DoesItemExist' (Usage: local itemExists = C_Item.DoesItemExist(emptiableItemLocation)).