private void OnFacebookAccountRegisterSuccess(RegisterExternalAccountResponse response, object cookie) { CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>(); if (!currentPlayer.IsConnectedAccount) { currentPlayer.IsConnectedAccount = true; currentPlayer.Inventory.ModifyCrystals(GameConstants.FB_CONNECT_REWARD); } }
private void OnFacebookAccountRegisterSuccess(RegisterExternalAccountResponse response, object cookie) { CurrentPlayer currentPlayer = Service.CurrentPlayer; if (!currentPlayer.IsConnectedAccount) { currentPlayer.IsConnectedAccount = true; } if (response.ExternalAccountReward > 0) { currentPlayer.Inventory.ModifyCrystals(response.ExternalAccountReward); } }
private void OnSyncConflictLoadExistingConfirmSuccess() { RegisterExternalAccountResponse responseResult = this.command.ResponseResult; foreach (KeyValuePair <string, PlayerIdentityInfo> current in responseResult.PlayerIdentities) { if (current.Value.ActiveIdentity) { Service.BILoggingController.TrackAccountRestore(this.command.RequestArgs.Provider, Service.CurrentPlayer.PlayerId, current.Key); Service.ViewTimerManager.CreateViewTimer(0.2f, false, new TimerDelegate(this.ExecuteReloadTask), new KeyValuePair <string, string>(current.Key, responseResult.Secret)); break; } } }
private void OnSyncConflictLoadExistingConfirmClicked(UXButton button) { this.labelTitle.Text = this.lang.Get("ACCOUNT_SYNC", new object[0]); this.labelBody.Text = this.lang.Get("ACCOUNT_SYNC_LOAD_SUCCESS", new object[] { this.accountProvider }); this.buttonOk.Visible = false; this.buttonLoad.Visible = false; this.buttonCancel.Visible = false; this.buttonConnectNew.Visible = false; this.buttonConnectNewConfirm.Visible = false; RegisterExternalAccountResponse responseResult = this.command.ResponseResult; foreach (KeyValuePair <string, PlayerIdentityInfo> current in responseResult.PlayerIdentities) { if (current.get_Value().ActiveIdentity) { Service.Get <IAccountSyncController>().LoadAccount(current.get_Key(), responseResult.Secret); break; } } }
private void OnAccountRegisterSuccess(RegisterExternalAccountResponse response, object cookie) { RegisterExternalAccountCommand registerExternalAccountCommand = (RegisterExternalAccountCommand)cookie; switch (registerExternalAccountCommand.RequestArgs.Provider) { case AccountProvider.FACEBOOK: this.externalAccountInfo.FacebookAccountId = registerExternalAccountCommand.RequestArgs.ExternalAccountId; this.OnFacebookAccountRegisterSuccess(response, cookie); return; case AccountProvider.GAMECENTER: this.externalAccountInfo.GameCenterAccountId = registerExternalAccountCommand.RequestArgs.ExternalAccountId; return; case AccountProvider.GOOGLEPLAY: this.externalAccountInfo.GooglePlayAccountId = registerExternalAccountCommand.RequestArgs.ExternalAccountId; return; default: return; } }
private void OnAccountRegisterSuccess(RegisterExternalAccountResponse response, object cookie) { RegisterExternalAccountCommand registerExternalAccountCommand = (RegisterExternalAccountCommand)cookie; switch (registerExternalAccountCommand.RequestArgs.Provider) { case AccountProvider.FACEBOOK: this.externalAccountInfo.DerivedFacebookAccountId = response.DerivedExternalAccountId; this.OnFacebookAccountRegisterSuccess(response, cookie); break; case AccountProvider.GAMECENTER: this.externalAccountInfo.DerivedGameCenterAccountId = response.DerivedExternalAccountId; break; case AccountProvider.GOOGLEPLAY: this.externalAccountInfo.DerivedGooglePlayAccountId = response.DerivedExternalAccountId; break; case AccountProvider.RECOVERY: this.externalAccountInfo.DerivedRecoveryId = response.DerivedExternalAccountId; break; } }