Made incoming hall of fame entries to store useful data only.

This commit is contained in:
CaptainSegis 2017-01-20 02:22:05 -05:00
parent 2e5a135abe
commit 418154b282
2 changed files with 30 additions and 1 deletions

View File

@ -1637,7 +1637,36 @@ Public Class Pokemon
Me.HP = Me.HP.Clamp(0, Me.MaxHP) Me.HP = Me.HP.Clamp(0, Me.MaxHP)
End If End If
End Sub End Sub
''' <summary>
''' Returns the important save data from the Pokémon to be displayed in the Hall of Fame.
''' </summary>
Public Function GetHallOfFameData() As String
Dim Data As String = ""
Dim SaveGender As Integer = 0
If Me.Gender = Genders.Female Then
SaveGender = 1
End If
If Me.IsGenderless = True Then
SaveGender = 2
End If
Dim shinyString As String = "0"
If Me.IsShiny = True Then
shinyString = "1"
End If
Data = "{""Pokemon""[" & Me.Number & "]}" &
"{""Gender""[" & SaveGender & "]}" &
"{""NickName""[" & Me.NickName & "]}" &
"{""Level""[" & Me.Level & "]}" &
"{""OT""[" & Me.OT & "]}" &
"{""CatchTrainer""[" & Me.CatchTrainerName & "]}" &
"{""isShiny""[" & shinyString & "]}" &
"{""AdditionalData""[" & Me.AdditionalData & "]}" &
"{""IDValue""[" & Me.IndividualValue & "]}"
Return Data
End Function
''' <summary> ''' <summary>
''' Returns the save data from the Pokémon. ''' Returns the save data from the Pokémon.
''' </summary> ''' </summary>

View File

@ -459,7 +459,7 @@
For Each p As Pokemon In Core.Player.Pokemons For Each p As Pokemon In Core.Player.Pokemons
If p.IsEgg() = False Then If p.IsEgg() = False Then
Dim pData As String = p.GetSaveData() Dim pData As String = p.GetHallOfFameData()
newData &= vbNewLine & count & "," & pData newData &= vbNewLine & count & "," & pData
End If End If
Next Next