(ctx context.Context, rpc *rlapi.PsyNetRPC, playerID rlapi.PlayerID)
| 187 | } |
| 188 | |
| 189 | func allMatchmaking(ctx context.Context, rpc *rlapi.PsyNetRPC, playerID rlapi.PlayerID) error { |
| 190 | regions := []rlapi.MatchmakingRegion{ |
| 191 | {Name: "USE1", Ping: 33}, |
| 192 | {Name: "USE3", Ping: 33}, |
| 193 | } |
| 194 | playlists := []int{10, 11} |
| 195 | |
| 196 | estimatedQueueTime, err := rpc.StartMatchmaking(ctx, playlists, regions, false, "", []rlapi.PlayerID{playerID}) |
| 197 | if err != nil { |
| 198 | return fmt.Errorf("StartMatchmaking err: %w", err) |
| 199 | } |
| 200 | slog.Debug("StartMatchmaking", slog.Any("estimatedQueueTime", estimatedQueueTime)) |
| 201 | |
| 202 | err = rpc.PlayerCancelMatchmaking(ctx) |
| 203 | if err != nil { |
| 204 | return fmt.Errorf("PlayerCancelMatchmaking err: %w", err) |
| 205 | } |
| 206 | |
| 207 | err = rpc.PlayerSearchPrivateMatch(ctx, "USE1", 6) |
| 208 | if err != nil { |
| 209 | return fmt.Errorf("PlayerSearchPrivateMatch err: %w", err) |
| 210 | } |
| 211 | |
| 212 | return nil |
| 213 | } |
| 214 | |
| 215 | func allParty(ctx context.Context, rpc *rlapi.PsyNetRPC) error { |
| 216 | party, err := rpc.CreateParty(ctx) |
no test coverage detected