Skip to content

Commit c82d7a4

Browse files
committed
panda's review (II)
- tested and working as intended with both: bag and bank item slots Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
1 parent 23241e4 commit c82d7a4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Intersect.Client.Core/Interface/Game/Bag/BagItem.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ protected override void OnContextMenuOpening(ContextMenu contextMenu)
6363
return;
6464
}
6565

66-
if (bagSlots[SlotIndex] is null)
66+
if (SlotIndex >= bagSlots.Length)
6767
{
6868
return;
6969
}
7070

71-
if (SlotIndex >= bagSlots.Length)
71+
if (bagSlots[SlotIndex] is not { } bagSlot)
7272
{
7373
return;
7474
}
7575

76-
if (!ItemDescriptor.TryGet(bagSlots[SlotIndex].ItemId, out var item))
76+
if (!ItemDescriptor.TryGet(bagSlot.ItemId, out var item))
7777
{
7878
return;
7979
}

Intersect.Client.Core/Interface/Game/Bank/BankItem.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ protected override void OnContextMenuOpening(ContextMenu contextMenu)
6666
return;
6767
}
6868

69-
if (bankSlots[SlotIndex] is null)
69+
if (SlotIndex >= bankSlots.Length)
7070
{
7171
return;
7272
}
7373

74-
if (SlotIndex >= bankSlots.Length)
74+
if (bankSlots[SlotIndex] is not { } bankSlot)
7575
{
7676
return;
7777
}
7878

79-
if (!ItemDescriptor.TryGet(bankSlots[SlotIndex].ItemId, out var item))
79+
if (!ItemDescriptor.TryGet(bankSlot.ItemId, out var item))
8080
{
8181
return;
8282
}

0 commit comments

Comments
 (0)