CInt(-1).ToString -> "-1" correction

This commit is contained in:
JappaWakka 2023-05-31 12:34:22 +02:00
parent 319ad9b231
commit ac4e5801c2
3 changed files with 11 additions and 11 deletions

View File

@ -23,11 +23,11 @@
End Enum End Enum
Public Shared Function GetScriptString(ByVal p As Pokemon, ByVal cPosition As Vector3, ByVal facing As Integer) As String Public Shared Function GetScriptString(ByVal p As Pokemon, ByVal cPosition As Vector3, ByVal facing As Integer) As String
If PickupItemID > CInt(-1).ToString Then If PickupItemID > "-1" Then
If PickupIndividualValue = p.IndividualValue Then If PickupIndividualValue = p.IndividualValue Then
Return GenerateItemReaction(p, cPosition, facing) Return GenerateItemReaction(p, cPosition, facing)
Else Else
PickupItemID = CInt(-1).ToString PickupItemID = "-1"
PickupIndividualValue = "" PickupIndividualValue = ""
End If End If
End If End If
@ -139,7 +139,7 @@
End If End If
s &= ":end" s &= ":end"
PickupItemID = CInt(-1).ToString PickupItemID = "-1"
PickupIndividualValue = "" PickupIndividualValue = ""
Return s Return s
@ -873,7 +873,7 @@
End Class End Class
Shared PickupIndividualValue As String = "" 'This value holds the individual value of the Pokémon that picked up the item. Shared PickupIndividualValue As String = "" 'This value holds the individual value of the Pokémon that picked up the item.
Shared PickupItemID As String = CInt(-1).ToString 'This is the Item ID of the item that the Pokémon picked up. -1 means no item got picked up. Shared PickupItemID As String = "-1" 'This is the Item ID of the item that the Pokémon picked up. -1 means no item got picked up.
Public Shared Sub CheckForRandomPickup() Public Shared Sub CheckForRandomPickup()
'Checks if the first Pokémon in the party is following the player: 'Checks if the first Pokémon in the party is following the player:
@ -883,7 +883,7 @@
If Core.Player.GetWalkPokemon().Status = Pokemon.StatusProblems.None Then If Core.Player.GetWalkPokemon().Status = Pokemon.StatusProblems.None Then
'If the player switched the Pokémon, reset the item ID. 'If the player switched the Pokémon, reset the item ID.
If PickupIndividualValue <> Core.Player.GetWalkPokemon().IndividualValue Then If PickupIndividualValue <> Core.Player.GetWalkPokemon().IndividualValue Then
PickupItemID = CInt(-1).ToString PickupItemID = "-1"
End If End If
'Check if an item should be generated: 'Check if an item should be generated:
@ -1053,7 +1053,7 @@
End If End If
Else Else
'Reset the system if no Pokémon: 'Reset the system if no Pokémon:
PickupItemID = CInt(-1).ToString PickupItemID = "-1"
PickupIndividualValue = "" PickupIndividualValue = ""
End If End If
End If End If

View File

@ -13,12 +13,12 @@
Dim AttackPos As Single = 320.0F Dim AttackPos As Single = 320.0F
Dim canForget As Boolean = True Dim canForget As Boolean = True
Dim MachineItemID As String = CInt(-1).ToString Dim MachineItemID As String = "-1"
Dim currentCharIndex As Integer = 0 Dim currentCharIndex As Integer = 0
Public Sub New(ByVal currentScreen As Screen, ByVal Pokemon As Pokemon, ByVal newAttack As BattleSystem.Attack) Public Sub New(ByVal currentScreen As Screen, ByVal Pokemon As Pokemon, ByVal newAttack As BattleSystem.Attack)
Me.New(currentScreen, Pokemon, newAttack, CInt(-1).ToString) Me.New(currentScreen, Pokemon, newAttack, "-1")
End Sub End Sub
Public Sub New(ByVal currentScreen As Screen, ByVal Pokemon As Pokemon, ByVal newAttack As BattleSystem.Attack, ByVal MachineItemID As String) Public Sub New(ByVal currentScreen As Screen, ByVal Pokemon As Pokemon, ByVal newAttack As BattleSystem.Attack, ByVal MachineItemID As String)
@ -261,7 +261,7 @@
Pokemon.Attacks.RemoveAt(AttackIndex) Pokemon.Attacks.RemoveAt(AttackIndex)
Pokemon.Attacks.Insert(AttackIndex, newAttack) Pokemon.Attacks.Insert(AttackIndex, newAttack)
If Me.MachineItemID <> CInt(-1).ToString Then If Me.MachineItemID <> "-1" Then
PlayerStatistics.Track("TMs/HMs used", 1) PlayerStatistics.Track("TMs/HMs used", 1)
If CBool(GameModeManager.GetGameRuleValue("SingleUseTM", "0")) = True Then If CBool(GameModeManager.GetGameRuleValue("SingleUseTM", "0")) = True Then
Dim TechMachine As Item = Item.GetItemByID(Me.MachineItemID) Dim TechMachine As Item = Item.GetItemByID(Me.MachineItemID)

View File

@ -75,7 +75,7 @@ Public Class PartyScreen
Public LearnType As Integer = 0 Public LearnType As Integer = 0
Dim moveLearnArg As Object = Nothing Dim moveLearnArg As Object = Nothing
Public EvolutionItemID As String = CInt(-1).ToString Public EvolutionItemID As String = "-1"
'Stuff related to blurred PreScreens 'Stuff related to blurred PreScreens
Private _preScreenTexture As RenderTarget2D Private _preScreenTexture As RenderTarget2D
Private _preScreenTarget As RenderTarget2D Private _preScreenTarget As RenderTarget2D
@ -376,7 +376,7 @@ Public Class PartyScreen
'Able/unable display (when using an Evolution Item) 'Able/unable display (when using an Evolution Item)
Dim ItemLabel As String = "" Dim ItemLabel As String = ""
If EvolutionItemID <> CInt(-1).ToString Then If EvolutionItemID <> "-1" Then
ItemLabel = "Unable!" ItemLabel = "Unable!"
If p.IsEgg() = False And p.CanEvolve(EvolutionCondition.EvolutionTrigger.ItemUse, EvolutionItemID.ToString()) = True Then If p.IsEgg() = False And p.CanEvolve(EvolutionCondition.EvolutionTrigger.ItemUse, EvolutionItemID.ToString()) = True Then
ItemLabel = "Able!" ItemLabel = "Able!"