Made NPC Trade CatchMethod & Location localizable

Also fixed catchlocation with Pokémon add commands
This commit is contained in:
JappaWakka 2023-06-04 18:18:33 +02:00
parent 5b6c902f65
commit 4805bb2836
2 changed files with 14 additions and 4 deletions

View File

@ -273,8 +273,18 @@
oppPokemon.Item = Item.GetItemByID(itemID)
End If
oppPokemon.CatchLocation = Script.SaveNPCTrade(10)
oppPokemon.CatchMethod = Script.SaveNPCTrade(11)
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.NickName = Script.SaveNPCTrade(12)
Dim message1 As String = Script.SaveNPCTrade(13)

View File

@ -74,7 +74,7 @@
If commas > 3 Then
Dim catchLocationLocalization As String = argument.GetSplit(4)
If argument.GetSplit(4).StartsWith("<system.token(") AndAlso argument.GetSplit(4).EndsWith(")>") Then
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(2).Length - 2, 2))
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(4).Length - 2, 2))
End If
catchLocation = catchLocationLocalization
End If
@ -793,7 +793,7 @@
If commas > 3 Then
Dim catchLocationLocalization As String = argument.GetSplit(4)
If argument.GetSplit(4).StartsWith("<system.token(") AndAlso argument.GetSplit(4).EndsWith(")>") Then
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(2).Length - 2, 2))
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(4).Length - 2, 2))
End If
catchLocation = catchLocationLocalization
End If