[Bug] ItemSlotCollection should check ItemSlotSet when call `CanAddItem`/`AddItem`

You are completely right. I don't know how this has slipped our testing for so long

Here I've added this override inside the ItemSlotCollection class

Code:
 /// <summary>
 /// Add conditions, returns the itemInfo that can be added (or returns null if it cannot).
 /// </summary>
 /// <param name="itemInfo">Can this item be added.</param>
 public override ItemInfo? CanAddItem(ItemInfo itemInfo)
 {
     var targetSlot = GetTargetSlotIndex(itemInfo.Item);
     if (targetSlot == -1)
     {
         return null;
     }
     return base.CanAddItem(itemInfo);
 }

AddItem does this slot checking already, it was only missing for CandAddItem
 
Back
Top