public void StartUp() { GameMaster master = GameMaster.GetInstance(); EquipArmorSkin(); _UI = master.GetUI().GetComponent <UserInterfaceCore>(); }
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { var messageData = JsonConvert.DeserializeObject <PartyPhaseMessage>( Encoding.UTF8.GetString(Gzip.Decompress(Convert.FromBase64String("H4sIAAAAAAAA/+VYTU/jMBC98yuinKkU5zt7a0vFVgttRXtDCDnJQCMcuxs7sBXiv6+dNiH9wOwiUFbaXtJ6ZjzPL/bMq59PDMNMWEkFFOY3wz9Vv1dLzGGCc5Aj5vB7/3I2nk5u56OL0XBhVh4/SyhhnEq761jVSLLE+SpjdA4EEjEXWKjoZ2mSRgE4r7xN5N3ZXhxHPdv2cM/F4PVCP3B6gR/FyAl8cANUpdhGDZdYXDH2gWhextU6VNygP7mdjYc/ahtORAVVXGRcSIfrathonsYW+Oazda8goNM9AyuGQMgRm1ivqtytvFtLTVUVZO2aWL4iIEBZ7jDh0BhfTt/F5mmweR1jizTYoo6xBRpsQcfYHA02p2Nslgab9RFsoft54FwNOLdj4nwNNr9jbKEGW9gxNluDzf5SbNtvN9XzZttFkrIogIp+3UzGNIVfr7OaCRSQM5oBH6wPnJ5fGi9CeNMq1boIySBdyObX6kx7pDQNdbfnJMePHy9ziQOKuqXjOGVGxo0cJ9m9edR1U5gjy7FcPzpK4CxLHsZSNlBxSOTbHGPOs3sK6YzxTDGi4Eymk9EeipVcCNos0D202EdOMX/Itvne3VHvkYe05PWfgLMcRmm61lDn+shFked2Sd2bzO1z+nnU2VrqVkzKQoZspNtzge9Zdoj+M+IcLXHnxjlLjUBHWxhECHnOP0mbjb6KNldL21mB7xm9yOgDijTc+YEbRnLTdVrm0Fvkvb/l6uZUO5pAIV//YQOxjxPraYnVkPkX7/SN1H53qYPuUofdpY4+IfWOQKqlDWEJJjOC13DwJ7kWTwvZEsgiy+Eyk7JH6aDIkp89J2m/ghxnNKP3jWPgO35QXxUUOAU1eF2LM6mi2NN0JWTEtBTTuwGmKrqWdm2vuTxTm2uLzUkVRbljPytXJEuwAFUL+N4MBRSMkN37jjrwqrIdZG2ieLOohsyauhgLQWDAGBfH5x68OhzMHqtRHBNQKxuqy512gWrPrWTpI25J3sYJbywthd1rSpRZUvlqHyCdV9WozXsloytIPbSzoLpYDoAmy4MlxWp0RBXmQyivdXaT6aTecdXcZslhTB/lNmHFeobF0rZQ2Cj4l9/w94A44RIAAA==")))); UserInterfaceCore.ChangeMainPageView <ChampionSelectPage>(messageData); }
void Awake() { _master = GameMaster.GetInstance(); _player = _master.GetPlayer().GetComponent <PlayerCore>(); _progress = _master.gameObject.GetComponent <GameProgress>(); _ui = _master.GetUI().GetComponent <UserInterfaceCore>(); }
public FrameworkElement Run(params object[] data) { //Create the main view UserInterfaceCore.MainView = new MainControl(); //Change the view the main view has UserInterfaceCore.ChangeView(typeof(LoginControl), data); //Return the main view to base application return(UserInterfaceCore.MainView); }
public LoginControl(params object[] data) { //Get the language UserInterfaceCore.SetResource(data[0].ToString()); //Remove resource dictionaries Resources.Clear(); Resources.MergedDictionaries.Clear(); //Set the correct resource dictionary Resources.MergedDictionaries.Add(UserInterfaceCore.MainLanguage); }
private void ButtonOnClick(object sender, RoutedEventArgs e) { if (e.Source is Button butt) { if ((int)butt.Tag != 430 && (int)butt.Tag != 830) { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("NotFinishedFeature")); return; } UserInterfaceCore.ChangeMainPageView <LobbyPage>(butt.Tag); } }
private async void ReadRtmpResp(object sender, MessageReceivedEventArgs eventArgs) { if (eventArgs.Body is LcdsServiceProxyResponse proxy) { if (proxy.MessageId == null && proxy.MethodName == "tbdGameDtoV1" && proxy.ServiceName == "teambuilder-draft") { var messageData = JsonConvert.DeserializeObject <PartyPhaseMessage>( Encoding.UTF8.GetString(Gzip.Decompress(Convert.FromBase64String(proxy.Payload)))); if (messageData.PhaseName == "MATCHMAKING") { await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => StartGameButton.Content = "Matchmaking")); } else if (messageData.PhaseName == "AFK_CHECK") { if (_autoAccept) { var acceptData = await StaticVars.ActiveClient.RiotProxyCalls.DoLcdsProxyCallWithResponse( "teambuilder-draft", "indicateAfkReadinessV1", "{\"afkReady\":true}"); await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { if (acceptData.Status != "ACK") { UserInterfaceCore.HolderPage.ShowNotification( UserInterfaceCore.ShortNameToString("UnknownResult")); } UserInterfaceCore.Flash?.Invoke(); UserInterfaceCore.HolderPage.ShowNotification( UserInterfaceCore.ShortNameToString("AcceptedGame")); })); } else { //U piece of shit. No. just no } } else if (messageData.PhaseName == "CHAMPION_SELECT") { await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { //Really bad method. Don't think that this can play more than one game at a time. Will fix UserInterfaceCore.ChangeMainPageView <ChampionSelectPage>(messageData); })); } } } }
public void OnRtmpMessage(object sender, MessageReceivedEventArgs eventArgs) { if (eventArgs.Body is ClientDynamicConfigurationNotification notif) { Configs = JsonConvert.DeserializeObject <Dictionary <string, Dictionary <string, object> > >( Encoding.UTF8.GetString(Gzip.Decompress(Convert.FromBase64String(notif.Configs)))); } else if (eventArgs.Body is PlayerCredentialsDTO cred) { StartGame(cred); } else if (eventArgs.Body is EndOfGameStats stats) { UserInterfaceCore.ChangeMainPageView <EndOfGameStats>(stats); } }
private async void CancelGameButton_OnClick(object sender, RoutedEventArgs e) { await Lock("false"); var sendData = JsonConvert.SerializeObject(new BodyHelper { body = "\"DECLINED\"", method = "PUT", url = $"v1/parties/{StaticVars.ActiveClient.CurrentParty.Payload.CurrentParty.PartyId}/members/{StaticVars.ActiveClient.LoginDataPacket.AllSummonerData.Summoner.Puuid:D}/role" }); await StaticVars.ActiveClient.RiotProxyCalls.DoLcdsProxyCallWithResponse("parties.service", "proxy", sendData); UserInterfaceCore.TypeControls.Remove(typeof(LobbyPage)); UserInterfaceCore.ChangeMainPageView <HomePage>(); }
public FrameworkElement Run(params object[] data) { //Create the main view UserInterfaceCore.HolderPage = new HolderPage(); //Get the language UserInterfaceCore.SetResource(data[0].ToString()); StaticVars.IcyWindLocation = System.IO.Path.GetDirectoryName((string)data[1]); UserInterfaceCore.Focus = () => FlashWindow.SetForegroundWindow((IntPtr)data[2]); UserInterfaceCore.Flash = () => FlashWindow.Flash((IntPtr)data[2], 20); //Look for the latest system yaml files RiotUpdateHandler.GetLatestSystemYaml(); //RiotUpdateHandler.GetLatestSystemYamlPbe(); //Change the view the main view has UserInterfaceCore.ChangeView(typeof(LoginPage)); //Return the main view to base application return(UserInterfaceCore.HolderPage); }
private void LoginButton_OnClick(object sender, RoutedEventArgs e) { try { var username = LoginUsernameBox.Text.ToLower(); var password = LoginPasswordBox.Password; var regionData = RiotClientData.ReadSystemRegionData(Path.Combine(StaticVars.IcyWindLocation, "IcyWindAssets", "system", "system.yaml"), RegionComboBox.SelectedValue.ToString()); var region = RegionComboBox.SelectedValue.ToString(); var thread = new Thread((async() => { var openId = RiotAuth.GetOpenIdConfig(); await RiotAuth.Login(this, Dispatcher, username, password, region, openId, false, () => Reload_OnClick(this, null)); })); thread.Start(); } catch { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("LoginErrorGeneric")); } LoginGrid.Visibility = Visibility.Hidden; }
public AccountSelectorPage() { InitializeComponent(); AddNewAccount.Content = UserInterfaceCore.ShortNameToString("AddAccount"); LoginButton.Content = UserInterfaceCore.ShortNameToString("Login"); //TODO: Add PBE and KR UpdateRegionComboBox.ItemsSource = new[] { "Live" }; UpdateRegionComboBox.SelectedItem = "Live"; RegionComboBox.SelectedItem = "NA"; UsernameImage.Source = new BitmapImage(new Uri(System.IO.Path.Combine(StaticVars.IcyWindLocation, "IcyWindAssets", "ic_account_circle_black_36dp.png"))); PasswordImg.Source = new BitmapImage(new Uri(System.IO.Path.Combine(StaticVars.IcyWindLocation, "IcyWindAssets", "ic_vpn_key_36pt.png"))); foreach (var account in StaticVars.UserClientList) { //TODO: Get the chat status UserListView.Items.Add(new UserAccount(account.LoginDataPacket.AllSummonerData.Summoner.Name, account.LoginDataPacket.AllSummonerData.SummonerLevelAndPoints.SummonerLevel.ToString(), account.RegionData.RegionName, "IcyWind 2018", account.LoginDataPacket.AllSummonerData.Summoner.ProfileIconId.ToString(), Brushes.Green, account)); } }
private void Login_Click(object sender, RoutedEventArgs e) { LoginProgressBar.Visibility = Visibility.Visible; var loginCred = new LoginCredentials { Username = Username.Text, Password = Password.Password }; //Missing information. This is done to save bandwidth for the user. // if (string.IsNullOrWhiteSpace(loginCred.Username) || string.IsNullOrWhiteSpace(loginCred.PasswordHash)) { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("NoCred")); LoginProgressBar.Visibility = Visibility.Hidden; return; } var t = new Thread(async() => { var accountInfo = AccountManager.GetAccountInfo(loginCred); // Failed login information if (!string.IsNullOrWhiteSpace(accountInfo.Error)) { switch (accountInfo.Error) { case "InvalidCred": case "UserBanned": case "EmailNotVerified": await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString(accountInfo.Error)); LoginProgressBar.Visibility = Visibility.Hidden; Password.Clear(); })); break; default: await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("LoginErrorGeneric")); LoginProgressBar.Visibility = Visibility.Hidden; Password.Clear(); })); break; } return; } if (!string.IsNullOrWhiteSpace(accountInfo.TwoFactor)) { LoginProgressBar.Visibility = Visibility.Hidden; switch (accountInfo.Error) { //TODO: Implement a way to input a code for 2FA //TODO: Add an option to exclude 2FA for certain known devices of IP ADDRESSES case "CheckEmail": case "CheckText": await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString(accountInfo.Error)); LoginProgressBar.Visibility = Visibility.Hidden; })); break; default: await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("LoginErrorGeneric")); LoginProgressBar.Visibility = Visibility.Hidden; })); break; } return; } //This is the OpenId config used to login. I use a custom //Implementation which may not fully represent OpenId but //It gets the job done var openId = RiotAuth.GetOpenIdConfig(); //The SHA1 Hash of the password is used as the password //To get the accounts from the servers. The MD5 hash of that //Password is the AES key. This may need to change to a different //Hashing algorithm, and maybe the encryption should include //A part form the IcyWindAuth server which is used to decrypt var aesKey = MD5.Hash(Password.Password); StaticVars.AccountInfo = accountInfo; StaticVars.LoginCred = loginCred; StaticVars.Password = aesKey; //This is done to stop people who are not devs or donators from accessing IcyWind in Beta // ReSharper disable once ConditionIsAlwaysTrueOrFalse if (!accountInfo.IsDev && !accountInfo.IsPaid && false) { await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("FeaturedDonator")); })); return; } if (!string.IsNullOrWhiteSpace(accountInfo.Accounts)) { foreach (var account in JsonConvert.DeserializeObject <string[]>(accountInfo.Accounts)) { var copyAccount = account; var mm = copyAccount.Length % 4; if (mm > 0) { copyAccount += new string('=', 4 - mm); } var data = Convert.FromBase64String(copyAccount); var accountAsJson = Encoding.UTF8.GetString(data); var decodedString = JsonConvert.DeserializeObject <IcyWindRiotAccountCrypted>(accountAsJson); if (StaticVars.LoginCred.AccountData == null) { StaticVars.LoginCred.AccountData = new List <IcyWindRiotAccountCrypted>(); } StaticVars.LoginCred.AccountData.Add(decodedString); var accountDecrypted = AES.DecryptBase64(aesKey, decodedString.CryptString); var accountDetail = JsonConvert.DeserializeObject <IcyWindRiotAccountInfo>(accountDecrypted); await RiotAuth.Login(this, Dispatcher, accountDetail.Username, accountDetail.Password, accountDetail.Region, openId, true, null); } } else { StaticVars.LoginCred.AccountData = new List <IcyWindRiotAccountCrypted>(); } await Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.ChangeView(typeof(AccountSelectorPage)); //Fade out the audio var timer = new System.Timers.Timer { Interval = 50 }; timer.Elapsed += (obj, evt) => { Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)(() => { player.Volume -= 0.01; if (!(player.Volume <= 0)) { return; } player.Stop(); timer.Stop(); Video.Stop(); })); }; timer.Start(); LoginProgressBar.Visibility = Visibility.Hidden; })); }); t.Start(); }
private void ChangeMap_OnClick(object sender, RoutedEventArgs e) { UserInterfaceCore.ChangeMainPageView <MapSelectionPage>(); }
public void LogoutButton_Click(object sender, RoutedEventArgs e) { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("FeatureNotImplemented")); }
private void DevLabel_MouseDown(object sender, MouseButtonEventArgs e) { UserInterfaceCore.ChangeMainPageView <DevPage>(); HideHeader(); }
private void AutoAcceptCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { _autoAccept = false; UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("NotFinishedFeature")); }
private void InviteButton_OnClick(object sender, RoutedEventArgs e) { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("PartyOpen")); }
public static async Task Login(object sender, Dispatcher disp, string user, string pass, string region, RiotAuthOpenIdConfiguration openId, bool save, Action callback) { var regionData = RiotClientData.ReadSystemRegionData(Path.Combine(StaticVars.IcyWindLocation, "IcyWindAssets", "system", "system.yaml"), region); var loginDataAuthToken = GetLoginToken(user, pass, regionData, openId); if (loginDataAuthToken.Result != RiotAuthResult.Success) { await disp.BeginInvoke(DispatcherPriority.Render, (Action)(() => { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("InvalidRiotCred").Replace("{User}", user)); if (sender.GetType() == typeof(LoginPage)) { ((LoginPage)sender).LoginProgressBar.Visibility = Visibility.Hidden; } })); return; } var userInfo = GetLoginUserInfo(loginDataAuthToken, openId); //I have no idea why this is called, it doesn't seem to be used for much but it simulates the //Connections that riot has. Don't question riot, they do funny things. var loginEnt = GetLoginEntitlements(regionData, loginDataAuthToken); var rsoAuth = GetLoginLcdsRsoLoginQueue(regionData, loginDataAuthToken, userInfo); var userClient = await LoginRtmps(regionData, JsonConvert.SerializeObject(rsoAuth.Lqt), loginDataAuthToken.AccessTokenJson.AccessToken, user); if (userClient.Success) { userClient.Client.RiotMessagingService = new WebSocket(regionData.Servers.Rms.RmsUrl.Replace(":443", "") + $"/rms/v1/session?token={loginDataAuthToken.AccessTokenJson.AccessToken}&id={Guid.NewGuid():D}&token_type=access"); userClient.Client.Token = loginDataAuthToken; userClient.Client.Region = regionData; userClient.Client.OpenId = openId; var ping = new Thread(() => { Thread.Sleep(TimeSpan.FromSeconds(60)); userClient.Client.RiotMessagingService.Ping(); }); userClient.Client.RiotMessagingService.OnMessage += userClient.Client.OnRiotMessagingServiceReceived; userClient.Client.RiotMessagingService.OnOpen += (o, args) => ping.Start(); //userClient.Client.RiotMessagingService.Connect(); userClient.Client.SaveToServer = save; var str1 = $"gn-{userClient.Client.RiotSession.AccountSummary.AccountId}"; var str2 = $"cn-{userClient.Client.RiotSession.AccountSummary.AccountId}"; var str3 = $"bc-{userClient.Client.RiotSession.AccountSummary.AccountId}"; Task <bool>[] taskArray = { userClient.Client.RiotConnection.SubscribeAsync("my-rtmps", "messagingDestination", str1, str1), userClient.Client.RiotConnection.SubscribeAsync("my-rtmps", "messagingDestination", str2, str2), userClient.Client.RiotConnection.SubscribeAsync("my-rtmps", "messagingDestination", "bc", str3) }; await Task.WhenAll(taskArray); var plainTextbytes = Encoding.UTF8.GetBytes(userClient.Client.RiotSession.AccountSummary.Username + ":" + userClient.Client.RiotSession.Token); var reconnectToken = Convert.ToBase64String(plainTextbytes); userClient.Client.RiotConnection.MessageReceived += userClient.Client.OnRtmpMessage; await userClient.Client.RiotConnection.LoginAsync(user, userClient.Client.RiotSession.Token); userClient.Client.RiotProxyCalls = new LcdsRiotCalls((RiotCalls)userClient.Client); userClient.Client.RegionData.RegionName = region; userClient.Client.LoginDataPacket = await((RiotCalls)userClient.Client).GetLoginDataPacketForUser(); var pref = GetPlayerPref(loginDataAuthToken, userClient.Client.Configs["PlayerPreferences"]["ServiceEndpoint"].ToString(), regionData.PlatformId.ToString(), userClient.Client.LoginDataPacket.AllSummonerData.Summoner.AcctId.ToString()); var jsonPref = JsonConvert.DeserializeObject <Dictionary <string, string> >(pref); var deserializer = new Deserializer(); var tempData = Encoding.UTF8.GetString(Deflate.Uncompress(Convert.FromBase64String(jsonPref["data"]))); TextReader sr = new StringReader(tempData); var yamlObject = deserializer.Deserialize(sr); var serializer = new JsonSerializer(); var w = new StringWriter(); serializer.Serialize(w, yamlObject); var jsonAsRunesReforaged = JsonConvert.DeserializeObject <RunesReforaged>(w.ToString()); userClient.Client.RunesReforaged = jsonAsRunesReforaged; //Connect to chat now await ChatAuth.ConnectToChat(regionData, userClient.Client, Convert.ToBase64String(Encoding.UTF8.GetBytes(loginDataAuthToken.AccessTokenJson.AccessToken))); userClient.Client.DoHeartbeatShit(); userClient.Client.ActiveBoots = await((RiotCalls)userClient.Client).GetSummonerActiveBoosts(); userClient.Client.ChampionList = await((RiotCalls)userClient.Client).GetAvailableChampions(); var da = await userClient.Client.RiotProxyCalls.WithMoreThanOneResponce("teambuilder-draft", "retrieveGameloopPlayerInfoV1", 2, ""); userClient.Client.RiotQueues = await((RiotCalls)userClient.Client).GetAllQueues(); //Create a game var inventoryToken = GetInventoryFromType(regionData, loginDataAuthToken, userClient.Client.Configs["Inventory"]["BaseServiceUrl"].ToString(), userClient.Client.LoginDataPacket.AllSummonerData.Summoner.Puuid.ToString("D"), userClient.Client.LoginDataPacket.AllSummonerData.Summoner.AcctId.ToString(), "QUEUE_ENTRY"); var leaguesTierRankToken = await userClient.Client.RiotProxyCalls.DoLcdsProxyCallWithResponse("leagues", "getMySignedQueueTierRank", ""); var simpleInventoryToken = GetInventorySimpleFromType(regionData, loginDataAuthToken, userClient.Client.Configs["Inventory"]["BaseServiceUrl"].ToString(), userClient.Client.LoginDataPacket.AllSummonerData.Summoner.Puuid.ToString("D"), userClient.Client.LoginDataPacket.AllSummonerData.Summoner.AcctId.ToString(), "CHAMPION&inventoryTypes=CHAMPION_SKIN"); userClient.Client.InvToken = simpleInventoryToken; var summonerToken = await userClient.Client.RiotProxyCalls.DoLcdsProxyCallWithResponse("summoner", "getMySummoner", ""); //userInfo :D var party = new CreatePartyService { AccountId = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.AcctId, CreatedAt = 0, CurrentParty = null, EligibilityHash = 0, Parties = null, PlatformId = regionData.PlatformId.ToString(), Puuid = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.Puuid.ToString("D"), Registration = new Registration { InventoryToken = null, InventoryTokens = new[] { JsonConvert.DeserializeObject <InventoryService>(inventoryToken).Data.ItemsJwt, }, LeaguesTierRankToken = Encoding.UTF8.GetString( Gzip.Decompress(Convert.FromBase64String(leaguesTierRankToken.Payload))), SimpleInventoryToken = JsonConvert.DeserializeObject <InventoryService>(simpleInventoryToken) .Data .ItemsJwt, SummonerToken = summonerToken.Payload, UserInfoToken = userInfo }, ServerUtcMillis = 0, SummonerId = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.SumId, Version = 0 }; var sendPartyHelper = new BodyHelper { body = JsonConvert.SerializeObject(party), url = $"v1/players/{userClient.Client.LoginDataPacket.AllSummonerData.Summoner.Puuid:D}" }; var partyRtmp = await userClient.Client.RiotProxyCalls.DoLcdsProxyCallWithResponse("parties.service", "proxy", JsonConvert.SerializeObject(sendPartyHelper)); userClient.Client.CurrentParty = JsonConvert.DeserializeObject <PartyPayload>(partyRtmp.Payload); //New restricted queue method sendPartyHelper = new BodyHelper { body = "", method = "GET", url = $"v1/parties/{userClient.Client.CurrentParty.Payload.CurrentParty.PartyId}/eligibility" }; var partyElg = await userClient.Client.RiotProxyCalls.DoLcdsProxyCallWithResponse("parties.service", "proxy", JsonConvert.SerializeObject(sendPartyHelper)); //F*****g removed by riot /* * //Get restricted Queues * var activeQueues = userClient.Client.RiotQueues.Where(x => x.QueueState == "ON"); * * var str = string.Empty; * var queueArr = activeQueues.Select(queue => (int)queue.Id).OrderBy(i => i); * str = queueArr.Aggregate(str, (current, queue) => current + (queue + ",")); * * str = str.Remove(str.Length - 1); * * var resp = await userClient.Client.RiotProxyCalls.DoLcdsProxyCallWithResponse("gatekeeper", * "getQueueRestrictionsForQueuesV2", $"{{\"queueIds\":[{str}],\"queueRestrictionsToExclude\":" + * "[\"QUEUE_DODGER\",\"LEAVER_BUSTED\",\"LEAVER_BUSTER" + * $"_TAINTED_WARNING\"],\"summonerIds\":[{userClient.Client.LoginDataPacket.AllSummonerData.Summoner.SumId}]}}"); * //*/ if (StaticVars.UserClientList == null) { StaticVars.UserClientList = new List <UserClient>(); } StaticVars.UserClientList.Add(userClient.Client); if (sender.GetType() == typeof(AccountSelectorPage) && save) { var acc = new IcyWindRiotAccountInfo { Password = pass, Region = region, Username = user, SumIcon = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.ProfileIconId, SumLevel = userClient.Client.LoginDataPacket.AllSummonerData.SummonerLevelAndPoints.SummonerLevel, SumName = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.InternalName, }; if (StaticVars.AccountInfo == null) { return; } if (StaticVars.AccountInfo.Accounts == null) { StaticVars.AccountInfo.Accounts = string.Empty; } var crypto = AES.EncryptBase64(StaticVars.Password, JsonConvert.SerializeObject(acc)); /* * if (StaticVars.LoginCred.AccountData.All(x => x.CryptString != crypto)) * { * StaticVars.LoginCred.AccountData.Add(new IcyWindRiotAccountCrypted * { * CryptString = crypto, * Region = region, * SumUuid = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.Puuid.ToString(), * SumId = userClient.Client.LoginDataPacket.AllSummonerData.Summoner.SumId * }); * if (callback != null) * { * await disp.BeginInvoke(DispatcherPriority.Render, callback); * } * } * else * { * return; * } * * if (StaticVars.UserClientList.Count(x => x.SaveToServer) > 4 && !(StaticVars.AccountInfo.IsDev || * StaticVars.AccountInfo.IsPaid || * StaticVars.AccountInfo.IsPro)) * { * return; * } * var output = await AccountManager.UpdateAccountInfo(StaticVars.LoginCred); * * //*/ } } }
private void ProfileImageContainer_OnClick(object sender, RoutedEventArgs e) { StaticVars.ActiveClient = Account; UserInterfaceCore.ChangeView(typeof(MainPage)); UserInterfaceCore.ChangeMainPageView <HomePage>(); }
private void PlayButton_OnMouseDown(object sender, MouseButtonEventArgs e) { UserInterfaceCore.ChangeMainPageView <PlayPage>(); HideHeader(); }
private void NotReadyFeature(object sender, MouseButtonEventArgs e) { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("NotFinishedFeature")); }
private void HomeButton_OnMouseDown(object sender, MouseButtonEventArgs e) { UserInterfaceCore.ChangeMainPageView <HomePage>(); ShowHeader(); }
private void SelectChamp_OnClick(object sender, RoutedEventArgs e) { UserInterfaceCore.HolderPage.ShowNotification(UserInterfaceCore.ShortNameToString("NotFinishedFeature")); }