Fixed exploit in NewMenuScreen

This commit is contained in:
CaptainSegis 2019-01-29 22:49:09 -05:00
parent cb15dd9e1c
commit 5d4ae15b67
3 changed files with 11 additions and 2 deletions

View File

@ -201,7 +201,16 @@ Public MustInherit Class Item
End Sub
Public Sub UseItemhandler(ByVal params As Object())
UseOnPokemon(CInt(params(0)))
If UseOnPokemon(CInt(params(0))) Then
Dim s As Screen = Core.CurrentScreen
While Not s.PreScreen Is Nothing And s.Identification <> Screen.Identifications.InventoryScreen
s = s.PreScreen
End While
If s.Identification = Screen.Identifications.InventoryScreen Then
CType(s, NewInventoryScreen).LoadItems()
End If
End If
End Sub
''' <summary>

View File

@ -991,7 +991,7 @@ Public Class NewInventoryScreen
''' <summary>
''' Reloads the temporary item list.
''' </summary>
Private Sub LoadItems()
Public Sub LoadItems()
_items = Core.Player.Inventory.Where(Function(x) Item.GetItemByID(x.ItemID).ItemType = _visibleItemTypes(_tabIndex)).ToArray()
If _tabIndex = 4 Then 'TM/HM
_items = (From i In _items Order By Item.GetItemByID(i.ItemID).SortValue Ascending).ToArray()

Binary file not shown.