Ejemplo n.º 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();
            }
        }
Ejemplo n.º 2
0
    public InvitedPlayer(LobbyInvitee player) {
      InitializeComponent();

      this.player = player;
      this.player.Changed += (s, e) => Dispatcher.Invoke(Update);
      Update();
    }
Ejemplo n.º 3
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();
            }
        }
Ejemplo n.º 4
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);
                }
            }
        }
Ejemplo n.º 5
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();
    }
Ejemplo n.º 6
0
 public InviteeEventArgs(LobbyInvitee invitee)
 {
     Invitee = invitee;
 }
Ejemplo n.º 7
0
 public InviteeEventArgs(LobbyInvitee invitee) {
   Invitee = invitee;
 }
Ejemplo n.º 8
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();
    }
Ejemplo n.º 9
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);
        }
      }
    }