Skip to content

Commit 8e31de3

Browse files
committed
pandas's review (III)
Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
1 parent c82d7a4 commit 8e31de3

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

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

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

66-
if (SlotIndex >= bagSlots.Length)
66+
var slotIndex = SlotIndex;
67+
68+
if (slotIndex >= bagSlots.Length)
6769
{
6870
return;
6971
}
7072

71-
if (bagSlots[SlotIndex] is not { } bagSlot)
73+
if (bagSlots[slotIndex] is not { } bagSlot)
7274
{
7375
return;
7476
}

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

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

69-
if (SlotIndex >= bankSlots.Length)
69+
var slotIndex = SlotIndex;
70+
71+
if (slotIndex >= bankSlots.Length)
7072
{
7173
return;
7274
}
7375

74-
if (bankSlots[SlotIndex] is not { } bankSlot)
76+
if (bankSlots[slotIndex] is not { } bankSlot)
7577
{
7678
return;
7779
}

0 commit comments

Comments
 (0)