mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Fix requests not being blocked in bug contest
This commit is contained in:
parent
d3bde7eef0
commit
c94f7a2b1b
@ -318,19 +318,28 @@ Public Class OverworldScreen
|
||||
''' </summary>
|
||||
''' <returns>True, if no requests are in the queue, False otherwise.</returns>
|
||||
Private Function HandleServerRequests() As Boolean
|
||||
If GameJolt.PokegearScreen.BattleRequestData <> -1 Then 'A Servers ID from another player is set here.
|
||||
If Core.ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.BattleRequestData) = True Then 'If the player still exists on the server.
|
||||
Core.SetScreen(New GameJolt.PokegearScreen(Core.CurrentScreen, GameJolt.PokegearScreen.EntryModes.BattleRequest, {GameJolt.PokegearScreen.BattleRequestData, Core.ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.BattleRequestData).GameJoltId}))
|
||||
Return False
|
||||
Else 'Otherwise, reset the data.
|
||||
If Screen.Level.IsBugCatchingContest = False Then
|
||||
If GameJolt.PokegearScreen.BattleRequestData <> -1 Then 'A Servers ID from another player is set here.
|
||||
If Core.ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.BattleRequestData) = True Then 'If the player still exists on the server.
|
||||
Core.SetScreen(New GameJolt.PokegearScreen(Core.CurrentScreen, GameJolt.PokegearScreen.EntryModes.BattleRequest, {GameJolt.PokegearScreen.BattleRequestData, Core.ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.BattleRequestData).GameJoltId}))
|
||||
Return False
|
||||
Else 'Otherwise, reset the data.
|
||||
GameJolt.PokegearScreen.BattleRequestData = -1
|
||||
End If
|
||||
End If
|
||||
If GameJolt.PokegearScreen.TradeRequestData <> -1 Then 'A Servers ID from another player is set here.
|
||||
If Core.ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.TradeRequestData) = True Then 'If the player still exists on the server.
|
||||
Core.SetScreen(New GameJolt.PokegearScreen(Core.CurrentScreen, GameJolt.PokegearScreen.EntryModes.TradeRequest, {GameJolt.PokegearScreen.TradeRequestData, Core.ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.TradeRequestData).GameJoltId}))
|
||||
Return False
|
||||
Else 'Otherwise, reset the data.
|
||||
GameJolt.PokegearScreen.TradeRequestData = -1
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If GameJolt.PokegearScreen.BattleRequestData <> -1 Then
|
||||
GameJolt.PokegearScreen.BattleRequestData = -1
|
||||
End If
|
||||
End If
|
||||
If GameJolt.PokegearScreen.TradeRequestData <> -1 Then 'A Servers ID from another player is set here.
|
||||
If Core.ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.TradeRequestData) = True Then 'If the player still exists on the server.
|
||||
Core.SetScreen(New GameJolt.PokegearScreen(Core.CurrentScreen, GameJolt.PokegearScreen.EntryModes.TradeRequest, {GameJolt.PokegearScreen.TradeRequestData, Core.ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.TradeRequestData).GameJoltId}))
|
||||
Return False
|
||||
Else 'Otherwise, reset the data.
|
||||
If GameJolt.PokegearScreen.TradeRequestData <> -1 Then
|
||||
GameJolt.PokegearScreen.TradeRequestData = -1
|
||||
End If
|
||||
End If
|
||||
|
Loading…
x
Reference in New Issue
Block a user