Fix Pokédex navigation bugs
This commit is contained in:
parent
b73023e416
commit
5b537f9631
|
@ -1909,7 +1909,7 @@ Public Class PokedexViewScreen
|
||||||
|
|
||||||
Dim pokeID As String = ""
|
Dim pokeID As String = ""
|
||||||
|
|
||||||
If Pokedex.GetEntryType(Core.Player.PokedexData, PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)) = 0 Then
|
If Pokedex.GetEntryType(Core.Player.PokedexData, PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)) > 0 Then
|
||||||
pokeID = PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)
|
pokeID = PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)
|
||||||
While Pokedex.GetEntryType(Core.Player.PokedexData, pokeID) = 0
|
While Pokedex.GetEntryType(Core.Player.PokedexData, pokeID) = 0
|
||||||
Dim formEntry As Integer = Pokedex.HasAnyForm(PDexScreen.PokemonList(index).Number)
|
Dim formEntry As Integer = Pokedex.HasAnyForm(PDexScreen.PokemonList(index).Number)
|
||||||
|
@ -1942,7 +1942,10 @@ Public Class PokedexViewScreen
|
||||||
If Me.DexIndex < PDexScreen.PokemonList.count - 1 Then
|
If Me.DexIndex < PDexScreen.PokemonList.count - 1 Then
|
||||||
Dim index As Integer = Me.DexIndex + 1
|
Dim index As Integer = Me.DexIndex + 1
|
||||||
|
|
||||||
Dim pokeID As String = PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)
|
Dim pokeID As String = ""
|
||||||
|
|
||||||
|
If Pokedex.GetEntryType(Core.Player.PokedexData, PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)) > 0 Then
|
||||||
|
pokeID = PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)
|
||||||
|
|
||||||
While Pokedex.GetEntryType(Core.Player.PokedexData, pokeID) = 0
|
While Pokedex.GetEntryType(Core.Player.PokedexData, pokeID) = 0
|
||||||
Dim formEntry As Integer = Pokedex.HasAnyForm(PDexScreen.PokemonList(index).Number)
|
Dim formEntry As Integer = Pokedex.HasAnyForm(PDexScreen.PokemonList(index).Number)
|
||||||
|
@ -1958,6 +1961,7 @@ Public Class PokedexViewScreen
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
End If
|
||||||
|
|
||||||
If pokeID <> "" Then
|
If pokeID <> "" Then
|
||||||
If Pokedex.GetEntryType(Core.Player.PokedexData, pokeID) > 0 OrElse Pokedex.HasAnyForm(PDexScreen.PokemonList(index).Number) > 0 Then
|
If Pokedex.GetEntryType(Core.Player.PokedexData, pokeID) > 0 OrElse Pokedex.HasAnyForm(PDexScreen.PokemonList(index).Number) > 0 Then
|
||||||
|
@ -2166,8 +2170,23 @@ Public Class PokedexViewScreen
|
||||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(pokemon.Number, pokemon.AdditionalData, True)
|
Dim dexID As String = PokemonForms.GetPokemonDataFileName(pokemon.Number, pokemon.AdditionalData, True)
|
||||||
|
|
||||||
Dim TempForms As New List(Of String)
|
Dim TempForms As New List(Of String)
|
||||||
|
Dim switchIndex As Integer = DexIndex
|
||||||
If pokemon.Number <> Me.Pokemon.Number Then
|
If pokemon.Number <> Me.Pokemon.Number Then
|
||||||
|
Dim PDexScreen As PokedexScreen = CType(Me.PreScreen, PokedexScreen)
|
||||||
|
For pEntry = 0 To PDexScreen.PokemonList.Count - 1
|
||||||
|
If PDexScreen.PokemonList(pEntry).Number = pokemon.Number AndAlso PDexScreen.PokemonList(pEntry).AdditionalData = pokemon.AdditionalData Then
|
||||||
|
switchIndex = pEntry
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If switchIndex = DexIndex Then
|
||||||
|
For pEntry = 0 To PDexScreen.PokemonList.Count - 1
|
||||||
|
If PDexScreen.PokemonList(pEntry).Number = pokemon.Number Then
|
||||||
|
switchIndex = pEntry
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
TempForms.Add(pokemon.Number.ToString)
|
TempForms.Add(pokemon.Number.ToString)
|
||||||
If pokemon.EvolutionLines.Count > 0 Then
|
If pokemon.EvolutionLines.Count > 0 Then
|
||||||
For e = 0 To pokemon.EvolutionLines.Count - 1
|
For e = 0 To pokemon.EvolutionLines.Count - 1
|
||||||
|
@ -2216,21 +2235,16 @@ Public Class PokedexViewScreen
|
||||||
Dim newPokemon As Pokemon = Pokemon.GetPokemonByID(PokeID, PokeAD, True)
|
Dim newPokemon As Pokemon = Pokemon.GetPokemonByID(PokeID, PokeAD, True)
|
||||||
|
|
||||||
Me.Forms = TempForms
|
Me.Forms = TempForms
|
||||||
LoadPokemonData(-1, newPokemon, True)
|
|
||||||
|
LoadPokemonData(switchIndex, newPokemon, True)
|
||||||
|
|
||||||
ElseIf Me.DexIndex > -1 Then
|
ElseIf Me.DexIndex > -1 Then
|
||||||
Dim PDexScreen As PokedexScreen = CType(Me.PreScreen, PokedexScreen)
|
Dim PDexScreen As PokedexScreen = CType(Me.PreScreen, PokedexScreen)
|
||||||
Dim index As Integer = DexIndex
|
If Pokedex.GetEntryType(Core.Player.PokedexData, PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(switchIndex).Number, PDexScreen.PokemonList(switchIndex).AdditionalData, True)) > 0 Then
|
||||||
For i = 0 To PDexScreen.PokemonList.Count - 1
|
|
||||||
If PDexScreen.PokemonList(i).Number = pokemon.Number AndAlso PDexScreen.PokemonList(i).AdditionalData = pokemon.AdditionalData Then
|
|
||||||
index = i
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If Pokedex.GetEntryType(Core.Player.PokedexData, PokemonForms.GetPokemonDataFileName(PDexScreen.PokemonList(index).Number, PDexScreen.PokemonList(index).AdditionalData, True)) > 0 Then
|
|
||||||
vLineLength = 1
|
vLineLength = 1
|
||||||
mLineLength = 1
|
mLineLength = 1
|
||||||
fadeMainImage = 0
|
fadeMainImage = 0
|
||||||
LoadPokemonData(index, Nothing, True)
|
LoadPokemonData(switchIndex, Nothing, True)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
Loading…
Reference in New Issue