Fix form names

This commit is contained in:
JappaWakka 2023-07-09 11:55:07 +02:00
parent 6764062c79
commit d2d937e336
1 changed files with 24 additions and 6 deletions
P3D/Pokemon/Monster

View File

@ -2280,11 +2280,20 @@ Public Class Pokemon
Return "Egg"
Else
If Me.NickName = "" Then
If PokemonForms.GetFormName(Me) <> "" Then
Dim FormName As String = PokemonForms.GetFormName(Me)
If Localization.TokenExists("pokemon_name_" & FormName) = True Then
Return Localization.GetString("pokemon_name_" & FormName)
Else
Return FormName
End If
Else
If Localization.TokenExists("pokemon_name_" & Me.Name) = True Then
Return Localization.GetString("pokemon_name_" & Me.Name)
Else
Return Me.Name
End If
End If
Else
Return Me.NickName
End If
@ -2295,11 +2304,20 @@ Public Class Pokemon
''' Returns the properly translated name of a Pokémon if defined in the language files.
''' </summary>
Public Function GetName() As String
If PokemonForms.GetFormName(Me) <> "" Then
Dim FormName As String = PokemonForms.GetFormName(Me)
If Localization.TokenExists("pokemon_name_" & FormName) = True Then
Return Localization.GetString("pokemon_name_" & FormName)
Else
Return FormName
End If
Else
If Localization.TokenExists("pokemon_name_" & Me.Name) = True Then
Return Localization.GetString("pokemon_name_" & Me.Name)
Else
Return Me.Name
End If
End If
End Function
''' <summary>