mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 07:44:31 +02:00
Attempt to fix client not able to perform Mega Evolution
This commit is contained in:
parent
25908af6b4
commit
24f0200dbd
@ -340,16 +340,19 @@
|
|||||||
If BattleScreen.IsRemoteBattle AndAlso BattleScreen.IsHost Then
|
If BattleScreen.IsRemoteBattle AndAlso BattleScreen.IsHost Then
|
||||||
BattleScreen.OppStatistics.Turns += 1
|
BattleScreen.OppStatistics.Turns += 1
|
||||||
BattleScreen.OwnStatistics.Turns += 1
|
BattleScreen.OwnStatistics.Turns += 1
|
||||||
If BattleScreen.ReceivedInput.StartsWith("MOVE|") Then
|
If BattleScreen.ReceivedInput.StartsWith("MOVE|") OrElse BattleScreen.ReceivedInput.StartsWith("MEGA|") Then
|
||||||
BattleScreen.OppStatistics.Moves += 1
|
BattleScreen.OppStatistics.Moves += 1
|
||||||
|
If BattleScreen.ReceivedInput.StartsWith("MEGA|") Then
|
||||||
|
BattleScreen.IsMegaEvolvingOpp = True
|
||||||
|
End If
|
||||||
Dim moveID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 5))
|
Dim moveID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 5))
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, moveID)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, moveID)}
|
||||||
ElseIf BattleScreen.ReceivedInput.StartsWith("SWITCH|") Then
|
ElseIf BattleScreen.ReceivedInput.StartsWith("SWITCH|") Then
|
||||||
BattleScreen.OppStatistics.Switches += 1
|
BattleScreen.OppStatistics.Switches += 1
|
||||||
Dim switchID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 7))
|
Dim switchID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 7))
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Switch, .Argument = switchID.ToString()}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Switch, .Argument = switchID.ToString()}
|
||||||
ElseIf BattleScreen.ReceivedInput.StartsWith("TEXT|") Then
|
ElseIf BattleScreen.ReceivedInput.StartsWith("TEXT|") Then
|
||||||
Dim text As String = BattleScreen.ReceivedInput.Remove(0, 5)
|
Dim text As String = BattleScreen.ReceivedInput.Remove(0, 5)
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Text, .Argument = text}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Text, .Argument = text}
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -821,7 +821,11 @@
|
|||||||
BattleScreen.BattleQuery.Clear()
|
BattleScreen.BattleQuery.Clear()
|
||||||
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
||||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||||
BattleScreen.SendClientCommand("MOVE|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString())
|
If BattleScreen.IsMegaEvolvingOwn Then
|
||||||
|
BattleScreen.SendClientCommand("MEGA|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString())
|
||||||
|
Else
|
||||||
|
BattleScreen.SendClientCommand("MOVE|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString())
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
BattleScreen.OwnStatistics.Moves += 1
|
BattleScreen.OwnStatistics.Moves += 1
|
||||||
BattleScreen.BattleQuery.Clear()
|
BattleScreen.BattleQuery.Clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user