Beispiel #1
0
        public void OnPurchaseShardsClicked(UXButton button)
        {
            int  num  = 1;
            bool flag = button == this.purchaseAllBtn;

            if (flag)
            {
                num = this.vto.RemainingShardsForSale;
            }
            CostVO costVO   = (!flag) ? this.vto.CostOfNextShard : this.vto.CostOfAllShards;
            int    crystals = costVO.Crystals;

            if (!ShardShopViewModule.warned && crystals >= GameConstants.CRYSTAL_SPEND_WARNING_MINIMUM)
            {
                ShardShopViewModule.warned = true;
                string currencyItemAssetName = UXUtils.GetCurrencyItemAssetName(CurrencyType.Crystals.ToString());
                AlertScreen.ShowModalWithImage(false, this.lang.Get("shard_shop_crystal_warning_title", new object[0]), this.lang.Get("shard_shop_crystal_warning_body", new object[]
                {
                    crystals
                }), currencyItemAssetName, new OnScreenModalResult(this.PurchaseShards), num);
                return;
            }
            this.PurchaseShards(button, num);
        }
Beispiel #2
0
 public unsafe static long $Invoke21(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(AlertScreen.ShowModalWithImage(*(sbyte *)args != 0, Marshal.PtrToStringUni(*(IntPtr *)(args + 1)), Marshal.PtrToStringUni(*(IntPtr *)(args + 2)), Marshal.PtrToStringUni(*(IntPtr *)(args + 3)), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[4]), GCHandledObjects.GCHandleToObject(args[5]))));
 }