コード例 #1
0
 private void OnAutoReflashData(int seq)
 {
     //Data.AllianceTechChest allianceTechChest = Data.AllianceTemplateManager.Instance.GetAllianceTechChestInfoByLevel(techchestLevel);
     if (CurtechChest != null)
     {
         curGold  = curGold + CurtechChest.goldrate * 1;
         curExp   = curExp + CurtechChest.exprate * 1;
         curVigor = curVigor + CurtechChest.vigorrate * 1;
         if (curGold > CurtechChest.goldmax)
         {
             curGold = CurtechChest.goldmax;
         }
         if (curExp > CurtechChest.expmax)
         {
             curExp = CurtechChest.expmax;
         }
         if (curVigor > CurtechChest.vigormax)
         {
             curVigor = CurtechChest.vigormax;
         }
         Messenger.Raise(EventName.LegionTechChestUpdate);
         LegionLogic.GetInstance().isHaveTechResCanRecieve();
         refreshTimer = ILRTimerManager.instance.AddTimer(3600 * 1000, 1, OnAutoReflashData);
     }
 }
コード例 #2
0
        private void UpdataTechChestInfo(object obj)
        {
            int preCalTime = calTime;

            calTime = EB.Dot.Integer("last_tech_chest_time", obj, calTime);
            if (calTime != 0 && calTime == preCalTime)
            {
                addgold  = EB.Dot.Integer("tech_chest_store.gold", obj, addgold);
                addexp   = EB.Dot.Integer("tech_chest_store.xp", obj, addexp);
                addvigor = EB.Dot.Integer("tech_chest_store.vigor", obj, addvigor);
            }
            else if (calTime != preCalTime)
            {
                addgold  = EB.Dot.Integer("tech_chest_store.gold", obj, 0);
                addexp   = EB.Dot.Integer("tech_chest_store.xp", obj, 0);
                addvigor = EB.Dot.Integer("tech_chest_store.vigor", obj, 0);
            }

            CurtechChest = Data.AllianceTemplateManager.Instance.GetAllianceTechChestInfoByLevel(techchestLevel);
            if (CurtechChest == null)
            {
                EB.Debug.LogError("allianceTechChest is null,please Check");
                return;
            }
            if (calTime <= 0)
            {
                curGold  = CurtechChest.goldmax;
                curExp   = CurtechChest.expmax;
                curVigor = CurtechChest.vigormax;
            }
            else
            {
                int nextRefreshTime = 3605 - EB.Time.Now % 3600;
                int totalAddTimes   = Mathf.FloorToInt((float)EB.Time.Now / 3600) - Mathf.FloorToInt((float)calTime / 3600);
                if (totalAddTimes >= 0)
                {
                    int totalgold  = addgold + CurtechChest.goldrate * totalAddTimes;
                    int totalexp   = addexp + CurtechChest.exprate * totalAddTimes;
                    int totalvigor = addvigor + CurtechChest.vigorrate * totalAddTimes;
                    int perCurGold = curGold;
                    curGold  = totalgold >= CurtechChest.goldmax ? CurtechChest.goldmax : totalgold;
                    curExp   = totalexp >= CurtechChest.expmax ? CurtechChest.expmax : totalexp;
                    curVigor = totalvigor >= CurtechChest.vigormax ? CurtechChest.vigormax : totalvigor;
                    RemoveTimer();
                    if (nextRefreshTime > 0)
                    {
                        refreshTimer = ILRTimerManager.instance.AddTimer(nextRefreshTime * 1000, 1, OnAutoReflashData);
                    }
                    else
                    {
                        refreshTimer = ILRTimerManager.instance.AddTimer(3600 * 1000, 1, OnAutoReflashData);
                    }
                    if (perCurGold != curGold)
                    {
                        Messenger.Raise(EventName.LegionTechChestUpdate);
                        LegionLogic.GetInstance().isHaveTechResCanRecieve();
                    }
                }
            }
        }
コード例 #3
0
 public override void OnEnter()
 {
     LegionLogic.GetInstance();
     GuideManager.Instance.InitGuideState();//tOdo为什么删掉了
     //预先加载主城场景
     LoadingLogic.AddCustomProgress(2);
     SceneLoadManager.LoadOTALevelGroupAsync("MainLandView", SceneLoadBegin, SceneLoadFailed, SceneLoadLoading, SceneLoadFinished);
 }
コード例 #4
0
 private void InitRedPoint()
 {
     LegionLogic.GetInstance().IsHaveApplyMember();
     LegionLogic.GetInstance().IsOpenActivity();
     LegionLogic.GetInstance().HaveDonateRP();
     LegionLogic.GetInstance().IsHaveTechRP();
     LegionLogic.GetInstance().IsHaveApplyMember();
     LegionLogic.GetInstance().IsHaveMercenary();
 }
コード例 #5
0
 /// <summary>
 /// 点击事件标题
 /// </summary>
 private void OnClickChoiceMessage()
 {
     MainChoiceState = ChoiceState.Message;
     LegionLogic.GetInstance().IsHaveNewEvent = false;
     LTRedPointSystem.Instance.SetRedPointNodeNum(RedPointConst.haveevent, 0);
     if (LegionEvent.SendGetLegionMessages != null)
     {
         LegionEvent.SendGetLegionMessages();
     }
 }
コード例 #6
0
 public override void OnFocus()
 {
     PausePanelUpdate(UIPanel.PauseType.Others, false);
     if (MainChoiceState == ChoiceState.Medal)
     {
         MedalPage.SetMedalCoin();
     }
     if (MainChoiceState == ChoiceState.Mercenary)
     {
         MercenaryPage.OnFocus();
         LegionLogic.GetInstance().IsHaveMercenary();
     }
 }
コード例 #7
0
        public void Init(long uid, List <OtherPlayerPartnerData> partnerList)
        {
            if (!mDMono.gameObject.activeInHierarchy)
            {
                return;
            }

            if (partnerList != null)
            {
                this.partnerList = partnerList;
            }

            grid.gameObject.CustomSetActive(false);

            LegionLogic.GetInstance().OnSendGetPlayerFormationInfo(uid, FetchDataHandler);
        }
コード例 #8
0
        public override IEnumerator OnAddToStack()
        {
            yield return(base.OnAddToStack());

            ShowUI();
            if (!isTimeLimit)
            {
                string savestring = PlayerPrefs.GetString(LTLegionWarManager.Instance.LocalSavekey);
                if (string.IsNullOrEmpty(savestring) || !int.TryParse(savestring, out int time) || (EB.Time.Now - time) > 86400)
                {
                    PlayerPrefs.SetString(LTLegionWarManager.Instance.LocalSavekey, EB.Time.Now.ToString());
                    LegionLogic.GetInstance().IsOpenLegionBattle();
                }
            }
            GlobalMenuManager.Instance.PushCache("LTLegionWarJoinView");
            isOpen = true;
        }
コード例 #9
0
        /// <summary>
        /// 打开后传参
        /// </summary>
        /// <param name="param"></param>
        public override void SetMenuData(object param)
        {
            base.SetMenuData(param);
            Hashtable table = param as Hashtable;

            if (table == null)
            {
                LegionData data = param as LegionData;

                if (data == null)
                {
                    return;
                }
                SetData(data);
                MainChoiceState = ChoiceState.Member;
                titleCtrl.SetTitleBtn((int)MainChoiceState);
            }
            else
            {
                if (table["legionData"] != null)
                {
                    LegionData data = (LegionData)table["legionData"];
                    if (data == null)
                    {
                        return;
                    }
                    SetData(data);
                }
                if (table["choiceState"] != null)
                {
                    ChoiceState state = (ChoiceState)table["choiceState"];
                    titleCtrl.SetTitleBtn((int)state);
                    MainChoiceState = state;
                }
            }

            //刷新军团被雇佣次数
            LegionLogic.GetInstance().OnSendGetCurDonateInfo((ha) =>
            {
                DataLookupsCache.Instance.CacheData(ha);
            });
        }
コード例 #10
0
 private void UpdataBasicInfoList()
 {
     if (isTechInfoInit)
     {
         var data = Data.AllianceTemplateManager.Instance.mTechSkillList;
         for (int i = 0; i < TechInfoList.Count; i++)
         {
             var tempinfo = TechInfoList[i];
             if (TechlevelDic.TryGetValue(tempinfo.skillId, out int skilllevel))
             {
                 if (skilllevel != tempinfo.level)
                 {
                     tempinfo.RefreshLevelUpdata(skilllevel);
                     LegionLogic.GetInstance().IsHaveCouldLevelupTechSkill();
                     //红点刷新
                 }
             }
         }
     }
 }
コード例 #11
0
 private void OnClickChest()
 {
     if (couldRecieve)
     {
         LegionLogic.GetInstance().SendRecieveDonateChest(aid, chestData.id, delegate
         {
             Hashtable data = Johny.HashtablePool.Claim();
             data.Add("reward", chestData.Rewards);
             GlobalMenuManager.Instance.Open("LTShowRewardView", data);
         });
         LegionLogic.GetInstance().OnSendGetCurDonateInfo(FetchDataHandler);
     }
     else
     {
         Hashtable data = Johny.HashtablePool.Claim();
         data.Add("data", chestData.Rewards);
         data.Add("tip", string.Format(EB.Localizer.GetString("ID_LEGION_DONATECHEST_REWARD"), chestData.score));
         GlobalMenuManager.Instance.Open("LTRewardShowUI", data);
     }
 }
コード例 #12
0
        /// <summary>
        /// 点击购买按钮
        /// </summary>
        public void OnClickBuyBtn()
        {
            if (BalanceResourceUtil.GetUserDiamond() < mCoinNum)
            {
                BalanceResourceUtil.HcLessMessage();
                return;
            }

            if (hasBuy)
            {
                return;
            }
            hasBuy = true;
            LegionLogic.GetInstance().BuyLegionMedal(delegate
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceShopCtrl_4116"));

                mCurMedalState = EMedalState.mGive;
                SetMedalState();
            });
        }
コード例 #13
0
        /// <summary>
        /// 点击赠与按钮
        /// </summary>
        public void OnClickGiveBtn()
        {
            if (mMemberData == null)
            {
                EB.Debug.LogError("LegionMedalMemberItem OnClickGiveBtn is Error, mMemberData is Null");
                return;
            }

            MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_4, string.Format(EB.Localizer.GetString("ID_LEGION_MEDAL_GIVE_CONFIRM"), mMemberData.memberName), delegate(int result)
            {
                if (result == 0)
                {
                    LegionLogic.GetInstance().SendMedal(mMemberData.uid, delegate
                    {
                        if (mSendAction != null)
                        {
                            mSendAction();
                        }

                        ArrayList aList = EB.JSON.Parse(Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("AllianceMedalSendReward")) as ArrayList;

                        List <LTShowItemData> showItemsList = new List <LTShowItemData>();
                        for (int i = 0; i < aList.Count; i++)
                        {
                            string id   = EB.Dot.String("data", aList[i], string.Empty);
                            int count   = EB.Dot.Integer("quantity", aList[i], 0);
                            string type = EB.Dot.String("type", aList[i], string.Empty);
                            if (!string.IsNullOrEmpty(id))
                            {
                                LTShowItemData showItemData = new LTShowItemData(id, count, type);
                                showItemsList.Add(showItemData);
                            }
                        }

                        GlobalMenuManager.Instance.Open("LTShowRewardView", showItemsList);
                    });
                }
            });
        }
コード例 #14
0
        /// <summary>
        /// 点击解除按钮
        /// </summary>
        public void OnClickRelieve()
        {
            if (mCurGiveMember != null)
            {
                if (!IsInLegion(mCurGiveMember.uid))
                {
                    Init();
                    return;
                }

                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_4, string.Format(EB.Localizer.GetString("ID_LEGION_MEDAL_RELIEVE_CONFIRM"), mCurGiveMember.memberName), delegate(int result)
                {
                    if (result == 0)
                    {
                        LegionLogic.GetInstance().UnlinkMedalPair(mCurGiveMember.uid, delegate
                        {
                            mCurGiveMember = null;
                            DataLookupsCache.Instance.CacheData("alliance.account.medal.send", null);
                            Init();
                        });
                    }
                });
            }
        }
コード例 #15
0
 private void OnClickBreakBtn()
 {
     if (!isCouldClick)
     {
         return;
     }
     if (curSkillLevel >= Legionlevel)
     {
         MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_LEGION_TECH_LEVELLIMIT"));//技能等级不能超过军团等级
         return;
     }
     if (costMedal > totalMedal)
     {
         MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_LEGION_TECH_COSTLIMIT"));//技能升级所需奖章不足
         return;
     }
     if (curSkillLevel >= SelfItemdata.maxLevel)
     {
         MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_LEGION_TECH_MAXLEVEL"));//技能已达到最大等级
         return;
     }
     LegionLogic.GetInstance().LegionUplevelTechLevel(aid, curSkillLevel, SelfItemdata.skillid);
     isCouldClick = false;
 }
コード例 #16
0
        private void SetBoss(int index, bool updateInfo)
        {
            index         = index % Hotfix_LT.Data.AllianceTemplateManager.Instance.mFBBossList.Count;
            m_CurrentBoss = Hotfix_LT.Data.AllianceTemplateManager.Instance.mFBBossList[index];
            SetBoss(m_CurrentBoss);
            //将左右按钮隐藏及打开设置
            bool leftBtnVisible  = index != 0;
            bool rightBtnVisible = index != Hotfix_LT.Data.AllianceTemplateManager.Instance.mFBBossList.Count - 1;

            v_LeftBossBtn.SetActive(leftBtnVisible);
            v_RightBossBtn.SetActive(rightBtnVisible);

            //刷新排行榜
            v_RankController.F_UpdateBossRank(m_CurrentBoss.monsterId);
            int current = LegionModel.GetInstance().legionData.todayExp;

            if (updateInfo)
            {
                //获取当前BOSS的挑战次数
                LegionLogic.GetInstance().OnSendGetCurDonateInfo((Hashtable obj) =>
                {
                    DataLookupsCache.Instance.CacheData(obj);
                    Hashtable hashtable    = EB.Dot.Object("alliance", obj, null);
                    hashtable              = EB.Dot.Object("todayDonateTimes", hashtable, null);
                    m_BossChallengeNumInfo = EB.Dot.Object("boss", hashtable, null);
                    MaxBoxCount            = EB.Dot.Integer("bossBoxCount." + m_CurrentBoss.monsterId.ToString(), hashtable, -1);
                    //设置扫荡相关
                    SetBossWipeInfo(MaxBoxCount > -1);
                    int challenge = EB.Dot.Integer(m_CurrentBoss.monsterId.ToString(), m_BossChallengeNumInfo, 0);
                    if (challenge >= 0)
                    {
                        //设置当前的BOSS挑战次数
                        SetChanllengeBtnTips(m_CurrentBoss.challenge - challenge, m_CurrentBoss.challenge);
                    }
                    LegionLogic.GetInstance().IsOpenLegionFB();
                    SetBossRedPoint(v_LeftBossRes, index - 1, current, leftBtnVisible);
                    SetBossRedPoint(v_RightBossRes, index + 1, current, rightBtnVisible);
                });
            }
            else
            {
                int challenge = EB.Dot.Integer(m_CurrentBoss.monsterId.ToString(), m_BossChallengeNumInfo, 0);
                //设置扫荡相关
                SetBossWipeInfo(DataLookupsCache.Instance.SearchDataByID <int>("alliance.todayDonateTimes.bossBoxCount." + m_CurrentBoss.monsterId.ToString(), out MaxBoxCount));
                if (challenge >= 0)
                {
                    //设置当前的BOSS挑战次数
                    SetChanllengeBtnTips(m_CurrentBoss.challenge - challenge, m_CurrentBoss.challenge);
                }
                //判断是否需要打开相应的红点
                SetBossRedPoint(v_LeftBossRes, index - 1, current, leftBtnVisible);
                SetBossRedPoint(v_RightBossRes, index + 1, current, rightBtnVisible);
            }

            //处理进度条的情况
            int total = m_CurrentBoss.donate;

            v_ChallengeBtn.SetActive(!(current < total));
            v_ProgressPanel.SetActive(current < total);
            SetProgressPanel(current, total);
        }
コード例 #17
0
        public void ShowUI(bool isShow)
        {
            if (isShow)
            {
                //军团护送
                for (int i = 0; i < TransferDartItems.Length; i++)
                {
                    TransferDartItems[i].mDMono.gameObject.CustomSetActive(false);
                }
                Hotfix_LT.Data.SpecialActivityTemplate template = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9005);
                if (template.awards != null)
                {
                    for (int i = 0; i < ((template.awards.Count > TransferDartItems.Length) ? TransferDartItems.Length : template.awards.Count); i++)
                    {
                        if (template.awards[i] != null)
                        {
                            TransferDartItems[i].LTItemData = template.awards[i];
                            TransferDartItems[i].mDMono.gameObject.CustomSetActive(true);
                        }
                        else
                        {
                            TransferDartItems[i].mDMono.gameObject.CustomSetActive(false);
                        }
                    }
                }

                if (Hotfix_LT.Data.EventTemplateManager.Instance.IsTimeOK("escort_start", "escort_stop"))
                {
                    TransferDartTimeLabel.color = LT.Hotfix.Utility.ColorUtility.GreenColor;
                }
                else
                {
                    TransferDartTimeLabel.color = LT.Hotfix.Utility.ColorUtility.RedColor;
                }
                LTUIUtil.SetText(TransferDartTimeLabel, Hotfix_LT.Data.EventTemplateManager.Instance.GetActivityOpenTimeStr("escort_start", "escort_stop"));

                //走配置表来设置奖励内容
                ArrayList             aList         = EB.JSON.Parse(Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("AllianceFBReward")) as ArrayList;
                List <LTShowItemData> showItemsList = new List <LTShowItemData>();
                if (aList == null)
                {
                    FubenItems[0].LTItemData = new LTShowItemData("arena-gold", 1, "res", false);
                    FubenItems[1].LTItemData = new LTShowItemData("gold", 1, "res", false);
                }
                else
                {
                    for (int i = 0; i < aList.Count; i++)
                    {
                        string id    = EB.Dot.String("data", aList[i], string.Empty);
                        int    count = EB.Dot.Integer("quantity", aList[i], 0);
                        string type  = EB.Dot.String("type", aList[i], string.Empty);
                        if (!string.IsNullOrEmpty(id))
                        {
                            LTShowItemData showItemData = new LTShowItemData(id, count, type, false);
                            showItemsList.Add(showItemData);
                        }
                    }
                    //
                    FubenItems[0].LTItemData = showItemsList[0];
                    FubenItems[1].LTItemData = showItemsList[1];
                }

                //军团战
                Hotfix_LT.Data.SpecialActivityTemplate template2 = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9004);
                for (int i = 0; i < LegionWarItems.Length; i++)
                {
                    LegionWarItems[i].mDMono.gameObject.CustomSetActive(false);
                }
                if (template.awards != null)
                {
                    for (int i = 0; i < ((template2.awards.Count > LegionWarItems.Length) ? LegionWarItems.Length : template2.awards.Count); i++)
                    {
                        if (template.awards[i] != null)
                        {
                            LegionWarItems[i].LTItemData = template2.awards[i];
                            LegionWarItems[i].mDMono.gameObject.CustomSetActive(true);
                        }
                        else
                        {
                            LegionWarItems[i].mDMono.gameObject.CustomSetActive(false);
                        }
                    }
                }
                warTime = LegionWarTimeLine.none;
                string Title = string.Empty;
                LegionLogic.GetInstance().IsOpenLegionBattle();
                if (LTLegionWarManager.Instance.IsOpenWarTime())
                {
                    warTime = LTLegionWarManager.GetLegionWarStatus();
                }
                else
                {
                    Title = string.Format("[ff6699]{0}[-]\n", EB.Localizer.GetString("ID_NEXT_WEEK"));
                }

                LegionWarTimeLabel.text = string.Format("{0}{1}{2}{3}", Title, GetTimeStr(LTLegionWarManager.Instance.WarOpenTime.QualifyOpenTime, warTime == LegionWarTimeLine.QualifyGame)
                                                        , GetTimeStr(LTLegionWarManager.Instance.WarOpenTime.SemiOpenTime, warTime == LegionWarTimeLine.SemiFinal)
                                                        , GetTimeStr(LTLegionWarManager.Instance.WarOpenTime.FinalOpenTime, warTime == LegionWarTimeLine.Final));

                LegionLogic.GetInstance().IsOpenConvoy();
                LegionLogic.GetInstance().IsOpenLegionFB();
            }


            mDMono.gameObject.CustomSetActive(isShow);
        }
コード例 #18
0
        static void ProcessSpecialActionTaskRunning(string taskid)
        {
            Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid);
            if (taskTpl == null)
            {
                return;
            }
            int taskspecialtype = 0;;

            if (!int.TryParse(taskTpl.target_parameter_1, out taskspecialtype))
            {
                return;
            }

            switch ((eTaskSpecialType)taskspecialtype)
            {
            case eTaskSpecialType.FINISH_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                GlobalMenuManager.Instance.Open("LTInstanceMapHud");
                break;

            case eTaskSpecialType.ALLIACE_DONATE:
                LegionLogic.GetInstance().ShowUI(ChoiceState.Donate);
                break;

            case eTaskSpecialType.GOLD_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10020);
                if (ftemp != null && !ftemp.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Gold");
                break;

            case eTaskSpecialType.WORLD_CHAT:
                GlobalMenuManager.Instance.Open("ChatHudView", null);
                break;

            case eTaskSpecialType.LADDER:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.ARENA:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.BUY_GOLD:
                GlobalMenuManager.Instance.Open("LTResourceShopUI");
                break;

            case eTaskSpecialType.GAMBLE:
                GlobalMenuManager.Instance.Open("LTDrawCardTypeUI");
                break;

            case eTaskSpecialType.YABIAO:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.UlTIMATE:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.HANT:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.LADDER_CHALLENGE:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.BUY_VIGOR:
                GlobalMenuManager.Instance.Open("LTResourceShopUI");
                break;

            case eTaskSpecialType.BUY_ITEM:
                GlobalMenuManager.Instance.Open("LTStoreUI");
                break;

            case eTaskSpecialType.PK:
                GlobalMenuManager.Instance.ComebackToMianMenu();
                break;

            case eTaskSpecialType.CHALLENGE_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud");
                break;

            case eTaskSpecialType.SEND_VIGOR:
                Hotfix_LT.Data.FuncTemplate ft3 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057);
                if (ft3 != null && !ft3.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft3.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("FriendHud", null);
                break;

            case eTaskSpecialType.COST_DIAMOND:
                GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.hc);
                break;

            case eTaskSpecialType.EQUIP_INTENSIFY:
                Hotfix_LT.Data.FuncTemplate ft2 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                if (ft2 != null && !ft2.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft2.GetConditionStr());
                    return;
                }
                InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
                GlobalMenuManager.Instance.Open("LTPartnerEquipmentUI", LTPartnerDataManager.Instance.GetOwnPartnerList()[0]);
                break;

            case eTaskSpecialType.CLASH_OF_HEROES:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.EXP_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10021);
                if (ft != null && !ft.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Exp");
                break;

            case eTaskSpecialType.CHALLENGE_INSTANCE:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                Hotfix_LT.Data.FuncTemplate f_ch = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10065);
                if (f_ch != null && !f_ch.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, f_ch.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud");
                break;

            case eTaskSpecialType.LEGION_INSSTANCE:
                if (!LegionModel.GetInstance().isJoinedLegion)
                {
                    LegionLogic.GetInstance().ShowUI();
                }
                else
                {
                    GlobalMenuManager.Instance.Open("LTLegionFBUI");
                }
                break;

            case eTaskSpecialType.WORLD_BOSS:
                if (AllianceUtil.GetIsInTransferDart(null))
                {
                    return;
                }
                //配置npc
                GlobalMenuManager.Instance.CloseMenu("NormalTaskView");
                string[] strs = new string[2] {
                    "s001a", "AreaTrigger_E"
                };
                WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, strs[0], strs[1]);
                break;

            case eTaskSpecialType.PARENER_ADVANCED:
                Hotfix_LT.Data.FuncTemplate ft4 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                if (ft4 != null && !ft4.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft4.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade");
                break;

            case eTaskSpecialType.PARENER_UPLEVEL:
                Hotfix_LT.Data.FuncTemplate ft5 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                if (ft5 != null && !ft5.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft5.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTPartnerView", "Develop");
                break;

            default:
                break;
            }
        }
コード例 #19
0
        //如果处于进行状态  则导航到目的(NPC,场景,副本,某某功能)
        public static void ProcessTaskRunning(string taskid)
        {
            Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid);
            switch (taskTpl.target_type)
            {
            case 103:
                StartTaskCampaignFinding(taskid, false);
                break;

            case 2:
                StartTaskCampaignFinding(taskid, true);
                break;

            case 301:     //301 = 增加主线(累计计数型)
                int target_parameter = int.Parse(taskTpl.target_parameter_1);
                switch (target_parameter)
                {
                case 1:          //主角等级
                    GlobalMenuManager.Instance.Open("LTInstanceMapHud", null);
                    break;

                case 2:          //征战关卡获得星数
                    if (AllianceUtil.IsInTransferDart)
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                        return;
                    }
                    GlobalMenuManager.Instance.Open("LTInstanceMapHud", null);
                    break;

                case 3:          //夺宝奇兵累计杀怪数
                    GlobalMenuManager.Instance.ComebackToMianMenu();
                    break;

                case 4:          //累计军团护送次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 5:          //累计军团援助次数
                    GlobalMenuManager.Instance.ComebackToMianMenu();
                    break;

                case 6:          //累计军团拦截次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 7:          //累计幸运悬赏次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 8:          //累计英雄交锋次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 9:          //累计角斗场次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 10:          //累计伙伴上阵图鉴数量
                    Hotfix_LT.Data.FuncTemplate func = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10049);
                    if (!func.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("PartnerHandbookHudView");
                    break;

                case 11:          //玩家拥有好友数量
                {
                    Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057);
                    if (ftemp != null && !ftemp.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("FriendHud", null);
                }
                break;

                case 12:          //玩家拥有伙伴数量
                    GlobalMenuManager.Instance.Open("LTDrawCardTypeUI");
                    break;

                case 13:          //伙伴总星级
                    Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                    if (ft != null && !ft.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_StarUp");
                    break;

                case 14:          //累计军团预赛获得分数
                    LegionLogic.GetInstance().ShowUI();
                    break;

                case 15:          //累计购买金币次数
                    GlobalMenuManager.Instance.Open("LTResourceShopUI");
                    break;

                case 16:          //累计购买体力次数
                    GlobalMenuManager.Instance.Open("LTResourceShopUI");
                    break;

                case 17:          //累计购买伙伴经验次数
                    GlobalMenuManager.Instance.Open("LTResourceShopUI");
                    break;

                case 18:          //累计购买入场券次数
                    GlobalMenuManager.Instance.Open("LTResourceShopUI");
                    break;

                case 19:          //累计购买金币抽卡次数
                    GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.gold);
                    break;

                case 20:          //累计购买钻石抽卡次数
                    GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.hc);
                    break;

                case 21:          //累计完成日常任务次数
                    GlobalMenuManager.Instance.Open("NormalTaskView", null);
                    break;

                case 22:          //累计天梯胜利次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 23:          //累计军团捐献获得军团币数量
                    LegionLogic.GetInstance().ShowUI(ChoiceState.Donate);
                    break;

                case 24:          //累计军团护送次数
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                default:
                    EB.Debug.LogError("Main Task target_parameter_1 Error ,target_parameter_1={0}", target_parameter);
                    break;
                }
                break;

            case 302:
                int target_parameter_other = int.Parse(taskTpl.target_parameter_1);
                switch (target_parameter_other)
                {
                case 1:          //玩家完美通关金币副本XX难度
                {
                    if (AllianceUtil.IsInTransferDart)
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                        return;
                    }
                    Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10020);
                    if (ftemp != null && !ftemp.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Gold");
                }
                break;

                case 2:          //玩家完美通关经验副本XX难度
                    if (AllianceUtil.IsInTransferDart)
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                        return;
                    }
                    Hotfix_LT.Data.FuncTemplate ftemp1 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10021);
                    if (ftemp1 != null && !ftemp1.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp1.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Exp");
                    break;

                case 3:          //玩家通关极限试练X-Y
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 4:          //玩家天梯达到XX段位
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 5:          //玩家角斗场排名达到X
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 6:          //玩家爵位晋升为XX
                    Hotfix_LT.Data.FuncTemplateManager.OpenFunc(10069);
                    break;

                case 7:          //玩家攻击城池累计伤害达到X
                    GlobalMenuManager.Instance.Open("LTNationBattleEntryUI");
                    break;

                case 8:          //玩家防守城池累计修理值达到X
                    GlobalMenuManager.Instance.Open("LTNationBattleEntryUI");
                    break;

                case 9:          //玩家X个图鉴评分等级评分达到Y
                    Hotfix_LT.Data.FuncTemplate func = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10049);
                    if (!func.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("PartnerHandbookHudView");
                    break;

                case 10:          //玩家把X个伙伴升到Y级
                    Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                    if (ft != null && !ft.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("LTPartnerView", "Develop");
                    break;

                case 11:          //玩家把X件装备强化到Y级
                    Hotfix_LT.Data.FuncTemplate ft1 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                    if (ft1 != null && !ft1.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft1.GetConditionStr());
                        return;
                    }
                    InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
                    GlobalMenuManager.Instance.Open("LTPartnerEquipmentUI", LTPartnerDataManager.Instance.GetOwnPartnerList()[0]);
                    break;

                case 12:          //玩家把X个伙伴进阶到Y
                    Hotfix_LT.Data.FuncTemplate ft2 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                    if (ft2 != null && !ft2.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft2.GetConditionStr());
                        return;
                    }
                    GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade");
                    break;

                case 13:          //荣耀角斗场积分达到Y分
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 14:          //天梯达到Y分
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 15:          //战力达到Y
                    GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade");
                    break;

                case 16:        //荣耀角斗场获胜次数达到X场
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 17:        //亚曼拉单次挑战伤害达到X
                    StartTaskAcceptNpcPathFinding(taskid);
                    break;

                case 18:        //军团副本单次挑战获得宝箱数达到X个
                    LegionLogic.GetInstance().OpenLegionBossUI();
                    break;

                default:
                    EB.Debug.LogError("Main Task target_parameter_1 Error ,target_parameter_1={0}", target_parameter_other);
                    break;
                }
                break;

            case 7:      //日常任务
                ProcessSpecialActionTaskRunning(taskid);
                break;

            default:
                break;
            }
        }
コード例 #20
0
 private void ResProcess(Hashtable hs)
 {
     LegionLogic.GetInstance().SendGetAlliance();//向服务器发送请求获得军团信息
 }