Ejemplo n.º 1
0
        private void OnInfoListener(string path, INodeData data)
        {
            int    residueTransferNum = AllianceEscortUtil.GetResidueTransferDartNum();
            string colorStr           = residueTransferNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            LTUIUtil.SetText(controller.UiLabels["ResidueTransferDartNumLabel"], string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_2955"), colorStr, residueTransferNum));

            int    residueRobNum = AllianceEscortUtil.GetResidueRobDartNum();
            string cs            = residueRobNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            LTUIUtil.SetText(controller.UiLabels["ResidueRobNumLabel"], string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_3223"), cs, residueRobNum));

            RefreshBtnState();
        }
Ejemplo n.º 2
0
        public int GetActivityCount(int activityID)//仅用于活动是否需要提示以及日常界面显示,部分活动次数不准确
        {
            Hotfix_LT.Data.SpecialActivityTemplate curAct = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(activityID);

            if (curAct == null)
            {
                return(0);
            }

            if (activityID == 9001 || activityID == 9002 || activityID == 9007)
            {
                //经验副本,金币副本,夺宝奇兵
                int    times = 0;
                string path  = string.Format("special_activity.{0}.c_times", activityID);
                DataLookupsCache.Instance.SearchDataByID(path, out times);
                return(curAct.times - times);
            }
            else if (activityID == 9003)
            {
                DataLookupsCache.Instance.SearchDataByID("world_boss.fightTimes", out int ChallengeTime);
                DataLookupsCache.Instance.SearchDataByID("world_boss.buyTimes", out int BuyTimes);
                int Maxtime = (int)Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigValue("worldBossChallengeMaxTimes");
                return(Maxtime + BuyTimes - ChallengeTime);
            }
            else if (activityID == 9004)
            {//军团战
                //EB.Debug.LogError("军团战数据获取");
                if (!LTLegionWarManager.Instance.IsOpenWarTime())
                {
                    return(0);
                }
                LegionWarTimeLine status = LTLegionWarManager.GetLegionWarStatus();
                if (status == LegionWarTimeLine.QualifyGame)
                {
                    if (!AllianceUtil.IsJoinedAlliance)
                    {
                        return(1);
                    }
                    int myScore = LTLegionWarManager.Instance.QualifyEnemyList.MyScore;
                    return(myScore >= LTLegionWarManager.Instance.MaxScore ? 0 : 1);
                }
                else if (status == LegionWarTimeLine.SemiFinal)
                {
                    return(1);
                }
                else if (status == LegionWarTimeLine.Final)
                {
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
            else if (activityID == 9005)
            {
                //军团护送
                if (AlliancesManager.Instance.Account.State != eAllianceState.Joined)
                {
                    return(curAct.times + GetVIPAdditionTimes(activityID));
                }
                return(AllianceEscortUtil.GetResidueTransferDartNum());
            }
            else if (activityID == 9006)
            {
                //军团拦截
                if (AlliancesManager.Instance.Account.State != eAllianceState.Joined)
                {
                    return(curAct.times + GetVIPAdditionTimes(activityID));
                }
                return(AllianceEscortUtil.GetResidueRobDartNum());
            }
            else if (activityID == 9009)
            {
                //极限试炼
                int dayDisCountTime = 0;
                int oldVigor        = 0;
                int NewVigor        = 0;
                int times           = LTUltimateTrialDataManager.Instance.GetCurrencyTimes();
                NewGameConfigTemplateManager.Instance.GetEnterVigor(eBattleType.InfiniteChallenge, out dayDisCountTime, out NewVigor, out oldVigor);
                int curDisCountTime = dayDisCountTime - times;
                return(Mathf.Max(0, curDisCountTime));
                //if (!DataLookupsCache.Instance.SearchIntByID("infiniteChallenge.info.challengeTimes", out times))
                //{
                //    times = curAct.times;
                //}
                //return Mathf.Max(0, times + GetVIPAdditionTimes(activityID));
            }
            else if (activityID == 9010)
            {//天梯
                LTDailyData tempdailydata = GetDailyDataByActivityID(9010);
                if (tempdailydata == null)
                {
                    return(0);
                }
                else
                {
                    return(tempdailydata.OpenTimeValue < LTDailyDataManager.TimeNow && tempdailydata.StopTimeValue > LTDailyDataManager.TimeNow ? 1 : 0);
                }
            }
            else if (activityID == 9011)
            {//英雄交锋
                //今天赢了或者达到最大胜场 0 就不显示红点
                return(LTNewHeroBattleManager.GetInstance().GetHeroBattleTipNum());
            }
            else if (activityID == 9013)
            {
                return(IsCouldReceiveVit()?1:0);
            }
            else if (activityID == 9014)
            {
                //幸运悬赏
                int times = LTBountyTaskHudController.CurHantTimes;
                return(times);
            }
            else if (activityID == 9015)
            {
                //角斗场
                int totalTimes = VIPTemplateManager.Instance.GetTotalNum(VIPPrivilegeKey.ArenaTimes) + ArenaManager.Instance.Info.buyTimes;
                int times      = Mathf.Max(0, totalTimes - ArenaManager.Instance.Info.usedTimes);
                return(times);
            }
            else if (activityID == 9016)
            {
                //荣耀角斗场
                int freetimes = HonorArenaManager.Instance.GetHonorArenaFreeTimes();
                int usetimes  = HonorArenaManager.Instance.Info.usedTimes;
                return(freetimes - usetimes);
            }
            return(0);
        }