Fix localization tokens for catchlocation/method
This commit is contained in:
parent
c3fb81a4c4
commit
d9fe5cdb09
|
@ -418,7 +418,11 @@ Public Class Pokemon
|
|||
|
||||
Public Property CatchLocation() As String
|
||||
Get
|
||||
Return Me._catchLocation
|
||||
If _catchLocation.StartsWith("<system.token(") AndAlso _catchLocation.EndsWith(")>") Then
|
||||
Return Localization.GetString(_catchLocation.Remove(_catchLocation.Length - 2, 2).Remove(0, "<system.token(".Length))
|
||||
Else
|
||||
Return Me._catchLocation
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Me._catchLocation = value
|
||||
|
@ -427,7 +431,11 @@ Public Class Pokemon
|
|||
|
||||
Public Property CatchTrainerName() As String
|
||||
Get
|
||||
Return Me._catchTrainerName
|
||||
If _catchTrainerName.StartsWith("<system.token(") AndAlso _catchTrainerName.EndsWith(")>") Then
|
||||
Return Localization.GetString(_catchTrainerName.Remove(_catchTrainerName.Length - 2, 2).Remove(0, "<system.token(".Length))
|
||||
Else
|
||||
Return Me._catchTrainerName
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Me._catchTrainerName = value
|
||||
|
@ -436,7 +444,11 @@ Public Class Pokemon
|
|||
|
||||
Public Property CatchMethod() As String
|
||||
Get
|
||||
Return Me._catchMethod
|
||||
If _catchMethod.StartsWith("<system.token(") AndAlso _catchMethod.EndsWith(")>") Then
|
||||
Return Localization.GetString(_catchMethod.Remove(_catchMethod.Length - 2, 2).Remove(0, "<system.token(".Length))
|
||||
Else
|
||||
Return Me._catchMethod
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Me._catchMethod = value
|
||||
|
|
|
@ -273,18 +273,8 @@
|
|||
oppPokemon.Item = Item.GetItemByID(itemID)
|
||||
End If
|
||||
|
||||
Dim catchLocationLocalization As String = Script.SaveNPCTrade(10)
|
||||
If Script.SaveNPCTrade(10).StartsWith("<system.token(") AndAlso Script.SaveNPCTrade(10).EndsWith(")>") Then
|
||||
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(Script.SaveNPCTrade(10).Length - 2, 2))
|
||||
End If
|
||||
|
||||
Dim catchMethodLocalization As String = Script.SaveNPCTrade(11)
|
||||
If Script.SaveNPCTrade(11).StartsWith("<system.token(") AndAlso Script.SaveNPCTrade(11).EndsWith(")>") Then
|
||||
catchMethodLocalization = Localization.GetString(catchMethodLocalization.Remove(0, "<system.token(".Length).Remove(Script.SaveNPCTrade(11).Length - 2, 2))
|
||||
End If
|
||||
|
||||
oppPokemon.CatchLocation = catchLocationLocalization
|
||||
oppPokemon.CatchMethod = catchMethodLocalization
|
||||
oppPokemon.CatchLocation = Script.SaveNPCTrade(10)
|
||||
oppPokemon.CatchMethod = Script.SaveNPCTrade(11)
|
||||
oppPokemon.NickName = Script.SaveNPCTrade(12)
|
||||
|
||||
Dim message1 As String = Script.SaveNPCTrade(13)
|
||||
|
|
Loading…
Reference in New Issue