fix crashes related to forms in the dex

This commit is contained in:
darkfire006 2023-08-06 19:59:25 -05:00
parent 39017d57bf
commit a5c6144ebf
2 changed files with 6 additions and 2 deletions

View File

@ -20,7 +20,7 @@
Entry = Entry.Remove(0, Entry.IndexOf("{") + 1)
Entry = Entry.Remove(Entry.Length - 1, 1)
Dim eID As Integer = CInt(Entry.GetSplit(0, "|"))
Dim eID As String = Entry.GetSplit(0, "|")
Dim eType As Integer = CInt(Entry.GetSplit(1, "|"))
If Type.Contains(eType) = True Then

View File

@ -480,7 +480,11 @@ Public Class PokemonForms
Public Shared Function GetAdditionalValueFromDataFile(ByVal DataFile As String) As String
Dim CompareNumber As Integer = CInt(DataFile.GetSplit(0, "_"))
Dim CompareSuffix As String = DataFile.Remove(0, DataFile.IndexOf("_"))
Dim CompareSuffix As String = ""
If DataFile.Contains("_") Then
CompareSuffix = DataFile.Remove(0, DataFile.IndexOf("_"))
End If
If _pokemonList.Count > 0 Then
For Each listP In _pokemonList
If listP.IsNumber(CompareNumber) = True AndAlso CompareSuffix = listP.DataFileSuffix Then