// Token: 0x06000CA3 RID: 3235 RVA: 0x0005572C File Offset: 0x0005392C private void DrawCheckAvailabilityButton(Rect position) { GUI.enabled = (!string.IsNullOrEmpty(this._characterName) && !this._checkButtonClicked && !this._waitingForWsReturn); if (GUITools.Button(new Rect(225f, 60f, 110f, 24f), new GUIContent("Check Availability"), BlueStonez.buttondark_small)) { this.HideKeyboard(); this._availableNames.Clear(); this._checkButtonClicked = true; this._targetHeight = 260f; if (!ValidationUtilities.IsValidMemberName(this._characterName, ApplicationDataManager.CurrentLocale.ToString())) { this._feedbackMessageColor = Color.red; this._errorMessage = "'" + this._characterName + "' is not a valid name!"; } else { this._waitingForWsReturn = true; UserWebServiceClient.IsDuplicateMemberName(this._characterName, new Action <bool>(this.IsDuplicatedNameCallback), delegate(Exception ex) { this._waitingForWsReturn = false; this._feedbackMessageColor = Color.red; this._errorMessage = "Our server had an error, please try again."; }); } } GUI.enabled = true; }
public IEnumerator StartGetLoadout() { if (!Singleton <ItemManager> .Instance.ValidateItemMall()) { PopupSystem.ShowMessage("Error Getting Shop Data", "The shop is empty, perhaps there\nwas an error getting the Shop data?", PopupSystem.AlertType.OK, new Action(HandleWebServiceError)); yield break; } yield return(UserWebServiceClient.GetLoadout(AuthToken, delegate(LoadoutView ev) { if (ev != null) { CheckLoadoutForExpiredItems(ev); Singleton <LoadoutManager> .Instance.UpdateLoadout(ev); GameState.Current.Avatar.SetLoadout(new Loadout(Singleton <LoadoutManager> .Instance.Loadout)); _localPlayerSkinColor = ColorConverter.HexToColor(ev.SkinColor); } else { ApplicationDataManager.LockApplication("It seems that you account is corrupted. Please visit support.uberstrike.com for advice."); } }, delegate(Exception ex) { ApplicationDataManager.LockApplication("There was an error getting your loadout."); })); yield break; }
private void InitializeUserServiceClient() { BasicHttpBinding binding = CreateBasicHttp(); client = new UserWebServiceClient(binding, EndPoint); client.GetAllCompleted += LoginCompleted; }
public IEnumerator StartSetLoadout() { if (_updateLoadoutTime == 0f) { _updateLoadoutTime = Time.time + 5f; while (_updateLoadoutTime > Time.time) { yield return(new WaitForEndOfFrame()); } _updateLoadoutTime = 0f; yield return(UserWebServiceClient.SetLoadout(AuthToken, CreateLocalPlayerLoadoutView(), delegate(MemberOperationResult ev) { if (Singleton <GameStateController> .Instance.Client.IsConnected) { Singleton <GameStateController> .Instance.Client.Operations.SendUpdateLoadout(); } if (ev != MemberOperationResult.Ok) { Debug.LogError("SetLoadout failed with error: " + ev); } }, delegate(Exception ex) { })); } else { _updateLoadoutTime = Time.time + 5f; } yield break; }
private void InitializeUserServiceClient() { BasicHttpBinding binding = CreateBasicHttp(); client = new UserWebServiceClient(binding, EndPoint); client.SaveCompleted += RegisterCompleted; }
public IEnumerator StartGetMember() { yield return(UserWebServiceClient.GetMember(AuthToken, new Action <UberstrikeUserViewModel>(OnGetMemberEventReturn), delegate(Exception ex) { ApplicationDataManager.LockApplication("There was an error getting your player data."); })); yield break; }
//TODO: Write some stress test code or some stuff. public static void Main(string[] args) { var userServiceClient = new UserWebServiceClient("http://localhost/2.0"); var authenticationServiceClient = new AuthenticationWebServiceClient("http://localhost/2.0"); var loginResult = authenticationServiceClient.LoginSteam("test", "", ""); var member = userServiceClient.GetMember(loginResult.AuthToken); Console.WriteLine(member.CmuneMemberView); Console.WriteLine(member.UberstrikeMemberView); Console.ReadLine(); }
// Token: 0x06000C58 RID: 3160 RVA: 0x00053960 File Offset: 0x00051B60 private void AsyncGetPointsDeposits() { if (this._pointTransactions.CurrentPageNeedsRefresh) { int nextPageIndex = this._pointTransactions.CurrentPageIndex; UserWebServiceClient.GetPointsDeposits(PlayerDataManager.AuthToken, nextPageIndex + 1, 15, delegate(PointDepositsViewModel ev) { this._pointTransactions.SetPage(nextPageIndex, ev); this._pointTransactions.ElementCount = ev.TotalCount; }, delegate(Exception ex) { }); } }
// Token: 0x06000CA6 RID: 3238 RVA: 0x00055A0C File Offset: 0x00053C0C private void IsDuplicatedNameCallback(bool isDuplicate) { if (isDuplicate) { UserWebServiceClient.GenerateNonDuplicatedMemberNames(this._characterName, new Action <List <string> >(this.GetNonDuplicatedNamesCallback), delegate(Exception ex) { this._waitingForWsReturn = false; }); } else { this._waitingForWsReturn = false; this._feedbackMessageColor = Color.green; this._errorMessage = "'" + this._characterName + "' is available!"; } }
// Token: 0x06000BCA RID: 3018 RVA: 0x0004D7C8 File Offset: 0x0004B9C8 private void ChangeName() { if (!this.newName.Equals(this.oldName) && !string.IsNullOrEmpty(this.newName)) { this.isChangingName = true; UserWebServiceClient.ChangeMemberName(PlayerDataManager.AuthToken, this.newName, ApplicationDataManager.CurrentLocale.ToString(), SystemInfo.deviceUniqueIdentifier, delegate(MemberOperationResult t) { switch (t) { case MemberOperationResult.Ok: PlayerDataManager.Name = this.newName; AutoMonoBehaviour <CommConnectionManager> .Instance.Client.Operations.SendAuthenticationRequest(PlayerDataManager.AuthToken, PlayerDataManager.MagicHash); base.StartCoroutine(Singleton <ItemManager> .Instance.StartGetInventory(false)); PopupSystem.ShowMessage("Congratulations", "You successfully changed your name to:\n" + this.newName, PopupSystem.AlertType.OK, "YEAH", delegate() { }); this.Hide(); break; default: switch (t) { case MemberOperationResult.InvalidName: PopupSystem.ShowMessage(LocalizedStrings.Error, LocalizedStrings.NameInvalidCharsMsg); goto IL_123; case MemberOperationResult.OffensiveName: PopupSystem.ShowMessage(LocalizedStrings.Error, LocalizedStrings.OffensiveNameMsg); goto IL_123; } Debug.LogError("Failed to change name: " + t); PopupSystem.ShowMessage(LocalizedStrings.Error, LocalizedStrings.Unknown); break; case MemberOperationResult.DuplicateName: PopupSystem.ShowMessage(LocalizedStrings.Error, LocalizedStrings.NameInUseMsg); break; } IL_123: this.isChangingName = false; }, delegate(Exception ex) { this.isChangingName = false; this.Hide(); }); } }
// Token: 0x0600140D RID: 5133 RVA: 0x00073F54 File Offset: 0x00072154 public IEnumerator StartGetInventory(bool showProgress) { if (this._shopItemsById.Count == 0) { PopupSystem.ShowMessage("Error Getting Shop Data", "The shop is empty, perhaps there\nwas an error getting the Shop data?", PopupSystem.AlertType.OK, null); yield break; } List <ItemInventoryView> inventoryView = new List <ItemInventoryView>(); if (showProgress) { IPopupDialog popupDialog = PopupSystem.ShowMessage(LocalizedStrings.UpdatingInventory, LocalizedStrings.WereUpdatingYourInventoryPleaseWait, PopupSystem.AlertType.None); yield return(UserWebServiceClient.GetInventory(PlayerDataManager.AuthToken, delegate(List <ItemInventoryView> view) { inventoryView = view; }, delegate(Exception ex) { })); PopupSystem.HideMessage(popupDialog); } else { yield return(UserWebServiceClient.GetInventory(PlayerDataManager.AuthToken, delegate(List <ItemInventoryView> view) { inventoryView = view; }, delegate(Exception ex) { })); } List <string> prefabs = new List <string>(); inventoryView.ForEach(delegate(ItemInventoryView view) { IUnityItem unityItem; if (this._shopItemsById.TryGetValue(view.ItemId, out unityItem) && unityItem.View.ItemType != UberstrikeItemType.Functional) { prefabs.Add(unityItem.View.PrefabName); } prefabs.Reverse(); }); Singleton <InventoryManager> .Instance.UpdateInventoryItems(inventoryView); yield break; }
public IEnumerator StartGetMemberWallet() { if (Cmid < 1) { Debug.LogError("Player CMID is invalid! Have you called AuthenticationManager.StartAuthenticateMember?"); ApplicationDataManager.LockApplication("The authentication process failed. Please sign in on www.uberstrike.com and restart UberStrike."); } else { IPopupDialog popupDialog = PopupSystem.ShowMessage("Updating", "Updating your points and credits balance...", PopupSystem.AlertType.None); yield return(UserWebServiceClient.GetMemberWallet(AuthToken, new Action <MemberWalletView>(OnGetMemberWalletEventReturn), delegate(Exception ex) { })); yield return(new WaitForSeconds(0.5f)); PopupSystem.HideMessage(popupDialog); } yield break; }
private void InitializeUserServiceClient() { BasicHttpBinding binding = CreateBasicHttp(); client = new UserWebServiceClient(binding, EndPoint); }