File tree Expand file tree Collapse file tree
Intersect.Client.Core/Interface/Game Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments