feat(matchmaking): method 15 - getdetailedparticipants
All checks were successful
Build and Test / build-editions (sonic-transformed) (push) Successful in 3m49s
Build and Test / build-editions (splatoon) (push) Successful in 4m9s
Build and Test / build-editions (minecraft-wiiu) (push) Successful in 4m9s
Build and Test / build-editions (mario-tennis) (push) Successful in 5m25s
Build and Test / build-editions (splatoon-testfire) (push) Successful in 6m1s
Build and Test / build-editions (wii-u-chat) (push) Successful in 6m34s
Build and Test / build-editions (fast-racing-neo) (push) Successful in 6m36s
Build and Test / build-editions (DATABASE_SMM, puyopuyo) (push) Successful in 6m39s
Build and Test / build-editions (DATABASE_SMM, super-mario-maker) (push) Successful in 6m55s
Build and Test / build-editions (terraria) (push) Successful in 6m55s
Build and Test / build-editions (DATABASE_FRIENDS, friends) (push) Successful in 6m56s
Build and Test / build-editions (DATABASE_SMM, wii-sports-club) (push) Successful in 7m54s
All checks were successful
Build and Test / build-editions (sonic-transformed) (push) Successful in 3m49s
Build and Test / build-editions (splatoon) (push) Successful in 4m9s
Build and Test / build-editions (minecraft-wiiu) (push) Successful in 4m9s
Build and Test / build-editions (mario-tennis) (push) Successful in 5m25s
Build and Test / build-editions (splatoon-testfire) (push) Successful in 6m1s
Build and Test / build-editions (wii-u-chat) (push) Successful in 6m34s
Build and Test / build-editions (fast-racing-neo) (push) Successful in 6m36s
Build and Test / build-editions (DATABASE_SMM, puyopuyo) (push) Successful in 6m39s
Build and Test / build-editions (DATABASE_SMM, super-mario-maker) (push) Successful in 6m55s
Build and Test / build-editions (terraria) (push) Successful in 6m55s
Build and Test / build-editions (DATABASE_FRIENDS, friends) (push) Successful in 6m56s
Build and Test / build-editions (DATABASE_SMM, wii-sports-club) (push) Successful in 7m54s
This commit is contained in:
parent
be7bc79762
commit
2a82146a45
2 changed files with 35 additions and 3 deletions
|
|
@ -6,12 +6,11 @@ use rnex_mm_protos::{
|
|||
LocalMatchMakingProtocol, RemoteMatchMakingClientProtocol,
|
||||
matchmake::{
|
||||
AutoMatchmakeParam, CreateMatchmakeSessionParam, Gathering, JoinMatchmakeSessionParam,
|
||||
Matchmake, MatchmakeSession, MatchmakeSessionSearchCriteria,
|
||||
Matchmake, MatchmakeSession, MatchmakeSessionSearchCriteria, ParticipantDetails,
|
||||
},
|
||||
matchmake_ext::MatchmakeExt,
|
||||
matchmake_extension::MatchmakeExtension,
|
||||
nat_traversal::NatTraversal,
|
||||
nat_traversal::RemoteNatTraversalConsole,
|
||||
nat_traversal::{NatTraversal, RemoteNatTraversalConsole},
|
||||
notifications::{
|
||||
NotificationEvent, RemoteNotification,
|
||||
notification_types::{END_GATHERING, REQUEST_JOIN_GATHERING},
|
||||
|
|
@ -633,6 +632,28 @@ impl Matchmake for MatchmakeUser {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn get_detailed_participants(&self, gid: u32) -> Result<Vec<ParticipantDetails>, ErrorCode> {
|
||||
let session = self.matchmake_manager.get_session(gid).await?;
|
||||
let session = session.lock().await;
|
||||
|
||||
let mut participant_details = Vec::with_capacity(session.connected_players.len());
|
||||
|
||||
for player_weak in &session.connected_players {
|
||||
let Some(player) = player_weak.upgrade() else {
|
||||
continue;
|
||||
};
|
||||
|
||||
participant_details.push(ParticipantDetails {
|
||||
participant: player.base.pid,
|
||||
name: "test".to_string(),
|
||||
message: String::new(),
|
||||
participants: 1,
|
||||
});
|
||||
}
|
||||
|
||||
Ok(participant_details)
|
||||
}
|
||||
}
|
||||
|
||||
impl MatchmakeExt for MatchmakeUser {
|
||||
|
|
|
|||
Loading…
Reference in a new issue