Exemple #1
0
 public static new TBDLobby Join(Invitation invite, int queueId) {
   var lobby = new TBDLobby(queueId);
   Session.Current.CurrentLobby = lobby;
   var task = invite.Join();
   task.ContinueWith(t => lobby.GotLobbyStatus(t.Result));
   return lobby;
 }
Exemple #2
0
        public static new TBDLobby Join(Invitation invite, int queueId)
        {
            var lobby = new TBDLobby(queueId);

            Session.Current.CurrentLobby = lobby;
            var task = invite.Join();

            task.ContinueWith(t => lobby.GotLobbyStatus(t.Result));
            return(lobby);
        }
    public TBDLobbyPage(TBDLobby lobby) {
      InitializeComponent();
      this.lobby = lobby;
      LoadingGrid.Visibility = Visibility.Visible;

      lobby.Loaded += Lobby_Loaded;
      lobby.MemberJoined += Lobby_MemberJoined;
      //lobby.OnRemovedFromService += Lobby_RemovedFromService;

      lobby.CatchUp();
    }
Exemple #4
0
    public static new TBDLobby CreateLobby(int queueId) {
      var lobby = new TBDLobby(queueId);
      Session.Current.CurrentLobby = lobby;

      var guid = RiotServices.TeambuilderDraftService.CreateDraftPremade(queueId);
      RiotServices.AddHandler(guid, lcds => {
        lobby.GotGameData(lcds);
        var task = RiotServices.GameInvitationService.CreateGroupFinderLobby(queueId, lobby.GroupData.Phase.PremadeID.ToString());
        task.ContinueWith(t => lobby.GotLobbyStatus(t.Result));
      });

      return lobby;
    }
Exemple #5
0
        public static new TBDLobby CreateLobby(int queueId)
        {
            var lobby = new TBDLobby(queueId);

            Session.Current.CurrentLobby = lobby;

            var guid = RiotServices.TeambuilderDraftService.CreateDraftPremade(queueId);

            RiotServices.AddHandler(guid, lcds => {
                lobby.GotGameData(lcds);
                var task = RiotServices.GameInvitationService.CreateGroupFinderLobby(queueId, lobby.GroupData.Phase.PremadeID.ToString());
                task.ContinueWith(t => lobby.GotLobbyStatus(t.Result));
            });

            return(lobby);
        }
Exemple #6
0
        public Lobby Accept()
        {
            var metadata = JSONParser.ParseObject(invite.GameMetaData);

            if ((int)metadata["gameTypeConfigId"] == GameConfig.CapDraft.Key)
            {
                return(TBDLobby.Join(this, (int)metadata["queueId"]));
            }
            else
            {
                switch ((string)metadata["gameType"])
                {
                case "PRACTICE_GAME":
                    return(CustomLobby.Join(this));

                case "NORMAL_GAME":
                    return(QueueLobby.Join(this, (int)metadata["queueId"]));

                default:
                    throw new Exception("Lobby type not found: " + invite.InviteType);
                }
            }
        }
Exemple #7
0
 internal TBDLobbyMember(Riot.Platform.Member member, TBDSlotData data, TBDLobby lobby) : base(member, lobby)
 {
     this.data = data;
 }
Exemple #8
0
 internal TBDLobbyMember(Riot.Platform.Member member, TBDSlotData data, TBDLobby lobby) : base(member, lobby) {
   this.data = data;
 }