Example #1
0
    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();
    }
Example #2
0
    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();
    }
Example #3
0
    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);
        }
      }
    }