예제 #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();
            }
        }
예제 #2
0
    public InvitedPlayer(LobbyInvitee player) {
      InitializeComponent();

      this.player = player;
      this.player.Changed += (s, e) => Dispatcher.Invoke(Update);
      Update();
    }
예제 #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();
            }
        }
예제 #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);
                }
            }
        }
예제 #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();
    }
예제 #6
0
 public InviteeEventArgs(LobbyInvitee invitee)
 {
     Invitee = invitee;
 }
예제 #7
0
 public InviteeEventArgs(LobbyInvitee invitee) {
   Invitee = invitee;
 }
예제 #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();
    }
예제 #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);
        }
      }
    }