Forms can now also be traded on GTS
This commit is contained in:
parent
1a4de5bc97
commit
7f530ab8b7
|
@ -5,7 +5,7 @@
|
||||||
Inherits Screen
|
Inherits Screen
|
||||||
|
|
||||||
Public Shared GTSVersion As String = "1.X"
|
Public Shared GTSVersion As String = "1.X"
|
||||||
Public Shared GTSPokemon As New List(Of Integer)
|
Public Shared GTSPokemon As New List(Of String)
|
||||||
Shared LoadedVersionData As Boolean = False
|
Shared LoadedVersionData As Boolean = False
|
||||||
Public Shared Furrs As New List(Of Furr)
|
Public Shared Furrs As New List(Of Furr)
|
||||||
|
|
||||||
|
@ -86,13 +86,13 @@
|
||||||
Dim endPokemon As Integer = CInt(p.Substring(p.IndexOf("-") + 1))
|
Dim endPokemon As Integer = CInt(p.Substring(p.IndexOf("-") + 1))
|
||||||
|
|
||||||
For i = startPokemon To endPokemon
|
For i = startPokemon To endPokemon
|
||||||
If GTSPokemon.Contains(CInt(i)) = False Then
|
If GTSPokemon.Contains(CInt(i).ToString) = False Then
|
||||||
GTSPokemon.Add(CInt(i))
|
GTSPokemon.Add(CInt(i).ToString)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
If GTSPokemon.Contains(CInt(p)) = False Then
|
If GTSPokemon.Contains(p) = False Then
|
||||||
GTSPokemon.Add(CInt(p))
|
GTSPokemon.Add(p)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
|
@ -280,7 +280,14 @@
|
||||||
Else
|
Else
|
||||||
Selected = i + ScrollIndex
|
Selected = i + ScrollIndex
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
TempPokemon = Pokemon.GetPokemonByID(CInt(SearchResults(Selected).RequestID))
|
Dim dexID As Integer = CInt(SearchResults(Selected).RequestID.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If SearchResults(Selected).RequestID.Contains(";") = True Then
|
||||||
|
dexAD = SearchResults(Selected).RequestID.GetSplit(1, ";")
|
||||||
|
ElseIf SearchResults(Selected).RequestID.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(SearchResults(Selected).RequestID)
|
||||||
|
End If
|
||||||
|
TempPokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
Emblem = New Emblem(SearchResults(Selected).FromUserID, 0)
|
Emblem = New Emblem(SearchResults(Selected).FromUserID, 0)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -609,15 +616,14 @@
|
||||||
Dim index As Integer = Page * 20
|
Dim index As Integer = Page * 20
|
||||||
Dim noMorePokemon As Boolean = False
|
Dim noMorePokemon As Boolean = False
|
||||||
|
|
||||||
Dim fileList As New List(Of Integer)
|
Dim fileList As New List(Of String)
|
||||||
Dim d As List(Of String) = System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Pokemon\Data\").ToList()
|
Dim d As List(Of String) = System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Pokemon\Data\").ToList()
|
||||||
For Each file As String In d
|
For Each file As String In d
|
||||||
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(file)
|
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(file)
|
||||||
If StringHelper.IsNumeric(fileName) = True Then
|
Dim fileNumber As Integer = CInt(fileName.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
If CInt(fileName) > 0 And CInt(fileName) <= Pokedex.PokemonMaxCount Then
|
If CInt(fileNumber) > 0 And CInt(fileNumber) <= Pokedex.PokemonMaxCount Then
|
||||||
If GTSMainScreen.GTSPokemon.Contains(CInt(fileName)) = True Then
|
If GTSMainScreen.GTSPokemon.Contains(fileName) = True Then
|
||||||
fileList.Add(CInt(fileName))
|
fileList.Add(fileName)
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
@ -625,8 +631,17 @@
|
||||||
|
|
||||||
While CurrentPokemon.Count < 20 And noMorePokemon = False
|
While CurrentPokemon.Count < 20 And noMorePokemon = False
|
||||||
If index <= fileList.Count - 1 Then
|
If index <= fileList.Count - 1 Then
|
||||||
Dim fileName As Integer = fileList(index)
|
Dim fileName As String = fileList(index)
|
||||||
Dim p As Pokemon = Pokemon.GetPokemonByID(fileName)
|
|
||||||
|
Dim dexID As Integer = CInt(fileName.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If fileName.Contains(";") = True Then
|
||||||
|
dexAD = fileName.GetSplit(1, ";")
|
||||||
|
ElseIf fileName.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(fileName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim p As Pokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
CurrentPokemon.Add(p.Number, p.GetName)
|
CurrentPokemon.Add(p.Number, p.GetName)
|
||||||
SpriteList.Add(p.GetMenuTexture())
|
SpriteList.Add(p.GetMenuTexture())
|
||||||
index += 1
|
index += 1
|
||||||
|
|
|
@ -247,7 +247,14 @@
|
||||||
Else
|
Else
|
||||||
Selected = i + ScrollIndex
|
Selected = i + ScrollIndex
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
TempPokemon = Pokemon.GetPokemonByID(CInt(SetupList(Selected).RequestID))
|
Dim dexID As Integer = CInt(SetupList(Selected).RequestID.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If SetupList(Selected).RequestID.Contains(";") = True Then
|
||||||
|
dexAD = SetupList(Selected).RequestID.GetSplit(1, ";")
|
||||||
|
ElseIf SetupList(Selected).RequestID.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(SetupList(Selected).RequestID)
|
||||||
|
End If
|
||||||
|
TempPokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
If SetupList(Selected).SecurityArea = GTSDataItem.SecurityCode.Private Then
|
If SetupList(Selected).SecurityArea = GTSDataItem.SecurityCode.Private Then
|
||||||
Emblem = New Emblem(SetupList(Selected).ToUserID, 0)
|
Emblem = New Emblem(SetupList(Selected).ToUserID, 0)
|
||||||
End If
|
End If
|
||||||
|
@ -390,7 +397,14 @@
|
||||||
Me.D = D
|
Me.D = D
|
||||||
NewTrade = False
|
NewTrade = False
|
||||||
If D.RequestID <> "" Then
|
If D.RequestID <> "" Then
|
||||||
TempPokemon = Pokemon.GetPokemonByID(CInt(D.RequestID))
|
Dim dexID As Integer = CInt(D.RequestID.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If D.RequestID.Contains(";") = True Then
|
||||||
|
dexAD = D.RequestID.GetSplit(1, ";")
|
||||||
|
ElseIf D.RequestID.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(D.RequestID)
|
||||||
|
End If
|
||||||
|
TempPokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
|
|
||||||
If D.SecurityArea = GTSDataItem.SecurityCode.Global Then
|
If D.SecurityArea = GTSDataItem.SecurityCode.Global Then
|
||||||
Dim v As Integer = TempPokemon.TradeValue - D.Pokemon.TradeValue
|
Dim v As Integer = TempPokemon.TradeValue - D.Pokemon.TradeValue
|
||||||
|
@ -470,7 +484,14 @@
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, "Request:", New Vector2(420, 140), Color.Black)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, "Request:", New Vector2(420, 140), Color.Black)
|
||||||
|
|
||||||
If StringHelper.IsNumeric(D.RequestID) = True Then
|
If StringHelper.IsNumeric(D.RequestID) = True Then
|
||||||
DrawFilter(New Vector2(420, 200), 4, "Pokémon:", Pokemon.GetPokemonByID(CInt(D.RequestID)).GetDisplayName() & " (" & D.RequestID & ")")
|
Dim dexID As Integer = CInt(D.RequestID.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If D.RequestID.Contains(";") = True Then
|
||||||
|
dexAD = D.RequestID.GetSplit(1, ";")
|
||||||
|
ElseIf D.RequestID.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(D.RequestID)
|
||||||
|
End If
|
||||||
|
DrawFilter(New Vector2(420, 200), 4, "Pokémon:", Pokemon.GetPokemonByID(dexID, dexAD, True).GetDisplayName() & " (" & D.RequestID & ")")
|
||||||
Else
|
Else
|
||||||
DrawFilter(New Vector2(420, 200), 4, "Pokémon:", "")
|
DrawFilter(New Vector2(420, 200), 4, "Pokémon:", "")
|
||||||
End If
|
End If
|
||||||
|
@ -492,7 +513,14 @@
|
||||||
If StringHelper.IsNumeric(D.RequestID) = True Then
|
If StringHelper.IsNumeric(D.RequestID) = True Then
|
||||||
If CInt(D.RequestID) > 0 Then
|
If CInt(D.RequestID) > 0 Then
|
||||||
If TempPokemon Is Nothing OrElse TempPokemon.Number <> CInt(D.RequestID) Then
|
If TempPokemon Is Nothing OrElse TempPokemon.Number <> CInt(D.RequestID) Then
|
||||||
TempPokemon = Pokemon.GetPokemonByID(CInt(D.RequestID))
|
Dim dexID As Integer = CInt(D.RequestID.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If D.RequestID.Contains(";") = True Then
|
||||||
|
dexAD = D.RequestID.GetSplit(1, ";")
|
||||||
|
ElseIf D.RequestID.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(D.RequestID)
|
||||||
|
End If
|
||||||
|
TempPokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
End If
|
End If
|
||||||
Dim p As Pokemon = TempPokemon
|
Dim p As Pokemon = TempPokemon
|
||||||
|
|
||||||
|
@ -883,14 +911,15 @@
|
||||||
Dim index As Integer = Page * 20
|
Dim index As Integer = Page * 20
|
||||||
Dim noMorePokemon As Boolean = False
|
Dim noMorePokemon As Boolean = False
|
||||||
|
|
||||||
Dim fileList As New List(Of Integer)
|
Dim fileList As New List(Of String)
|
||||||
Dim d As List(Of String) = System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Pokemon\Data\").ToList()
|
Dim d As List(Of String) = System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Pokemon\Data\").ToList()
|
||||||
For Each file As String In d
|
For Each file As String In d
|
||||||
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(file)
|
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(file)
|
||||||
If StringHelper.IsNumeric(fileName) = True Then
|
If StringHelper.IsNumeric(fileName) = True Then
|
||||||
If CInt(fileName) > 0 And CInt(fileName) <= Pokedex.PokemonMaxCount Then
|
Dim fileNumber As Integer = CInt(fileName.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
If GTSMainScreen.GTSPokemon.Contains(CInt(fileName)) = True Then
|
If CInt(fileNumber) > 0 And CInt(fileNumber) <= Pokedex.PokemonMaxCount Then
|
||||||
fileList.Add(CInt(fileName))
|
If GTSMainScreen.GTSPokemon.Contains(fileName) = True Then
|
||||||
|
fileList.Add(fileName)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -899,8 +928,17 @@
|
||||||
|
|
||||||
While CurrentPokemon.Count < 20 And noMorePokemon = False
|
While CurrentPokemon.Count < 20 And noMorePokemon = False
|
||||||
If index <= fileList.Count - 1 Then
|
If index <= fileList.Count - 1 Then
|
||||||
Dim fileName As Integer = fileList(index)
|
Dim fileName As String = fileList(index)
|
||||||
Dim p As Pokemon = Pokemon.GetPokemonByID(fileName)
|
|
||||||
|
Dim dexID As Integer = CInt(fileName.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If fileName.Contains(";") = True Then
|
||||||
|
dexAD = fileName.GetSplit(1, ";")
|
||||||
|
ElseIf fileName.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(fileName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim p As Pokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
CurrentPokemon.Add(p.Number, p.GetName)
|
CurrentPokemon.Add(p.Number, p.GetName)
|
||||||
SpriteList.Add(p.GetMenuTexture())
|
SpriteList.Add(p.GetMenuTexture())
|
||||||
index += 1
|
index += 1
|
||||||
|
|
|
@ -122,7 +122,14 @@
|
||||||
P = Core.Player.Pokemons(Me.PokeIndex)
|
P = Core.Player.Pokemons(Me.PokeIndex)
|
||||||
Else
|
Else
|
||||||
If TempPokemon Is Nothing Then
|
If TempPokemon Is Nothing Then
|
||||||
TempPokemon = Pokemon.GetPokemonByID(CInt(D.RequestID))
|
Dim dexID As Integer = CInt(D.RequestID.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim dexAD As String = ""
|
||||||
|
If D.RequestID.Contains(";") = True Then
|
||||||
|
dexAD = D.RequestID.GetSplit(1, ";")
|
||||||
|
ElseIf D.RequestID.Contains("_") Then
|
||||||
|
dexAD = PokemonForms.GetAdditionalValueFromDataFile(D.RequestID)
|
||||||
|
End If
|
||||||
|
TempPokemon = Pokemon.GetPokemonByID(dexID, dexAD, True)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
P = TempPokemon
|
P = TempPokemon
|
||||||
|
@ -273,8 +280,8 @@
|
||||||
Private Function MeetsCondition() As Boolean
|
Private Function MeetsCondition() As Boolean
|
||||||
If PokeIndex > -1 Then
|
If PokeIndex > -1 Then
|
||||||
Dim P As Pokemon = Core.Player.Pokemons(PokeIndex)
|
Dim P As Pokemon = Core.Player.Pokemons(PokeIndex)
|
||||||
|
Dim dexID As String = PokemonForms.GetPokemonDataFileName(P.Number, P.AdditionalData)
|
||||||
If P.Number = CInt(D.RequestID) And P.IsEgg() = False And P.HasHMMove() = False Then
|
If dexID = D.RequestID And P.IsEgg() = False And P.HasHMMove() = False Then
|
||||||
If D.RequestGender <> "" Then
|
If D.RequestGender <> "" Then
|
||||||
Select Case D.RequestGender
|
Select Case D.RequestGender
|
||||||
Case "Male"
|
Case "Male"
|
||||||
|
|
Loading…
Reference in New Issue