コード例 #1
0
        public bool LOBBY2CLIENT_PURCHASE_GOODS_RESP(Observers.Interfaces.INotification note)
        {
            PurchaseGoodsResp purchaseGoodsResp = note.Body as PurchaseGoodsResp;
            int    shopID       = purchaseGoodsResp.goodsType;
            int    shopItemID   = purchaseGoodsResp.goodsNo;
            int    costType     = purchaseGoodsResp.costType;
            string shopItemName = string.Empty;

            if (shopID == 13)
            {
                ShopDiamondItemInfo shopDiamondInfo = null;
                ShopProxy.instance.ShopDiamondItemInfoDic.TryGetValue(shopItemID, out shopDiamondInfo);
                shopItemName = Localization.Get(shopDiamondInfo.ShopDiamondData.name);
            }
            else if (shopID == 14)
            {
                ShopActionItemInfo shopActionItemInfo = null;
                ShopProxy.instance.ShopActionItemInfoDic.TryGetValue(shopItemID, out shopActionItemInfo);
                shopItemName = Localization.Get(shopActionItemInfo.ShopLimitItemData.name);
            }
            else if (shopID == 15)
            {
                ShopGoldItemInfo shopGoldItemInfo = null;
                ShopProxy.instance.ShopGoldItemInfoDic.TryGetValue(shopItemID, out shopGoldItemInfo);
                shopItemName = Localization.Get(shopGoldItemInfo.ShopLimitItemData.name);
            }
            else if (shopID == 16)
            {
                ShopGoodsItemInfo shopGoodsItemInfo = null;
                ShopProxy.instance.ShopGoodsItemInfoDic.TryGetValue(shopItemID, out shopGoodsItemInfo);
                shopItemName = Localization.Get(shopGoodsItemInfo.ShopGoodsData.name);
            }
            CommonAutoDestroyTipsView.Open(string.Format(Localization.Get("ui.shop_view.buy_success_tips"), shopItemName));
            return(true);
        }
コード例 #2
0
        public void ClickTransferHandler()
        {
            int transferTaskConditioCount = _playerData.transferTaskConditionIDList.Count;

            for (int i = 0; i < transferTaskConditioCount; i++)
            {
                TaskConditionData taskConditionData = TaskConditionData.GetTaskConditionData(_playerData.transferTaskConditionIDList[i]);
                if (!TaskUtil.IsTaskConditionFinished(taskConditionData))
                {
                    CommonErrorTipsView.Open(Localization.Get("ui.common_tips.activate_profession_task_unfinished"));
                    return;
                }
            }
            //通用材料检测
            Dictionary <uint, List <Toggle> > groupDic = generalMeterialGroup.toggleGroup;
            List <int> generalMList = new List <int>();

            foreach (var value in groupDic)
            {
                if (!value.Value[0].isOn)
                {
                    generalMList.Add((int)value.Key);
                }
            }
            //资源是否够
            List <GameResData> transferCostResourcesList = _playerData.transferCostList;
            int transferCostResourceCount = transferCostResourcesList.Count;

            for (int i = 0; i < transferCostResourceCount; i++)
            {
                GameResData gameResData = transferCostResourcesList[i];
                if (GameResUtil.IsBaseRes(gameResData.type))
                {
                    if (GameProxy.instance.BaseResourceDictionary[gameResData.type] < gameResData.count)
                    {
                        CommonErrorTipsView.Open(string.Format(Localization.Get("ui.common_tips.not_enough_resource"), GameResUtil.GetBaseResName(gameResData.type)));
                        return;
                    }
                }
                else if (gameResData.type == BaseResType.Item)
                {
                    ItemData itemData = ItemData.GetItemDataByID(gameResData.id);
                    if (generalMList.Contains(gameResData.id))                   //选择了通用材料
                    {
                        itemData = ItemData.GetItemDataByID(itemData.universal_id);
                    }

                    ItemInfo itemInfo = ItemProxy.instance.GetItemInfoByItemID(itemData.id);
                    if (itemInfo == null || itemInfo.count < gameResData.count)
                    {
//						CommonErrorTipsView.Open(string.Format(Localization.Get("ui.common_tips.not_enough_resource"), Localization.Get(itemData.name)));
                        CommonAutoDestroyTipsView.Open(Localization.Get("ui.activate_profession_view.item_not_enough"));
                        return;
                    }
                }
            }

            PlayerController.instance.CLIENT2LOBBY_PLAYER_TRANSFER_REQ((int)_playerData.Id, generalMList);
            UIMgr.instance.Close(PREFAB_PATH);
        }
コード例 #3
0
        //一键领取
        public void OnClickOneKeyToGetPveAction()
        {
            Dictionary <int, FriendInfo> friendDic = FriendProxy.instance.FriendDic[_currentToggleId];
            bool hasGet = false;

            foreach (var value in friendDic)
            {
                if (!value.Value.isGetPveAction)
                {
                    hasGet = true;
                    break;
                }
            }
            if (!hasGet)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.noGet"));
                return;
            }
            if (FriendProxy.instance.alreadyGetPveActionCount >= FriendProxy.instance.maxGetPveActionCount)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.reachPveActionLimit"));
                return;
            }
            FriendController.instance.CLIENT2LOBBY_FriendGetVimReq_REQ(true, _currentToggleId, 0);
        }
コード例 #4
0
        public void OnClickGetRewardAllMailHandler()
        {
            _getRewardAllList.Clear();
            Dictionary <int, MailInfo> mailDic = MailProxy.instance.MailInfoDictionary;

            if (mailDic.Count == 0)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.mail_view.noMail"));
                return;
            }
            bool hasReward = false;

            foreach (KeyValuePair <int, MailInfo> value in mailDic)
            {
                if (!value.Value.isGetReward && value.Value.rewardList.Count != 0)
                {
                    hasReward = true;
                    _getRewardAllList.AddRange(value.Value.rewardList);
                }
            }
            if (hasReward)
            {
                MailController.instance.CLIENT2LOBBY_GetRewardAllMail_REQ();
            }
            else
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.mail_view.noMail"));
            }
        }
コード例 #5
0
        protected override void ClickWinNextHandler()
        {
            int nextDungeonDataID = FightProxy.instance.CurrentDungeonData.unlockDungeonIDNext1;
            WorldTreeDungeonInfo nextWorldTreeDungeonInfo = WorldTreeProxy.instance.GetWorldTreeInfoByID(nextDungeonDataID);

            if (WorldTreeProxy.instance.WorldTreeFruit <= 0)
            {
                ConfirmTipsView.Open(Localization.Get("ui.world_tree_preview_view.tips.out_of_fruit_description"), () => {
                    FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Shop_Action);
                });
                return;
            }

            if (nextWorldTreeDungeonInfo.worldTreeDungeonStatus == WorldTreeDungeonStatus.Locked)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.world_tree_preview_view.tips.dungeon_locked"));
                return;
            }
            if (nextWorldTreeDungeonInfo.worldTreeDungeonStatus == WorldTreeDungeonStatus.Passed)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.world_tree_preview_view.tips.dungeon_passed"));
                return;
            }
            WorldTreeController.instance.CLIENT2LOBBY_WORLD_TREE_CHALLENGE_REQ(nextWorldTreeDungeonInfo.dungeonID);
        }
コード例 #6
0
ファイル: FriendAddView.cs プロジェクト: mengtest/HjqstSource
        public void OnClickAddBtnHandler()
        {
            string text = inputField.text;

            if (string.IsNullOrEmpty(text))
            {
                Logic.UI.Tips.View.CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendAddView.not_null"));
                return;
            }
            if (FriendProxy.instance.myFriendListDic.Count >= FriendProxy.instance.maxMyFriendCount)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.reachMyFriendLimit"));
                return;
            }
            Dictionary <int, FriendInfo> friendDic = FriendProxy.instance.myFriendListDic;
            bool exist = false;

            foreach (var value in friendDic)
            {
                if (value.Value.name.Equals(text))
                {
                    exist = true;
                    break;
                }
            }
            if (exist)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendAddView.alreadyFriend"));
                return;
            }

            FriendController.instance.CLIENT2LOBBY_FriendAddReq_REQ(text, 0);
        }
コード例 #7
0
        public void OnClickButtonHandler()
        {
            switch (_type)
            {
            case GoodsJumpType.Jump_Dungeon:                            //副本掉落(多个副本id)
                if (!_isButtonEnable)
                {
                    CommonAutoDestroyTipsView.Open(Localization.Get("ui.goodsJumpPathView.notUnlock"));
                    break;
                }
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_Detail_View, _id);
                break;

            case GoodsJumpType.Jump_WorldTree:                          //世界树 功能页面
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.FightCenter_WorldTree, null, false, true);
                break;

            case GoodsJumpType.Jump_Expedition:                 //远征 功能页面
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.FightCenter_Expedition, null, false, true);
                break;

            case GoodsJumpType.Jump_DailyDungeon:               //每日副本 类型+页面
                HandleDailyDungeon();
                break;

            case GoodsJumpType.Jump_Pvp:                                //、PVP获得 功能页面
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.FightCenter_Arena, null, false, true);
                break;

            case GoodsJumpType.Jump_Shop:                               //、商店购买 对应页签
                HandleShop();
                break;

            case GoodsJumpType.Jump_Sign:                               //、签到获得 功能页面
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.MainView_SignIn, null, false, true);
                break;

            case GoodsJumpType.Jump_BlackMarket:                //、黑市获得 对应页签
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.MainView_BlackMarket, _id, false, true);
                break;

            case GoodsJumpType.Jump_TakeCard:                           //、商店抽卡获得 对应页签
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Shop_View, null, false, true);
                break;

            case GoodsJumpType.Jump_Explore:                      // 探险
                FunctionOpenProxy.instance.OpenLuaView(FunctionOpenType.MainView_Explore);
                break;

            case GoodsJumpType.Jump_ConsortiaShop:                // 公会商店
                LuaTable consortiaControllerLuaTable = (LuaTable)LuaScriptMgr.Instance.CallLuaFunction("gamemanager.GetCtrl", "consortia_controller")[0];
                consortiaControllerLuaTable.GetLuaFunction("OpenConsortiaView").Call(4);
                break;

            case GoodsJumpType.Jump_Task:                               //任务
                Logic.UI.Task.View.TaskView.Open();
                break;
            }
        }
コード例 #8
0
ファイル: FriendButton.cs プロジェクト: mengtest/HjqstSource
 //接受
 public void OnClickAcceptBtnHandler()
 {
     if (FriendProxy.instance.myFriendListDic.Count >= FriendProxy.instance.maxMyFriendCount)
     {
         CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.reachMyFriendLimit"));
         return;
     }
     FriendController.instance.CLIENT2LOBBY_FriendAddAnswerReq_REQ(false, _friendInfo.id, true);
 }
コード例 #9
0
ファイル: FriendButton.cs プロジェクト: mengtest/HjqstSource
 //领取
 public void OnClickGetPveActionBtnHandler()
 {
     if (FriendProxy.instance.alreadyGetPveActionCount >= FriendProxy.instance.maxGetPveActionCount)
     {
         CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.reachPveActionLimit"));
         return;
     }
     FriendController.instance.CLIENT2LOBBY_FriendGetVimReq_REQ(false, _type, _friendInfo.id);
 }
コード例 #10
0
        //领取奖励
        public void OnClickRewardBoxBtnHandler()
        {
            if (FriendProxy.instance.getPveActionTotalTimes < FriendProxy.instance.getRewardNeedTimes)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.not_enough_times"));
                return;
            }

            FriendController.instance.CLIENT2LOBBY_FriendGiftBagReq_REQ();
        }
コード例 #11
0
        //一键拒绝
        public void OnClickOneKeyToRefuseBtnHandler()
        {
            if (FriendProxy.instance.requestFriendListDic.Count == 0)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.noFriendRequest"));
                return;
            }

            FriendController.instance.CLIENT2LOBBY_FriendAddAnswerReq_REQ(true, 0, false);
        }
コード例 #12
0
 public void ClickRoleButtonHandler(ExpeditionHeroButton btn)
 {
     if (btn.ExpeditionHeroInfo.IsDead)
     {
         CommonAutoDestroyTipsView.Open(Localization.Get("ui.expedition_formation_view.die_not_add_Team"));
         return;
     }
     _selectedCommonHeroIcon = btn;
     SelectRole(btn.ExpeditionHeroInfo.roleInfo);
 }
コード例 #13
0
 public void OnClickDeleteHandler()
 {
     if (mailInfo.isGetReward || mailInfo.rewardList.Count == 0)
     {
         MailController.instance.CLIENT2LOBBY_DelateAllReadMail_REQ(false, mailInfo.id);
     }
     else
     {
         CommonAutoDestroyTipsView.Open(Localization.Get("ui.mail_view.hasRewardTip"));
     }
 }
コード例 #14
0
 public void ClickReadyFightBtnHandler()
 {
     if (_isReadyFight)
     {
         int count = ExpeditionFormationProxy.instance.FormationsDictionary.Count;
         if (count == 0)
         {
             CommonAutoDestroyTipsView.Open(Localization.Get("ui.expedition_formation_view.notEnoughHero"));
             return;
         }
         ExpeditionController.instance.CLIENT2LOBBY_Expedition_Challenge_REQ(ExpeditionProxy.instance.selectExpeditionDungeonInfo.id);
     }
 }
コード例 #15
0
 public void OnPointerDown(PointerEventData data)
 {
     if (_itemInfo.count == 0)
     {
         CommonAutoDestroyTipsView.Open(string.Format(Localization.Get("ui.goodsJumpPathView.notEnough"), Localization.Get(_itemInfo.itemData.name)));
         return;
     }
     if (!AutoAddExp(0))
     {
         CommonAutoDestroyTipsView.Open(Localization.Get("ui.goodsJumpPathView.levelMax"));
         return;
     }
     _isPressUp   = false;
     _useTotalNum = 0;
     StartCoroutine(MedicineUseCoroutine());
     Debug.Log("medicine down itemid:" + itemId);
 }
コード例 #16
0
ファイル: ChatView.cs プロジェクト: mengtest/HjqstSource
 public void OnClickSendBtnHandler()
 {
     if (!string.IsNullOrEmpty(inputText.text))
     {
         if (ChatProxy.instance.canSendMessage)
         {
             string   s    = Common.Util.BlackListWordUtil.WordsFilter(inputText.text);
             ChatInfo info = ChatProxy.instance.CreateChatInfoByInputString(s, ChatProxy.instance.currentChatType);
             ClearEditData();
             ChatController.instance.CLIENT2LOBBY_SendMessage_REQ(info);
         }
         else
         {
             CommonAutoDestroyTipsView.Open("操作太频繁啦!");
         }
     }
 }
コード例 #17
0
        public void OnClickSweepOneHandle()
        {
            DungeonInfo dungeonInfo = DungeonDetailProxy.instance.DungeonInfo;

            if (dungeonInfo.dungeonData.dungeonType == DungeonType.BossSubspecies)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.dungeon_detail_view.dungeon_not_support_sweep_tips"));
                return;
            }

            if (DungeonDetailProxy.instance.CheckSweep(false))
            {
                _oldAccountLv  = GameProxy.instance.AccountLevel;
                _oldAccountExp = GameProxy.instance.AccountExp;
                DungeonController.instance.CLIENT2LOBBY_PVE_MOP_UP_REQ(DungeonDetailProxy.instance.DungeonInfo.id);
            }
        }
コード例 #18
0
        public void OnClickDungeonButtonHandler()
        {
            if (!expeditionDungeonInfo.isUnlocked)
            {
                if (expeditionDungeonInfo.data.type != (int)ExpeditionDungeonType.Expedition_Normal)
                {
                    ExpeditionData data = ExpeditionData.GetExpeditionDataByID(expeditionDungeonInfo.id);
                    CommonRewardTipsView.Open(data.rewardList);
                }

                return;
            }
            ExpeditionProxy.instance.selectExpeditionDungeonInfo = expeditionDungeonInfo;
            int type = expeditionDungeonInfo.data.type;

            if (type == (int)ExpeditionDungeonType.Expedition_Normal)
            {
                if (expeditionDungeonInfo.isFinished)
                {
                    CommonAutoDestroyTipsView.Open(Localization.Get("ui.expedition_view.conquerOther"));
                    return;
                }
            }
            else
            {
                if (expeditionDungeonInfo.isFinished)
                {
                    ExpeditionData data = ExpeditionData.GetExpeditionDataByID(expeditionDungeonInfo.id);
                    if (!expeditionDungeonInfo.isGetReward)
                    {
                        CommonRewardTipsView.Open(data.rewardList, true, ClickRewardBtnHandler);
                    }
                    else
                    {
                        CommonRewardTipsView.Open(data.rewardList);
                    }
                    return;
                }
            }

            //ExpeditionFormationView.Open(true);
            ExpeditionEmbattleView.Open(true);
        }
コード例 #19
0
        public void OnClickStartFightBossSpeciesDungeonHandler()
        {
            DungeonInfo dungeonInfo         = DungeonDetailProxy.instance.DungeonInfo;
            GameResData costItemGameResData = dungeonInfo.dungeonData.itemCostGameResData;
            int         costItemCount       = ItemProxy.instance.GetItemCountByItemID(costItemGameResData.id);

            if (costItemCount < costItemGameResData.count)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.dungeon_detail_view.cost_item_not_enough_tips"));
                return;
            }

            if (isClickStartFight)
            {
                return;
            }
            StartCoroutine(EnableClickFightCoroutine());
            DungeonDetailProxy.instance.StartFight();
        }
コード例 #20
0
        private void ResetLevel(int level)
        {
            int         dungeonID   = _activityInfo.ActivityData.GetDungeonIDOfLevel(level);
            DungeonData dungeonData = DungeonData.GetDungeonDataByID(dungeonID);

            if (GameProxy.instance.AccountLevel < dungeonData.unlockLevel)
            {
                string accountLevelNotEnoughTipsString = string.Format(Localization.Get("ui.daily_dungeon_info_view.account_level_not_enough"), dungeonData.unlockLevel);
                CommonAutoDestroyTipsView.Open(accountLevelNotEnoughTipsString);
                return;
            }

            _currentSelectLevel       = level;
            currentLevelNameText.text = string.Format(Localization.Get("ui.daily_dungeon_info_view.dungeon_difficulty_title"), level + 1);
            ResetEnemies(dungeonData);
            ResetLoot(dungeonData);
            ResetCost();
            RefreshPreviousLevelAndNextLevelButtons();
        }
コード例 #21
0
        public void ClickStartChallengeHandler()
        {
            if (WorldTreeProxy.instance.WorldTreeFruit <= 0)
            {
                ConfirmTipsView.Open(Localization.Get("ui.world_tree_preview_view.tips.out_of_fruit_description"), OnClickConfirmBuyWorldTreeFruitHandler);
                return;
            }

            if (_selectedWorldTreeDungeonInfo.worldTreeDungeonStatus == WorldTreeDungeonStatus.Locked)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.world_tree_preview_view.tips.dungeon_locked"));
                return;
            }
            if (_selectedWorldTreeDungeonInfo.worldTreeDungeonStatus == WorldTreeDungeonStatus.Passed)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.world_tree_preview_view.tips.dungeon_passed"));
                return;
            }
            WorldTreeController.instance.CLIENT2LOBBY_WORLD_TREE_CHALLENGE_REQ(_selectedWorldTreeDungeonInfo.dungeonID);
        }
コード例 #22
0
        //一键赠送
        public void OnClickOneKeyToDonate()
        {
            bool canDonate = false;

            foreach (var value in FriendProxy.instance.myFriendListDic)
            {
                if (!value.Value.isDonate)
                {
                    canDonate = true;
                    break;
                }
            }
            if (canDonate)
            {
                FriendController.instance.CLIENT2LOBBY_FriendPresentVimReq_REQ(-1);
            }
            else
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.friendView.one_key_donate_already_tip"));
            }
        }
コード例 #23
0
 public void ClickHeroButtonView(CommonHeroIcon.View.CommonHeroIcon heroButton)
 {
     if (_isClickStrengthenBtn)
     {
         return;
     }
     HeroInfo[] materials = HeroStrengthenProxy.instance.SelectedMaterialHeroInfos;
     if (heroButton.IsSelect)
     {
         HeroStrengthenProxy.instance.SetSelectedMaterialHeroInfo(heroButton.HeroInfo.instanceID, null);
     }
     else
     {
         if (_isReachMaxLevel)
         {
             CommonAutoDestroyTipsView.Open(Localization.Get("ui.hero_strengthen_view.maxExp"));
             return;
         }
         HeroStrengthenProxy.instance.SetSelectedMaterialHeroInfo(heroButton.HeroInfo);
     }
     Refresh();
 }
コード例 #24
0
        public void OnClickDeleteAllReadMailHandler()
        {
            bool hasDelete = false;
            Dictionary <int, MailInfo> mailDic = MailProxy.instance.MailInfoDictionary;

            foreach (KeyValuePair <int, MailInfo> value in mailDic)
            {
                if (value.Value.isGetReward || value.Value.rewardList.Count == 0)
                {
                    hasDelete = true;
                    break;
                }
            }
            if (hasDelete)
            {
                ConfirmTipsView.Open(Localization.Get("ui.mail_view.confirmDelete"), ConfirmDeleteMail);
            }
            else
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.mail_view.noMailDelete"));
            }
        }
コード例 #25
0
        public void OnClickBuyChallengeTimesHandler()
        {
            DungeonInfo dungeonInfo = DungeonDetailProxy.instance.DungeonInfo;

            if (dungeonInfo.dayRefreshTimes < VIPProxy.instance.VIPData.dayRefreshTimes)
            {
                int cost = TimesCostData.GetTimesCostData(2, dungeonInfo.dayRefreshTimes + 1).cost;
                if (GameProxy.instance.BaseResourceDictionary[BaseResType.Diamond] < cost)
                {
                    ConfirmTipsView.Open(Localization.Get("ui.dungeon_detail_view.diamond_not_enough_tips_title"), OnClickGoToBuyDiamond, ConsumeTipType.None);
                    return;
                }
                DungeonController.instance.CLIENT2LOBBY_RefreshDayTimesReq(dungeonInfo.dungeonData.dungeonID);
            }
            else
            {
                VIPData improveDayRefreshTimesVIPData = null;
                VIPData tempVIPData = VIPProxy.instance.VIPData;
                while (tempVIPData != null)
                {
                    if (tempVIPData.dayRefreshTimes > VIPProxy.instance.VIPData.dayRefreshTimes)
                    {
                        improveDayRefreshTimesVIPData = tempVIPData;
                        break;
                    }
                    tempVIPData = tempVIPData.GetNextLevelVIPData();
                }

                if (improveDayRefreshTimesVIPData != null)
                {
                    string tipString = Localization.Format("ui.dungeon_detail_view.dungeon_challenge_times_not_enough_and_go_to_recharge_tips", improveDayRefreshTimesVIPData.ShortName);
                    ConfirmTipsView.Open(tipString, OnClickGoToBuyDiamond, ConsumeTipType.None);
                }
                else
                {
                    CommonAutoDestroyTipsView.Open(Localization.Get("ui.dungeon_detail_view.dungeon_challenge_times_not_enough_tips"));
                }
            }
        }
コード例 #26
0
        public void ClickEquipmentIconButton(CommonEquipmentIcon icon)
        {
            bool refresh = false;

            if (icon.isSelect)
            {
                refresh = EquipmentStrengthenProxy.instance.RemoveMaterialEquipInfo(icon.EquipmentInfo.instanceID);
            }
            else
            {
                if (_isReachMaxLevel)
                {
                    CommonAutoDestroyTipsView.Open(Localization.Get("ui.equipment_strengthen_view.maxExp"));
                    return;
                }

                refresh = EquipmentStrengthenProxy.instance.AddMaterialEquipInfo(icon.EquipmentInfo);
            }
            if (refresh)
            {
                Refresh();
            }
        }
コード例 #27
0
        public void OnClickSweepTenHandle()
        {
//			if(!Logic.FunctionOpen.Model.FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.Dungeon_Sweep,true))
//			{
//				return;
//			}

            DungeonInfo dungeonInfo = DungeonDetailProxy.instance.DungeonInfo;

            if (dungeonInfo.dungeonData.dungeonType == DungeonType.BossSubspecies)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.dungeon_detail_view.dungeon_not_support_sweep_tips"));
                return;
            }

            if (DungeonDetailProxy.instance.CheckSweep(true))
            {
                _oldAccountLv  = GameProxy.instance.AccountLevel;
                _oldAccountExp = GameProxy.instance.AccountExp;

                DungeonController.instance.CLIENT2LOBBY_PveTenMopUp_REQ(DungeonDetailProxy.instance.DungeonInfo.id, DungeonDetailProxy.instance.GetSweepTimes());
            }
        }
コード例 #28
0
        private IEnumerator MedicineUseCoroutine()
        {
            int index = 0;

            int[] addExps = GlobalData.GetGlobalData().expSolutions;
            int   addExp  = itemId == (int)ITEM_ID.bigExpMedicine ? addExps[0] : itemId == (int)ITEM_ID.midExpMedicine ? addExps[1] : itemId == (int)ITEM_ID.smallExpMedicine ? addExps[2]:0;

            while (true)
            {
                if (_isPressUp)
                {
                    break;
                }
                _useTotalNum++;
                _itemInfo.count--;
                RefreshCount();
                if (!AutoAddExp(addExp))
                {
                    CommonAutoDestroyTipsView.Open(Localization.Get("ui.goodsJumpPathView.levelMax"));
                    break;
                }
                if (_itemInfo.count <= 0)
                {
                    CommonAutoDestroyTipsView.Open(string.Format(Localization.Get("ui.goodsJumpPathView.notEnough"), Localization.Get(_itemInfo.itemData.name)));
                    break;
                }
                if (index == 0)
                {
                    yield return(new WaitForSeconds(0.5f));
                }
                else
                {
                    yield return(new WaitForSeconds(0.15f));
                }
                index++;
            }
        }
コード例 #29
0
        private void HandleDailyDungeon()
        {
            List <ActivityInfo> enabledActivityInfoList = ActivityProxy.instance.GetEnabledActivityInfoList();
            bool         hasActivity = false;
            ActivityInfo info;

            for (int i = 0, count = enabledActivityInfoList.Count; i < count; i++)
            {
                info = enabledActivityInfoList[i];
                if (info.isOpen && info.ActivityID == _id)
                {
                    if (info.remainChallengeTimes > 0)
                    {
                        FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_Daily_Detail, info);
                    }
                    else
                    {
                        CommonAutoDestroyTipsView.Open(Localization.Get("ui.goodsJumpPathView.notEnoughChallenge"));
                    }
                    return;
                }
            }
            CommonAutoDestroyTipsView.Open(Localization.Get("ui.goodsJumpPathView.notOpen"));
        }
コード例 #30
0
        public bool CheckSweep(bool isTen)
        {
            lastCheckSweepType = isTen ? SweepType.Ten : SweepType.Single;
            if (isTen)
            {
                if (!Logic.FunctionOpen.Model.FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.TenSweep, false))
                {
                    FunctionOpen.Model.FunctionData sweepTenOpenData = FunctionOpen.Model.FunctionData.GetFunctionDataByID((int)FunctionOpenType.TenSweep);
                    Logic.VIP.Model.VIPData         vipData          = Logic.VIP.Model.VIPData.GetVIPData(sweepTenOpenData.vip);
                    if (VIPProxy.instance.VIPLevel < sweepTenOpenData.vip)
                    {
                        string tipsString = Localization.Format("ui.dungeon_detail_view.sweep_ten_times_locked_tips", vipData.ShortName);
                        ConfirmTipsView.Open(tipsString, GoToBuyDiamond);
                        return(false);
                    }
                }
            }
            else
            {
                if (!Logic.FunctionOpen.Model.FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.SingleSweep, true))
                {
                    return(false);
                }
            }



            if (DungeonDetailProxy.instance.DungeonInfo.star < 3)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.dungeon_detail_view.text_sweep_not_enough_star"));
                return(false);
            }
            if (GameProxy.instance.CheckPackFull())
            {
                return(false);
            }

            DungeonInfo info          = DungeonDetailProxy.instance.DungeonInfo;
            int         count         = 1;//默认等于10改为1下面判断是扫荡10次才变值
            int         countByAction = (int)(GameProxy.instance.PveAction / info.dungeonData.actionNeed);

            if (countByAction == 0)
            {
                string tipString = Localization.Get("ui.common_tips.not_enough_pve_action_and_go_to_buy");
                ConfirmTipsView.Open(tipString, GoToBuyAction);
                return(false);
            }
            int countByLimit = info.GetRemindChallengeTimes();

            if (countByLimit == 0)
            {
                CommonAutoDestroyTipsView.Open(Localization.Get("ui.dungeon_detail_view.challengeTimesNotEnoughTip"));
                return(false);
            }
            count = Mathf.Min(count, countByAction);
            count = Mathf.Min(count, countByLimit);
            if (isTen)
            {
                count = count <= 1 ? 10: count;
            }

            GameResData ticket        = GlobalData.GetGlobalData().sweepTicket;
            GameResData buyTicketCost = GlobalData.GetGlobalData().buy_sweep_cost;
            int         num           = ItemProxy.instance.GetItemCountByItemID(ticket.id);
            int         buyCount      = count;
            int         needCost      = buyTicketCost.count * buyCount;
            int         cost          = buyCount - num;

            if (cost > 0)
            {
                string tip = string.Format(Localization.Get("ui.dungeon_detail_view.text_sweep_not_enough_tip"), buyCount);
                ConfirmCostTipsView.Open(new GameResData(BaseResType.Diamond, 0, needCost, 0), tip, null, () => {
                    ItemController.instance.CLIENT2LOBBY_BuySweepCouponsReq(buyCount);
                });
                return(false);
            }
            return(true);
        }