Forms can now also be traded on GTS
This commit is contained in:
parent
1a4de5bc97
commit
7f530ab8b7
|
@ -5,7 +5,7 @@
|
|||
Inherits Screen
|
||||
|
||||
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
|
||||
Public Shared Furrs As New List(Of Furr)
|
||||
|
||||
|
@ -86,13 +86,13 @@
|
|||
Dim endPokemon As Integer = CInt(p.Substring(p.IndexOf("-") + 1))
|
||||
|
||||
For i = startPokemon To endPokemon
|
||||
If GTSPokemon.Contains(CInt(i)) = False Then
|
||||
GTSPokemon.Add(CInt(i))
|
||||
If GTSPokemon.Contains(CInt(i).ToString) = False Then
|
||||
GTSPokemon.Add(CInt(i).ToString)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If GTSPokemon.Contains(CInt(p)) = False Then
|
||||
GTSPokemon.Add(CInt(p))
|
||||
If GTSPokemon.Contains(p) = False Then
|
||||
GTSPokemon.Add(p)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
|
|
@ -280,7 +280,14 @@
|
|||
Else
|
||||
Selected = i + ScrollIndex
|
||||
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)
|
||||
End If
|
||||
End If
|
||||
|
@ -609,15 +616,14 @@
|
|||
Dim index As Integer = Page * 20
|
||||
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()
|
||||
For Each file As String In d
|
||||
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(file)
|
||||
If StringHelper.IsNumeric(fileName) = True Then
|
||||
If CInt(fileName) > 0 And CInt(fileName) <= Pokedex.PokemonMaxCount Then
|
||||
If GTSMainScreen.GTSPokemon.Contains(CInt(fileName)) = True Then
|
||||
fileList.Add(CInt(fileName))
|
||||
End If
|
||||
Dim fileNumber As Integer = CInt(fileName.GetSplit(0, "_").GetSplit(0, ";"))
|
||||
If CInt(fileNumber) > 0 And CInt(fileNumber) <= Pokedex.PokemonMaxCount Then
|
||||
If GTSMainScreen.GTSPokemon.Contains(fileName) = True Then
|
||||
fileList.Add(fileName)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
@ -625,8 +631,17 @@
|
|||
|
||||
While CurrentPokemon.Count < 20 And noMorePokemon = False
|
||||
If index <= fileList.Count - 1 Then
|
||||
Dim fileName As Integer = fileList(index)
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByID(fileName)
|
||||
Dim fileName As String = fileList(index)
|
||||
|
||||
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)
|
||||
SpriteList.Add(p.GetMenuTexture())
|
||||
index += 1
|
||||
|
|
|
@ -247,7 +247,14 @@
|
|||
Else
|
||||
Selected = i + ScrollIndex
|
||||
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
|
||||
Emblem = New Emblem(SetupList(Selected).ToUserID, 0)
|
||||
End If
|
||||
|
@ -390,7 +397,14 @@
|
|||
Me.D = D
|
||||
NewTrade = False
|
||||
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
|
||||
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)
|
||||
|
||||
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
|
||||
DrawFilter(New Vector2(420, 200), 4, "Pokémon:", "")
|
||||
End If
|
||||
|
@ -492,7 +513,14 @@
|
|||
If StringHelper.IsNumeric(D.RequestID) = True Then
|
||||
If CInt(D.RequestID) > 0 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
|
||||
Dim p As Pokemon = TempPokemon
|
||||
|
||||
|
@ -883,14 +911,15 @@
|
|||
Dim index As Integer = Page * 20
|
||||
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()
|
||||
For Each file As String In d
|
||||
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(file)
|
||||
If StringHelper.IsNumeric(fileName) = True Then
|
||||
If CInt(fileName) > 0 And CInt(fileName) <= Pokedex.PokemonMaxCount Then
|
||||
If GTSMainScreen.GTSPokemon.Contains(CInt(fileName)) = True Then
|
||||
fileList.Add(CInt(fileName))
|
||||
Dim fileNumber As Integer = CInt(fileName.GetSplit(0, "_").GetSplit(0, ";"))
|
||||
If CInt(fileNumber) > 0 And CInt(fileNumber) <= Pokedex.PokemonMaxCount Then
|
||||
If GTSMainScreen.GTSPokemon.Contains(fileName) = True Then
|
||||
fileList.Add(fileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -899,8 +928,17 @@
|
|||
|
||||
While CurrentPokemon.Count < 20 And noMorePokemon = False
|
||||
If index <= fileList.Count - 1 Then
|
||||
Dim fileName As Integer = fileList(index)
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByID(fileName)
|
||||
Dim fileName As String = fileList(index)
|
||||
|
||||
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)
|
||||
SpriteList.Add(p.GetMenuTexture())
|
||||
index += 1
|
||||
|
|
|
@ -122,7 +122,14 @@
|
|||
P = Core.Player.Pokemons(Me.PokeIndex)
|
||||
Else
|
||||
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
|
||||
|
||||
P = TempPokemon
|
||||
|
@ -273,8 +280,8 @@
|
|||
Private Function MeetsCondition() As Boolean
|
||||
If PokeIndex > -1 Then
|
||||
Dim P As Pokemon = Core.Player.Pokemons(PokeIndex)
|
||||
|
||||
If P.Number = CInt(D.RequestID) And P.IsEgg() = False And P.HasHMMove() = False Then
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(P.Number, P.AdditionalData)
|
||||
If dexID = D.RequestID And P.IsEgg() = False And P.HasHMMove() = False Then
|
||||
If D.RequestGender <> "" Then
|
||||
Select Case D.RequestGender
|
||||
Case "Male"
|
||||
|
|
Loading…
Reference in New Issue