Fix for pokédex radio
This commit is contained in:
parent
d9eb12d341
commit
552548b5ad
|
@ -475,6 +475,24 @@ Public Class PokemonForms
|
||||||
|
|
||||||
Return Nothing
|
Return Nothing
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Shared Function GetDataFileForms(ByVal Number As Integer) As List(Of String)
|
||||||
|
Dim Forms As New List(Of String)
|
||||||
|
Forms.Add(Number.ToString)
|
||||||
|
If _pokemonList.Count > 0 Then
|
||||||
|
For Each listP In _pokemonList
|
||||||
|
If listP.IsNumber(Number) = True AndAlso listP.AdditionalValue <> "" AndAlso listP.DataFileSuffix <> "" Then
|
||||||
|
Forms.Add(listP.AdditionalValue)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Forms.Count > 0 Then
|
||||||
|
Return Forms
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Nothing
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function GetAdditionalValueFromDataFile(ByVal DataFile As String) As String
|
Public Shared Function GetAdditionalValueFromDataFile(ByVal DataFile As String) As String
|
||||||
|
|
|
@ -1859,6 +1859,7 @@
|
||||||
Select Case Me.Content.ToLower()
|
Select Case Me.Content.ToLower()
|
||||||
Case "[pokedexentry]"
|
Case "[pokedexentry]"
|
||||||
Dim triedIDs As New List(Of Integer)
|
Dim triedIDs As New List(Of Integer)
|
||||||
|
Dim triedADs As New List(Of String)
|
||||||
Dim chosenID As Integer = -1
|
Dim chosenID As Integer = -1
|
||||||
Dim chosenAD As String = ""
|
Dim chosenAD As String = ""
|
||||||
|
|
||||||
|
@ -1868,16 +1869,18 @@
|
||||||
If Pokedex.GetEntryType(Core.Player.PokedexData, Pokedex.PokemonIDs(ID)) < 2 Then
|
If Pokedex.GetEntryType(Core.Player.PokedexData, Pokedex.PokemonIDs(ID)) < 2 Then
|
||||||
triedIDs.Add(ID)
|
triedIDs.Add(ID)
|
||||||
Else
|
Else
|
||||||
If Pokedex.PokemonIDs(ID).Contains("_") Then
|
If PokemonForms.GetDataFileForms(ID).Count > 0 Then
|
||||||
chosenID = CInt(Pokedex.PokemonIDs(ID).GetSplit(0, "_"))
|
Dim FormList As List(Of String) = PokemonForms.GetDataFileForms(ID)
|
||||||
chosenAD = PokemonForms.GetAdditionalValueFromDataFile(Pokedex.PokemonIDs(ID))
|
Dim FormString As Integer = Core.Random.Next(0, FormList.Count - 1)
|
||||||
ElseIf Pokedex.PokemonIDs(ID).Contains(";") Then
|
If Pokedex.PokemonIDs(FormString).Contains("_") Then
|
||||||
chosenID = CInt(Pokedex.PokemonIDs(ID).GetSplit(0, ";"))
|
chosenID = CInt(Pokedex.PokemonIDs(FormString).GetSplit(0, "_"))
|
||||||
chosenAD = Pokedex.PokemonIDs(ID).GetSplit(1, ";")
|
chosenAD = PokemonForms.GetAdditionalValueFromDataFile(Pokedex.PokemonIDs(FormString))
|
||||||
|
Else
|
||||||
|
chosenID = FormString
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
chosenID = ID
|
chosenID = ID
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
Loading…
Reference in New Issue