Exemplo n.º 1
0
        // Token: 0x06014CB1 RID: 85169 RVA: 0x00546818 File Offset: 0x00544A18
        private void BuyEnergyUIController_OnBuyEnergy()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_BuyEnergyUIController_OnBuyEnergy_hotfix != null)
            {
                this.m_BuyEnergyUIController_OnBuyEnergy_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            int num = projectLPlayerContext.CanBuyEnergy();

            if (num == 0)
            {
                this.StartBuyEnergyNetTask();
            }
            else if (num == -401)
            {
                CommonUIController.Instance.ShowDialogBox(StringTableId.StringTableId_Msg_CrystalNotEnough, delegate(DialogBoxResult dialogResult)
                {
                    if (dialogResult == DialogBoxResult.Ok)
                    {
                        StoreUITask.StartUITask(this.m_currIntent, StoreId.StoreId_Recharge, null, false);
                    }
                }, (StringTableId)0, (StringTableId)0);
            }
            else
            {
                CommonUIController.Instance.ShowErrorMessage(num, 2f, null, true);
            }
        }
Exemplo n.º 2
0
 // Token: 0x0600FBBA RID: 64442 RVA: 0x004231EC File Offset: 0x004213EC
 private void EquipmentDepotUIController_OnGoldAddButtonClick()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_EquipmentDepotUIController_OnGoldAddButtonClick_hotfix != null)
     {
         this.m_EquipmentDepotUIController_OnGoldAddButtonClick_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     StoreUITask.StartUITask(this.m_currIntent, StoreId.StoreId_Crystal, null, false);
 }
Exemplo n.º 3
0
 // Token: 0x06010E21 RID: 69153 RVA: 0x0045F110 File Offset: 0x0045D310
 private void HeroJobTransferUIController_OnAddGold()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_HeroJobTransferUIController_OnAddGold_hotfix != null)
     {
         this.m_HeroJobTransferUIController_OnAddGold_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     StoreUITask.StartUITask(this.m_currIntent, StoreId.StoreId_Crystal, null, false);
 }
 // Token: 0x0600F992 RID: 63890 RVA: 0x0041B4C0 File Offset: 0x004196C0
 public void OnAddCurrencyClick(GoodsType currencyType)
 {
     if (currencyType != GoodsType.GoodsType_Gold)
     {
         if (currencyType == GoodsType.GoodsType_Crystal)
         {
             StoreUITask.StartUITask(this.m_guildStoreUITask.CurrentIntent, StoreId.StoreId_Recharge, null, false);
         }
     }
     else
     {
         StoreUITask.StartUITask(this.m_guildStoreUITask.CurrentIntent, StoreId.StoreId_Crystal, null, false);
     }
 }
 // Token: 0x0600FF96 RID: 65430 RVA: 0x004312D8 File Offset: 0x0042F4D8
 private void EquipmentForgeUIController_OnCrystalNotEnough()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_EquipmentForgeUIController_OnCrystalNotEnough_hotfix != null)
     {
         this.m_EquipmentForgeUIController_OnCrystalNotEnough_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     CommonUIController.Instance.ShowDialogBox(StringTableId.StringTableId_Msg_CrystalNotEnough, delegate(DialogBoxResult dialogResult)
     {
         if (dialogResult == DialogBoxResult.Ok)
         {
             StoreUITask.StartUITask(this.m_currIntent, StoreId.StoreId_Recharge, null, false);
         }
     }, (StringTableId)0, (StringTableId)0);
 }
 // Token: 0x0600FF91 RID: 65425 RVA: 0x00430F68 File Offset: 0x0042F168
 private void EquipmentForgeUIController_OnGoldAddButtonClick(ulong instanceId, int slot, EquipmentForgeUIController.ForgeState forgeState)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_EquipmentForgeUIController_OnGoldAddButtonClickUInt64Int32ForgeState_hotfix != null)
     {
         this.m_EquipmentForgeUIController_OnGoldAddButtonClickUInt64Int32ForgeState_hotfix.call(new object[]
         {
             this,
             instanceId,
             slot,
             forgeState
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_instanceId = instanceId;
     this.m_slot       = slot;
     this.m_forgeState = forgeState;
     StoreUITask.StartUITask(this.m_currIntent, StoreId.StoreId_Crystal, null, false);
 }
        // Token: 0x0600F156 RID: 61782 RVA: 0x00402728 File Offset: 0x00400928
        private void OnCreateGuildClick()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnCreateGuildClick_hotfix != null)
            {
                this.m_OnCreateGuildClick_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int num = this.m_playerContext.CheckGuildCreateCondition(this.m_guildNameInputField.text, this.m_guildDeclarationInputField.text, this.m_requireLevel);

            if (num == 0)
            {
                string value = this.m_configDataLoader.GetConfigDataStringTable(14002).Value;
                CommonUIController.Instance.ShowDialogBox(string.Format(value, this.m_guildNameInputField.text), delegate(DialogBoxResult result)
                {
                    if (result == DialogBoxResult.Ok)
                    {
                        this.CreateGuild();
                    }
                }, string.Empty, null);
                return;
            }
            if (num == -501)
            {
                ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(this.m_configDataLoader.ConfigableConstId_GuildCreateItemId);
                string             value2             = this.m_configDataLoader.GetConfigDataStringTable(14001).Value;
                CommonUIController.Instance.ShowDialogBox(string.Format(value2, configDataItemInfo.Name), delegate(DialogBoxResult result)
                {
                    if (result == DialogBoxResult.Ok)
                    {
                        StoreUITask.StartUITask(this.m_guildUITask.CurrentIntent, StoreId.StoreId_Gift, null, false);
                    }
                }, string.Empty, null);
                return;
            }
            CommonUIController.Instance.ShowErrorMessage(num, 2f, null, true);
        }
Exemplo n.º 8
0
 // Token: 0x06005249 RID: 21065 RVA: 0x0018650C File Offset: 0x0018470C
 private void Test(string str)
 {
     string[] array = str.Split(new char[]
     {
         ' '
     });
     if (array.Length == 0)
     {
         return;
     }
     if (array[0].ToLower() == "logout")
     {
         if (PDSDK.Instance != null)
         {
             PDSDK.Instance.onLogoutSuccess("{\"customparams\":\"\"}");
         }
     }
     else if (array[0].ToLower() == "lua")
     {
         if (PDSDK.m_eventLoginSuccess != null)
         {
             PDSDK.m_eventLoginSuccess(new LoginSuccessMsg("t1", "t2", "t3", "t4"));
         }
         if (PDSDK.m_eventLoginFailed != null)
         {
             PDSDK.m_eventLoginFailed();
         }
         if (PDSDK.m_eventLogoutSuccess != null)
         {
             PDSDK.m_eventLogoutSuccess();
         }
         if (PDSDK.m_eventInitSuccess != null)
         {
             PDSDK.m_eventInitSuccess();
         }
         if (PDSDK.m_eventInitFailed != null)
         {
             PDSDK.m_eventInitFailed();
         }
     }
     else if (array[0].ToLower() == "ei")
     {
         CommonUIController.Instance.PDSDKEnableInput(true);
     }
     else if (array[0].ToLower() == "di")
     {
         CommonUIController.Instance.PDSDKEnableInput(false);
     }
     else if (array[0].ToLower() == "get")
     {
         List <PDSDKGood> list = StoreUITask.PDSDKGetGoods();
         foreach (PDSDKGood pdsdkgood in list)
         {
             global::Debug.Log(string.Format("id={0} regID={1} name={2} type={3} price={4} desc={5}", new object[]
             {
                 pdsdkgood.m_ID,
                 pdsdkgood.m_registerID,
                 pdsdkgood.m_name,
                 pdsdkgood.m_type,
                 pdsdkgood.m_price,
                 pdsdkgood.m_desc
             }));
         }
     }
     else if (array[0].ToLower() == "req")
     {
         StoreUITask.PDSDKRequestGoods();
     }
     else if (array[0].ToLower() == "buy")
     {
         if (array.Length < 4)
         {
             return;
         }
         string        goodID   = array[1];
         PDSDKGoodType goodType = PDSDKGoodType.Normal;
         int           number   = int.Parse(array[3]);
         StoreUITask.PDSDKRequestBuyGoods(goodID, goodType, number);
     }
     else if (array[0].ToLower() == "capture")
     {
         Texture2D texture2D = ScreenCapture.CaptureScreenshotAsTexture(1);
         File.WriteAllBytes(Application.persistentDataPath + "/ShareImage.jpg", texture2D.EncodeToJPG(100));
         Texture2D tex = Utility.ResizeTexture(texture2D, ImageFilterMode.Average, 300f / (float)texture2D.width);
         File.WriteAllBytes(Application.persistentDataPath + "/thumbShareImage.jpg", tex.EncodeToJPG(100));
         JsonData jsonData = new JsonData();
         jsonData["Title"]          = "这是分享的标题";
         jsonData["TitleUrl"]       = "http://q.zilongame.com/";
         jsonData["Text"]           = "这是分享的正文";
         jsonData["ImagePath"]      = Application.persistentDataPath + "/ShareImage.jpg";
         jsonData["thumbImagePath"] = Application.persistentDataPath + "/thumbShareImage.jpg";
         jsonData["SiteUrl"]        = "http://q.zilongame.com/";
         jsonData["Url"]            = "http://q.zilongame.com/";
         jsonData["shareType"]      = 2;
         jsonData["sharePlatform"]  = 2;
         if (array.Length > 1)
         {
             jsonData["sharePlatform"] = int.Parse(array[1]);
         }
         PDSDK.Instance.doshare(jsonData.ToJson());
     }
 }
        // Token: 0x060136DF RID: 79583 RVA: 0x004F3E4C File Offset: 0x004F204C
        public void OnBuyButtonClick()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnBuyButtonClick_hotfix != null)
            {
                this.m_OnBuyButtonClick_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (this.m_startFormType == StoreSoldierSkinDetailUITask.StartTaskFromType.StartTaskFromGift)
            {
                return;
            }
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            if (projectLPlayerContext.HasOwn(GoodsType.GoodsType_SoldierSkin, this.m_soldierSkinConfigId))
            {
                return;
            }
            ConfigDataSoldierSkinInfo configDataSoldierSkinInfo = configDataLoader.GetConfigDataSoldierSkinInfo(this.m_soldierSkinConfigId);
            int num = projectLPlayerContext.CanBuyFixedStoreGoods(6, configDataSoldierSkinInfo.FixedStoreItemId, -1);

            if (num == 0)
            {
                FixedStoreBuyStoreItemNetTask fixedStoreBuyStoreItemNetTask = new FixedStoreBuyStoreItemNetTask(6, configDataSoldierSkinInfo.FixedStoreItemId, -1);
                fixedStoreBuyStoreItemNetTask.EventOnStop += delegate(Task task)
                {
                    FixedStoreBuyStoreItemNetTask fixedStoreBuyStoreItemNetTask2 = task as FixedStoreBuyStoreItemNetTask;
                    if (fixedStoreBuyStoreItemNetTask2.Result == 0)
                    {
                        this.m_soldierSkinDetailPanelCtrl.SetBuyButtonToHasBuyMode();
                        List <Goods> list = new List <Goods>();
                        Goods        item = new Goods
                        {
                            GoodsType = GoodsType.GoodsType_SoldierSkin,
                            Id        = this.m_soldierSkinConfigId,
                            Count     = 1
                        };
                        list.Add(item);
                        GetRewardGoodsUITask.StartUITask(list);
                        if (this.EventOnBuySuccessEnd != null)
                        {
                            this.EventOnBuySuccessEnd();
                        }
                    }
                    else
                    {
                        CommonUIController.Instance.ShowErrorMessage(fixedStoreBuyStoreItemNetTask2.Result, 2f, null, true);
                    }
                };
                fixedStoreBuyStoreItemNetTask.Start(null);
            }
            else if (num == -500)
            {
                BagFullUITask.StartUITask(this.m_currIntent);
            }
            else if (num == -416)
            {
                CommonUIController.Instance.ShowDialogBox(StringTableId.StringTableId_Msg_SkinTicketNotEnough, delegate(DialogBoxResult dialogResult)
                {
                    if (dialogResult == DialogBoxResult.Ok)
                    {
                        base.Pause();
                        UIIntentReturnable uiintentReturnable = this.m_currIntent as UIIntentReturnable;
                        if (uiintentReturnable != null && SystemUtility.IsLowSystemMemory())
                        {
                            while (uiintentReturnable.TargetTaskName != typeof(HeroListUITask).Name)
                            {
                                uiintentReturnable = (uiintentReturnable.PrevTaskIntent as UIIntentReturnable);
                                if (uiintentReturnable == null)
                                {
                                    uiintentReturnable = (this.m_currIntent as UIIntentReturnable);
                                    break;
                                }
                            }
                        }
                        StoreUITask.SpecialStartStoreUITask(uiintentReturnable, StoreId.StoreId_Gift);
                    }
                }, (StringTableId)0, (StringTableId)0);
            }
            else
            {
                CommonUIController.Instance.ShowErrorMessage(num, 2f, null, true);
            }
        }