mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
Update GameInventoryItem (#2219)
* Update GameInventoryItem - Resolve symbolic InventoryItem, used in HandIn - Harden Materia/MateriaGrade/Stains results - Make sure GameInventoryItem is constructed correctly * Remove some duplicate code from InventoryWidget * Fix null check
This commit is contained in:
parent
f5b3d85066
commit
6160252418
3 changed files with 145 additions and 89 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
|
@ -121,6 +121,8 @@ internal class GameInventory : IInternalDisposableService
|
|||
|
||||
// Assumption: newItems is sorted by slots, and the last item has the highest slot number.
|
||||
var oldItems = this.inventoryItems[i] ??= new GameInventoryItem[newItems[^1].InternalItem.Slot + 1];
|
||||
if (this.inventoryItems[i] == null)
|
||||
oldItems.Initialize();
|
||||
|
||||
foreach (ref readonly var newItem in newItems)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue