private void OnCreateComplete(bool success, object cookie) { ProcessingScreen.Hide(); base.AllowClose = true; if (success) { string text = (string)cookie; Service.UXController.MiscElementsManager.ShowPlayerInstructions(this.lang.Get("CREATE_SQUAD_CONFIRMATION", new object[] { text }), 1f, 5f); Service.ScreenController.CloseAll(); } else { this.buttonPurchase.Enabled = true; } }
protected void ConfirmInstantUpgrade(object result, object cookie) { if (result == null) { return; } int num = GameUtils.CrystalCostToInstantUpgrade(this.nextBuildingInfo); if (!GameUtils.SpendCrystals(num)) { return; } this.buttonPrimaryAction.Enabled = false; this.buttonInstantBuy.Enabled = false; this.buttonSwap.Enabled = false; this.upgradeButton.Enabled = false; this.allowClose = false; ProcessingScreen.Show(); int currencyAmount = -num; string itemType = this.buildingInfo.Type.ToString(); string uid = this.buildingInfo.Uid; int itemCount = 1; string type = "instant_building"; string subType = "consumable"; Service.DMOAnalyticsController.LogInAppCurrencyAction(currencyAmount, itemType, uid, itemCount, type, subType); EventManager eventManager = Service.EventManager; eventManager.RegisterObserver(this, EventId.MissionCollecting, EventPriority.Default); this.instantUpgradeBuildingKey = this.selectedBuilding.BuildingComp.BuildingTO.Key; this.instantUpgradeBuildingUid = this.nextBuildingInfo.Uid; try { ISupportController iSupportController = Service.ISupportController; iSupportController.StartBuildingUpgrade(this.nextBuildingInfo, this.selectedBuilding, true); iSupportController.BuyOutCurrentBuildingContract(this.selectedBuilding, false); } finally { eventManager.UnregisterObserver(this, EventId.MissionCollecting); this.HandleInstantUpgradeRequest(); } }
private void OnCrateInfoPayButtonClicked(UXButton button) { CurrentPlayer player = Service.Get <CurrentPlayer>(); bool flag; if (this.targetLEIVO != null) { flag = GameUtils.BuyLEI(player, this.targetLEIVO); } else { flag = GameUtils.BuyCrate(player, this.targetCrateVO); } if (flag) { Service.Get <EventManager>().RegisterObserver(this, EventId.OpeningPurchasedCrate); ProcessingScreen.Show(); } else { this.OnCloseCrateInfoButtonClicked(null); } button.Enabled = false; }
private void OnEditComplete(bool success, object cookie) { ProcessingScreen.Hide(); base.AllowClose = true; if (!success) { this.buttonEdit.Enabled = true; return; } string squadName = Service.Get <SquadController>().StateManager.GetCurrentSquad().SquadName; Service.Get <UXController>().MiscElementsManager.ShowPlayerInstructions(this.lang.Get("EDIT_SQUAD_CONFIRMATION", new object[] { squadName }), 1f, 5f); IState currentState = Service.Get <GameStateMachine>().CurrentState; if (currentState is WarBoardState) { this.Close(null); return; } Service.Get <ScreenController>().CloseAll(); }
public override void Close(object modalResult) { ProcessingScreen.Hide(); base.Close(modalResult); }
public unsafe static long $Invoke3(long instance, long *args) { ProcessingScreen.Show(); return(-1L); }
public unsafe static long $Invoke4(long instance, long *args) { ProcessingScreen.StaticReset(); return(-1L); }