Example #1
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(512048, false), GameDataUtils.GetChineseContent(512049, false), delegate
            {
                InstanceManager.TryPause();
            }, delegate
            {
                InstanceManager.TryResume();
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                InstanceManager.TryResume();
                SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
            GlobalBattleDialogUIView.Instance.isClick = false;
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.ShowCallBoss(true);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
    }
 public void changeProLogic()
 {
     if (ActivityTossDiscountManager.Instance.isHaveCurrentShangPinId())
     {
         DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(1005022, false), GameDataUtils.GetChineseContent(1006006, false), delegate
         {
             InstanceManager.TryPause();
         }, delegate
         {
             InstanceManager.TryResume();
         }, delegate
         {
             InstanceManager.TryResume();
             if (ActivityTossDiscountManager.Instance.isHaveCurrentShangPinId())
             {
                 ActivityTossDiscountManager.Instance.TempSelectProductId = this.currentShangPinId;
                 ActivityTossDiscountManager.Instance.SendReplaceItemReq(ActivityTossDiscountManager.Instance.CurrentShangPinId);
             }
         }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
     }
     else
     {
         this.selectProductLogic();
     }
 }
Example #3
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(510109, false), GameDataUtils.GetChineseContent(510110, false), delegate
            {
            }, delegate
            {
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                this.forceExit = true;
                NetworkManager.Send(new ExitAreaBattleReq(), ServerType.Data);
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
    }
Example #4
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetNoticeText(100), GameDataUtils.GetChineseContent(502269, false), delegate
            {
            }, delegate
            {
                BallElement.Instance.shouldChangePosImmediately = false;
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                EventDispatcher.Broadcast("GuideManager.InstanceExit");
                ElementInstanceManager.Instance.SendExitElementCopyReq(delegate
                {
                });
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
    }
Example #5
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetNoticeText(100), GameDataUtils.GetChineseContent(510110, false), null, delegate
            {
                MultiPVPManager.Instance.SendLeaveMultiPvpReq();
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_yellow_1", null, true);
            GlobalBattleDialogUIView.Instance.SetMask(0.7f, true, false);
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowPeakBattleSlot(true);
        battleUI.ShowBattleTimeUI(true);
        battleUI.SetPeakBattleKillAndDeathNumText(0, 0);
        battleUI.SetPeakBattleVSText(0, 0);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
    }
Example #6
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            DungeonManager.Instance.shouldNotShowLoseUI = true;
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetNoticeText(100), GameDataUtils.GetNoticeText(101), delegate
            {
            }, delegate
            {
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                EliteDungeonManager.Instance.SendEliteExitReq();
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_yellow_1", null);
            GlobalBattleDialogUIView.Instance.SetMask(0.7f, true, false);
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.ShowDamageRankingUI(true);
        battleUI.ShowGlobalRank(true, BattleUI.RankRewardType.Text);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
    }
Example #7
0
    private void OnClickBtnGo(GameObject go)
    {
        BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(this.curBossId);

        if (bossBiaoQian == null)
        {
            return;
        }
        int vipLv = EntityWorld.Instance.EntSelf.VipLv;

        if (vipLv < bossBiaoQian.vipLevel)
        {
            UIManagerControl.Instance.OpenUI("DialogBoxUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(621264, false), GameDataUtils.GetChineseContent(505106, false), null, null, delegate
            {
                this.Show(false);
                LinkNavigationManager.OpenVIPUI2VipLimit();
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
            return;
        }
        if (BossBookManager.Instance.TeleportAndNavToBoss(this.curBossId))
        {
            this.Show(false);
        }
    }
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetNoticeText(100), GameDataUtils.GetChineseContent(511999, false), delegate
            {
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                ChangeCareerInstanceManager.Instance.IsQuit = true;
                LocalInstanceHandler.Instance.Finish(false);
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_yellow_1", null, true);
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
    }
Example #9
0
    private void ClickBtnGetToDo(Transform btnGet, int cellIndex)
    {
        RawInfo rawInfo = this.rawInfoList.get_Item(cellIndex);
        int     acId    = rawInfo.acId;

        if (!Activity7DayManager.Instance.activityInfos.ContainsKey(acId))
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(513193, false), GameDataUtils.GetChineseContent(513194, false), delegate
            {
                UIManagerControl.Instance.HideUI("OperateActivityUI");
                UIStackManager.Instance.PopUIPrevious(UIType.FullScreen);
            }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
            return;
        }
        ActivityItemInfo activityItemInfo = Activity7DayManager.Instance.activityInfos.get_Item(acId);
        bool             canGetFlag       = activityItemInfo.canGetFlag;

        if (!activityItemInfo.hasGetPrize)
        {
            if (canGetFlag)
            {
                if (BackpackManager.Instance.ShowBackpackFull())
                {
                    return;
                }
                Activity7DayManager.Instance.SendGetActivityItemPrizeReq(2, acId);
            }
            else
            {
                SourceReferenceUI.GoTo((int)rawInfo.servletId);
            }
        }
    }
Example #10
0
    public void OnClickRefresh(GameObject go)
    {
        if (BountyManager.Instance.Countdown < TimeManager.Instance.PreciseServerTime)
        {
            NetworkManager.Send(new BountyTaskRefreshReq
            {
                taskId = BountyManager.Instance.Info.taskId
            }, ServerType.Data);
        }
        else
        {
            UIManagerControl.Instance.OpenUI("DialogBoxUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            string text = "A";
            switch (this.quality + 1)
            {
            case 1:
                text = "D";
                break;

            case 2:
                text = "C";
                break;

            case 3:
                text = "B";
                break;

            case 4:
                text = "A";
                break;

            case 5:
                text = "S";
                break;
            }
            XuanShangRenWuPeiZhi xuanShangRenWuPeiZhi = DataReader <XuanShangRenWuPeiZhi> .Get(BountyManager.Instance.Info.taskId);

            string content        = string.Format(GameDataUtils.GetChineseContent(513627, false), xuanShangRenWuPeiZhi.upgradeCost, text);
            string chineseContent = GameDataUtils.GetChineseContent(513628, false);
            DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(chineseContent, content, delegate
            {
            }, delegate
            {
            }, delegate
            {
                NetworkManager.Send(new BountyTaskRefreshReq
                {
                    taskId = BountyManager.Instance.Info.taskId
                }, ServerType.Data);
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
        }
    }
Example #11
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(501002, false), GameDataUtils.GetChineseContent(513529, false), delegate
            {
                InstanceManager.TryPause();
            }, delegate
            {
                InstanceManager.TryResume();
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                InstanceManager.TryResume();
                EventDispatcher.Broadcast("GuideManager.InstanceExit");
                DefendFightManager.Instance.ExitDefendFightReq(false);
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
            GlobalBattleDialogUIView.Instance.isClick = false;
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.ShowSpecialInstanceBattleUI(true);
        battleUI.InitSpecialInstanceBattleUI();
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
        RewardPreviewUI.CopyType type = RewardPreviewUI.CopyType.NONE;
        switch (DefendFightManager.Instance.SelectDetailMode)
        {
        case DefendFightMode.DFMD.Hold:
            type = RewardPreviewUI.CopyType.GUARD;
            break;

        case DefendFightMode.DFMD.Protect:
            type = RewardPreviewUI.CopyType.ESCORT;
            break;

        case DefendFightMode.DFMD.Save:
            type = RewardPreviewUI.CopyType.ATTACK;
            break;
        }
        battleUI.ShowRewardPreviewUI(true, type, 0L, 0L);
    }
Example #12
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(501002, false), GameDataUtils.GetChineseContent(513529, false), delegate
            {
                InstanceManager.TryPause();
            }, delegate
            {
                InstanceManager.TryResume();
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                InstanceManager.TryResume();
                SpecialFightManager.Instance.ExitExperienceReq(false);
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.ShowSpecialBuffUI(true);
        battleUI.ShowSpecialInstanceBattleUI(true);
        battleUI.InitSpecialInstanceBattleUI();
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
        int  num      = InstanceManager.CurrentInstanceBatch - 1;
        long batchExp = SpecialFightManager.Instance.GetBatchExp(num);

        battleUI.ShowRewardPreviewUI(true, RewardPreviewUI.CopyType.EXP, batchExp * (long)num, SpecialFightManager.Instance.GetBatchExp(InstanceManager.CurrentInstanceBatch));
        this.BeforeLevel  = EntityWorld.Instance.EntSelf.Lv;
        this.BeforeExp    = EntityWorld.Instance.EntSelf.Exp;
        this.BeforeExpLmt = EntityWorld.Instance.EntSelf.ExpLmt;
        Debug.Log(string.Concat(new object[]
        {
            "进副本前 等级:Lv.",
            this.BeforeLevel,
            ", 已有经验:",
            this.BeforeExp,
            ", 升级经验:",
            this.BeforeExpLmt
        }));
    }
Example #13
0
    private void OnClickHeadAndBackLogic(bool isShow)
    {
        base.FindTransform("ResultBg").get_gameObject().SetActive(false);
        long num = BackpackManager.Instance.OnGetGoodCount(ActivityTossDiscountManager.gameNeedItemId);

        if (num <= 0L)
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "您的游戏券不够!", delegate
            {
                InstanceManager.TryPause();
            }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
            return;
        }
        DiscountItemsInfo discountInfoById = ActivityTossDiscountManager.Instance.getDiscountInfoById(ActivityTossDiscountManager.Instance.CurrentShangPinId);

        if (discountInfoById.num <= 0)
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "该商品已经售完!", delegate
            {
                InstanceManager.TryPause();
            }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
            return;
        }
        ShangPin shangPin = DataReader <ShangPin> .Get(ActivityTossDiscountManager.Instance.CurrentShangPinId);

        if (shangPin == null)
        {
            Debug.LogWarning("配置表没有此商品,id=" + shangPin.Id);
        }
        int   count            = shangPin.discount.get_Count();
        float num2             = (float)shangPin.discount.get_Item(count - 1);
        float discountDataById = ActivityTossDiscountManager.Instance.getDiscountDataById(ActivityTossDiscountManager.Instance.CurrentShangPinId);

        if (discountDataById <= num2)
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), GameDataUtils.GetChineseContent(1006005, false), delegate
            {
                InstanceManager.TryPause();
            }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
        }
        else
        {
            this.sendFlipCoinReqLogic(isShow);
        }
    }
 public override void ShowBattleUI()
 {
     if (base.InstanceResult != null)
     {
         return;
     }
     this.mBattleUI = LinkNavigationManager.OpenBattleUI();
     this.mBattleUI.BtnQuitAction = delegate
     {
         DungeonManager.Instance.shouldNotShowLoseUI = true;
         UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
         GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetNoticeText(100), GameDataUtils.GetNoticeText(101), delegate
         {
             InstanceManager.TryPause();
         }, delegate
         {
             InstanceManager.TryResume();
             LinkNavigationManager.OpenBattleUI();
         }, delegate
         {
             InstanceManager.TryResume();
             EventDispatcher.Broadcast("GuideManager.InstanceExit");
             LocalInstanceHandler.Instance.Finish(false);
         }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_yellow_1", null);
         GlobalBattleDialogUIView.Instance.isClick = false;
     };
     this.mBattleUI.ResetAllInstancePart();
     this.mBattleUI.ShowBattleTimeUI(true);
     this.mBattleUI.IsPauseCheck = false;
     this.mBattleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
     if (!UIManagerControl.Instance.IsOpen("TaskProgressUI"))
     {
         this.mProgressUI = (UIManagerControl.Instance.OpenUI("TaskProgressUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as TaskProgressUI);
     }
     if (DungeonManager.Instance.DungeonInstanceType == DungeonManager.InsType.WEAPON)
     {
         this.mProgressUI.PlayWeaponEffect(DungeonManager.Instance.WeaponModelId);
         TimerHeap.AddTimer(4000u, 0, delegate
         {
             BattleTimeManager.Instance.ClientSetBattleTime(base.InstanceData.time);
             LocalInstanceHandler.Instance.Start();
         });
     }
 }
Example #15
0
 protected void OnClickBtnExit(GameObject go)
 {
     if (this.status == MushroomHitStatus.Ready || this.status == MushroomHitStatus.Start)
     {
         this.GoPause();
         UIManagerControl.Instance.OpenUI("DialogBoxUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
         DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(621264, false), GameDataUtils.GetChineseContent(340022, false), null, delegate
         {
             this.ReStart();
         }, delegate
         {
             this.GoEnd();
         }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
     }
     else
     {
         this.Show(false);
         UIStackManager.Instance.PopUIPrevious(base.uiType);
     }
 }
Example #16
0
 private void OnClickOK(GameObject go)
 {
     this.selectProductLogic();
     if (ActivityTossDiscountManager.Instance.isHaveCurrentShangPinId())
     {
         this.Show(false);
         UIStackManager.Instance.PopUIPrevious(base.uiType);
         if (ActivityTossDiscountUI.Instance != null)
         {
             ActivityTossDiscountUI.Instance.confirmSelectPro(go);
         }
     }
     else
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "您没有选中商品!", delegate
         {
             InstanceManager.TryPause();
         }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
     }
 }
Example #17
0
 private void selectProductLogic()
 {
     ActivityTossDiscountManager.Instance.CurrentShangPinId = ActivityTossDiscountManager.Instance.TempSelectProductId;
     ActivityTossDiscountManager.Instance.setIsSelectItemById(ActivityTossDiscountManager.Instance.CurrentShangPinId);
     if (ActivityTossDiscountManager.Instance.IsAlreadyConfirm)
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "已经选中过了商品,请先更换!", delegate
         {
             InstanceManager.TryPause();
         }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
         return;
     }
     if (ActivityTossDiscountUI.Instance != null)
     {
         ActivityTossDiscountUI.Instance.updateItemLogoByItemId(true, -1);
         ActivityTossDiscountUI.Instance.RefreshUI();
     }
     this.updateItemLogoByItemId(true, -1);
     this.RefreshUI();
 }
Example #18
0
 public void confirmSelectPro(GameObject go)
 {
     ActivityTossDiscountManager.Instance.CurrentShangPinId   = ActivityTossDiscountManager.Instance.TempSelectProductId;
     ActivityTossDiscountManager.Instance.TempSelectProductId = -1;
     ActivityTossDiscountManager.Instance.setIsSelectItemById(ActivityTossDiscountManager.Instance.CurrentShangPinId);
     this.setSelectProTitleStatus();
     if (ActivityTossDiscountManager.Instance.isHaveCurrentShangPinId())
     {
         this.playYingBiActionState(4700, this.DiscountAction, null, 0f, 0f);
         this.buttonShowLogic(true);
         ActivityTossDiscountManager.Instance.SendSelectItemReq();
         ActivityTossDiscountManager.Instance.IsAlreadyConfirm = true;
         base.FindTransform("ButtonAlert").GetComponent <ButtonCustom>().get_gameObject().SetActive(false);
     }
     else
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "您没有选中商品!", delegate
         {
             InstanceManager.TryPause();
         }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
     }
 }
 public override void ShowBattleUI()
 {
     this.battleUI = LinkNavigationManager.OpenBattleUI();
     this.battleUI.BtnQuitAction = delegate
     {
         UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
         GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(510109, false), GameDataUtils.GetChineseContent(50739, false), delegate
         {
         }, delegate
         {
             LinkNavigationManager.OpenBattleUI();
         }, delegate
         {
             this.ExitDarkTrialInstance();
         }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
         GlobalBattleDialogUIView.Instance.isClick = false;
     };
     this.battleUI.ResetAllInstancePart();
     this.battleUI.ShowBattleTimeUI(true);
     this.battleUI.ShowGlobalRank(true, BattleUI.RankRewardType.Icon);
     this.battleUI.ShowTopLeftTabs(true, new BattleUI.TopLeftTabData[]
     {
         new BattleUI.TopLeftTabData
         {
             name              = GameDataUtils.GetChineseContent(515128, false),
             showAction        = new Action <bool>(this.battleUI.TabShowGlobalRank),
             stretchGameObject = this.battleUI.GlobalRank
         },
         new BattleUI.TopLeftTabData
         {
             name              = GameDataUtils.GetChineseContent(515127, false),
             showAction        = new Action <bool>(this.battleUI.TabShowTeamMember),
             stretchGameObject = this.battleUI.TeamMember
         }
     });
     this.battleUI.ShowBackpackPreviewBtn(true);
     this.battleUI.IsPauseCheck = false;
     this.battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
 }
Example #20
0
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetNoticeText(100), GameDataUtils.GetNoticeText(101), null, delegate
            {
                GuildBossManager.Instance.SendExitGuildBossBattleReq();
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_yellow_1", null, true);
            GlobalBattleDialogUIView.Instance.isClick = true;
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
        this.IsGetResult      = false;
        GuildBossManager.Instance.CheckShowGuildBossBattleCD();
    }
 private void OnClickPanel(GameObject go)
 {
     if (this.currentDiscountItemsInfo.num <= 0)
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "该商品已经售完!", delegate
         {
             InstanceManager.TryPause();
         }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
         return;
     }
     if (this.selectType == ActivityTossDiscountManager.selectProductSelectType)
     {
         int listDataIndexByID = ActivityTossDiscountManager.Instance.getListDataIndexByID(ActivityTossDiscountManager.Instance.CurrentShangPinId);
         if (listDataIndexByID != -1)
         {
         }
         this.selectProductLogic();
     }
     else if (this.selectType == ActivityTossDiscountManager.payProductSelectType)
     {
         int      key      = this.currentShangPinId;
         ShangPin shangPin = null;
         if (DataReader <ShangPin> .Contains(key))
         {
             shangPin = DataReader <ShangPin> .Get(key);
         }
         if (shangPin != null)
         {
             UIBase uIBase = UIManagerControl.Instance.OpenUI("BuyUI", UINodesManager.TopUIRoot, false, UIType.NonPush);
             uIBase.get_transform().SetAsLastSibling();
             BuyUIViewModel.Instance.BuyCallback = delegate(int count)
             {
                 this.DoOK(count);
             };
             float discountDataById = ActivityTossDiscountManager.Instance.getDiscountDataById(shangPin.Id);
             float num = discountDataById / 10f;
             int   price;
             if (num < 10f)
             {
                 price = (int)Math.Ceiling((double)(num / 10f * (float)shangPin.diamond));
             }
             else
             {
                 price = shangPin.diamond;
             }
             BuyUIViewModel.Instance.RefreshInfo(shangPin.goodsPool, shangPin.num, price, 1);
             if (this.currentShangPinId == ActivityTossDiscountManager.Instance.CurrentShangPinId)
             {
                 BuyUIViewModel.Instance.BtnOKName = GameDataUtils.GetChineseContent(508013, false);
             }
             else
             {
                 BuyUIViewModel.Instance.BtnOKName = "获取折扣";
             }
         }
         if (ActivityTossDiscountListAlert.Instance != null)
         {
             ActivityTossDiscountListAlert.Instance.RefreshUI();
         }
     }
 }
Example #22
0
 public override void ShowBattleUI()
 {
     if (base.InstanceResult != null)
     {
         return;
     }
     this.battleUI = LinkNavigationManager.OpenBattleUI();
     this.battleUI.BtnQuitAction = delegate
     {
         UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
         GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(510109, false), GameDataUtils.GetChineseContent(511627, false), delegate
         {
         }, delegate
         {
             LinkNavigationManager.OpenBattleUI();
         }, delegate
         {
             this.InitiativeExitHookInstance();
         }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
         GlobalBattleDialogUIView.Instance.isClick = false;
     };
     this.battleUI.ResetAllInstancePart();
     this.battleUI.ShowBattleTimeUI(true);
     this.battleUI.ShowArea(true);
     this.battleUI.SetAreaName(HuntManager.Instance.RoomName);
     this.battleUI.ShowPlayerNum(true);
     this.updatePlayerTimer = TimerHeap.AddTimer(0u, this.updatePlayerInterval, new Action(this.UpdatePlayerNum));
     if (this.CurWave >= 0 && this.battleUI)
     {
         this.battleUI.ShowBatchText(true);
         this.battleUI.SetBatchTextNum(this.CurWave);
     }
     if (!this.CurRoomInPeace && this.CurBossProperty >= 0 && this.battleUI)
     {
         this.battleUI.ShowBossProbability(true);
         this.battleUI.SetBossProbabilityText(string.Format(GameDataUtils.GetChineseContent(511611, false), (double)this.CurBossProperty * 0.1));
     }
     this.battleUI.ShowBattleMode(true);
     if (this.IsSelfPeaceMode)
     {
         if (TimeManager.Instance.PreciseServerSecond < this.pkModeCDEnd)
         {
             this.battleUI.ShowPKModeCD(true);
             this.battleUI.SetPKModeCD((float)this.PKModeDefaultCD, (float)(this.pkModeCDEnd - TimeManager.Instance.PreciseServerSecond) / (float)this.PKModeDefaultCD);
         }
         else
         {
             this.battleUI.ShowPKModeBtn(true);
         }
     }
     else if (this.IsSelfPKMode)
     {
         if (TimeManager.Instance.PreciseServerSecond < this.peaceModeCDEnd)
         {
             this.battleUI.ShowPeaceModeCD(true);
             this.battleUI.SetPeaceModeCD((float)this.PeaceModeDefaultCD, (float)(this.peaceModeCDEnd - TimeManager.Instance.PreciseServerSecond) / (float)this.PeaceModeDefaultCD);
         }
         else
         {
             this.battleUI.ShowPeaceModeBtn(true);
         }
     }
     if (EntityWorld.Instance.EntSelf != null)
     {
         long defaultBatchExp = 0L;
         if (DataReader <GuaJiQuYuPeiZhi> .Contains(HuntManager.Instance.AreaId))
         {
             defaultBatchExp = DataReader <GuaJiQuYuPeiZhi> .Get(HuntManager.Instance.AreaId).exp;
         }
         this.battleUI.ShowRewardPreviewUI(true, RewardPreviewUI.CopyType.HOOK, this.fixRealTimeExp, defaultBatchExp);
     }
     this.battleUI.ShowBackpackBtn(true);
     this.battleUI.IsPauseCheck = false;
     this.battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
     BattleTimeManager.Instance.ServerSetBattleTime(HuntManager.Instance.EnterTick);
     this.ShowTaskProgress();
 }