protected override void GotLobbyStatus(LobbyStatus status) { lobbyStatus = status; if (ChatLobby == null) { ChatLobby = new GroupChat(RiotChat.GetLobbyRoom(status.InvitationID, status.ChatKey), status.ChatKey); } foreach (var raw in status.InvitedPlayers) { if (!Invitees.ContainsKey(raw.SummonerId)) { var invitee = new LobbyInvitee(raw, this); Invitees.Add(invitee.SummonerID, invitee); OnMemberJoined(invitee); } } if (GroupData != null) { UpdateSlots(); } if (!loaded) { OnLoaded(); } }
public InvitedPlayer(LobbyInvitee player) { InitializeComponent(); this.player = player; this.player.Changed += (s, e) => Dispatcher.Invoke(Update); Update(); }
protected virtual void GotLobbyStatus(LobbyStatus status) { lobbyStatus = status; if (ChatLobby == null) { ChatLobby = new GroupChat(RiotChat.GetLobbyRoom(status.InvitationID, status.ChatKey), status.ChatKey); } var todo = status.Members.ToDictionary(m => m.SummonerId); foreach (var member in Members) { Member raw; if (todo.TryGetValue(member.SummonerID, out raw)) { member.Update(raw); todo.Remove(member.SummonerID); } else { Members.Remove(member); OnMemberLeft(member); } } foreach (var raw in todo.Values) { var member = new QueueLobbyMember(raw, this); Members.Add(member); OnMemberJoined(member); } foreach (var raw in status.InvitedPlayers) { if (!Invitees.ContainsKey(raw.SummonerId)) { var invitee = new LobbyInvitee(raw, this); Invitees.Add(invitee.SummonerID, invitee); OnMemberJoined(invitee); } } if (!loaded) { OnLoaded(); } }
protected virtual void GotLobbyStatus(LobbyStatus status) { foreach (var raw in status.Members) { members[raw.SummonerId] = raw; } foreach (var raw in status.InvitedPlayers) { if (!Invitees.ContainsKey(raw.SummonerId)) { var invitee = new LobbyInvitee(raw, this); Invitees.Add(invitee.SummonerID, invitee); OnMemberJoined(invitee); } } }
protected override void GotLobbyStatus(LobbyStatus status) { lobbyStatus = status; if (ChatLobby == null) { ChatLobby = new GroupChat(RiotChat.GetLobbyRoom(status.InvitationID, status.ChatKey), status.ChatKey); } foreach (var raw in status.InvitedPlayers) { if (!Invitees.ContainsKey(raw.SummonerId)) { var invitee = new LobbyInvitee(raw, this); Invitees.Add(invitee.SummonerID, invitee); OnMemberJoined(invitee); } } if (GroupData != null) UpdateSlots(); if (!loaded) OnLoaded(); }
public InviteeEventArgs(LobbyInvitee invitee) { Invitee = invitee; }
protected virtual void GotLobbyStatus(LobbyStatus status) { lobbyStatus = status; if (ChatLobby == null) { ChatLobby = new GroupChat(RiotChat.GetLobbyRoom(status.InvitationID, status.ChatKey), status.ChatKey); } var todo = status.Members.ToDictionary(m => m.SummonerId); foreach (var member in Members) { Member raw; if (todo.TryGetValue(member.SummonerID, out raw)) { member.Update(raw); todo.Remove(member.SummonerID); } else { Members.Remove(member); OnMemberLeft(member); } } foreach (var raw in todo.Values) { var member = new QueueLobbyMember(raw, this); Members.Add(member); OnMemberJoined(member); } foreach (var raw in status.InvitedPlayers) { if (!Invitees.ContainsKey(raw.SummonerId)) { var invitee = new LobbyInvitee(raw, this); Invitees.Add(invitee.SummonerID, invitee); OnMemberJoined(invitee); } } if (!loaded) OnLoaded(); }