Battle Tower fixes

This commit is contained in:
darkfire006 2020-08-03 14:13:57 -05:00
parent 3b8e1cd977
commit 98ca5fdcd0
8 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,7 @@ Public Class Trainer
Dim PokeData As String = PokeLine.GetSplit(1, "|") Dim PokeData As String = PokeLine.GetSplit(1, "|")
If PokeData <> "" Then If PokeData <> "" Then
If ScriptCommander.Parse(PokeData).ToString().StartsWith("{") = True Then If ScriptCommander.Parse(PokeData).ToString().StartsWith("{") = True Then
PokeData = ScriptCommander.Parse(PokeData).ToString().Replace("§", ",") PokeData = ScriptCommander.Parse(PokeData).ToString().Replace("§", ",").Replace("«", "[").Replace("»", "]")
End If End If
If PokeData.StartsWith("{") = True And PokeData.EndsWith("}") = True Then If PokeData.StartsWith("{") = True And PokeData.EndsWith("}") = True Then
Dim p As Pokemon = Pokemon.GetPokemonByData(PokeData) Dim p As Pokemon = Pokemon.GetPokemonByData(PokeData)

View File

@ -1230,7 +1230,7 @@ Public Class Pokemon
''' <param name="InputData">The data that defines the Pokémon.</param> ''' <param name="InputData">The data that defines the Pokémon.</param>
Public Shared Function GetPokemonByData(ByVal InputData As String) As Pokemon Public Shared Function GetPokemonByData(ByVal InputData As String) As Pokemon
Dim Tags As New Dictionary(Of String, String) Dim Tags As New Dictionary(Of String, String)
Dim Data() As String = InputData.Split(CChar("}")) Dim Data() As String = InputData.Replace("§", ",").Replace("«", "[").Replace("»", "]").Split(CChar("}"))
For Each Tag As String In Data For Each Tag As String In Data
If Tag.Contains("{") = True And Tag.Contains("[") = True Then If Tag.Contains("{") = True And Tag.Contains("[") = True Then
Dim TagName As String = Tag.Remove(0, 2) Dim TagName As String = Tag.Remove(0, 2)
@ -1515,7 +1515,7 @@ Public Class Pokemon
Dim loadedHP As Boolean = False Dim loadedHP As Boolean = False
Dim Tags As New Dictionary(Of String, String) Dim Tags As New Dictionary(Of String, String)
Dim Data() As String = InputData.Split(CChar("}")) Dim Data() As String = InputData.Replace("§", ",").Replace("«", "[").Replace("»", "]").Split(CChar("}"))
For Each Tag As String In Data For Each Tag As String In Data
If Tag.Contains("{") = True And Tag.Contains("[") = True Then If Tag.Contains("{") = True And Tag.Contains("[") = True Then
Dim TagName As String = Tag.Remove(0, 2) Dim TagName As String = Tag.Remove(0, 2)