private void OnRevengeButtonClicked(UXButton button) { this.ToggleRevengeButtons(false); if (Service.Get <CurrentPlayer>().Inventory.Troop.GetTotalStorageAmount() <= 0 && Service.Get <CurrentPlayer>().Inventory.SpecialAttack.GetTotalStorageAmount() <= 0 && Service.Get <CurrentPlayer>().Inventory.Hero.GetTotalStorageAmount() <= 0 && Service.Get <CurrentPlayer>().Inventory.Champion.GetTotalStorageAmount() <= 0) { AlertScreen.ShowModal(false, this.lang.Get("NOT_ENOUGH_TROOPS_TITLE", new object[0]), this.lang.Get("NOT_ENOUGH_TROOPS_FOR_ATTACK", new object[0]), null, null); Service.Get <EventManager>().SendEvent(EventId.UIAttackScreenSelection, new ActionMessageBIData("PvP", "no_troops")); return; } if (Service.Get <CurrentPlayer>().ProtectedUntil > ServerTime.Time) { DisableProtectionAlertScreen.ShowModal(new OnScreenModalResult(this.OnConfirmInvalidation), button.Tag); return; } GameUtils.ExitEditState(); this.StartRevenge(button.Tag as BattleEntry); }
public unsafe static long $Invoke5(long instance, long *args) { DisableProtectionAlertScreen.ShowModal((OnScreenModalResult)GCHandledObjects.GCHandleToObject(*args), GCHandledObjects.GCHandleToObject(args[1])); return(-1L); }