Пример #1
0
        public static List <RankingQuestParam> FindRankingQuestParamBySchedule(RankingQuestScheduleParam.RakingQuestScheduleGetFlags flag)
        {
            List <RankingQuestParam> rankingQuestParamList = new List <RankingQuestParam>();
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null))
            {
                return(rankingQuestParamList);
            }
            if (instanceDirect.RankingQuestParams == null)
            {
                DebugUtility.LogError("GameManager.Instance.RankingQuestParamsがnullです");
                return(rankingQuestParamList);
            }
            List <RankingQuestScheduleParam> questScheduleParam = RankingQuestScheduleParam.GetRankingQuestScheduleParam(flag);
            List <RankingQuestParam>         rankingQuestParams = instanceDirect.RankingQuestParams;

            for (int index1 = 0; index1 < rankingQuestParams.Count; ++index1)
            {
                for (int index2 = 0; index2 < questScheduleParam.Count; ++index2)
                {
                    if (rankingQuestParams[index1].schedule_id == questScheduleParam[index2].id)
                    {
                        rankingQuestParamList.Add(rankingQuestParams[index1]);
                        break;
                    }
                }
            }
            return(rankingQuestParamList);
        }
        public override void OnActivate(int pinID)
        {
            if (pinID != 100)
            {
                return;
            }
            List <RankingQuestParam> rankingQuestParamList = RankingQuestScheduleParam.FilterDuplicateRankingQuestIDs(RankingQuestScheduleParam.FindRankingQuestParamBySchedule(RankingQuestScheduleParam.RakingQuestScheduleGetFlags.Open | RankingQuestScheduleParam.RakingQuestScheduleGetFlags.Visible));

            MonoSingleton <GameManager> .Instance.SetAvailableRankingQuestParams(rankingQuestParamList);

            if (rankingQuestParamList.Count > 0)
            {
                this.ActivateOutputLinks(101);
            }
            else
            {
                this.ActivateOutputLinks(102);
            }
        }
Пример #3
0
        public static List <RankingQuestParam> FilterDuplicateRankingQuestIDs(List <RankingQuestParam> list)
        {
            DateTime serverTime = TimeManager.ServerTime;
            List <RankingQuestParam> rankingQuestParamList = new List <RankingQuestParam>();

            for (int i = 0; i < list.Count; ++i)
            {
                int index = rankingQuestParamList.FindIndex((Predicate <RankingQuestParam>)(p => p.iname == list[i].iname));
                RankingQuestParam rankingQuestParam = index == -1 ? (RankingQuestParam)null : rankingQuestParamList[index];
                if (rankingQuestParam != null)
                {
                    rankingQuestParamList[index] = RankingQuestScheduleParam.CompareOpenOrLatest(ref serverTime, rankingQuestParam, list[i]);
                }
                else
                {
                    rankingQuestParamList.Add(list[i]);
                }
            }
            return(rankingQuestParamList);
        }
        public static List <RankingQuestParam> FilterDuplicateRankingQuestIDs(List <RankingQuestParam> list)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            RankingQuestScheduleParam.\u003CFilterDuplicateRankingQuestIDs\u003Ec__AnonStorey2F3 idsCAnonStorey2F3 = new RankingQuestScheduleParam.\u003CFilterDuplicateRankingQuestIDs\u003Ec__AnonStorey2F3();
            // ISSUE: reference to a compiler-generated field
            idsCAnonStorey2F3.list = list;
            DateTime serverTime = TimeManager.ServerTime;
            List <RankingQuestParam> rankingQuestParamList = new List <RankingQuestParam>();

            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            RankingQuestScheduleParam.\u003CFilterDuplicateRankingQuestIDs\u003Ec__AnonStorey2F4 idsCAnonStorey2F4 = new RankingQuestScheduleParam.\u003CFilterDuplicateRankingQuestIDs\u003Ec__AnonStorey2F4();
            // ISSUE: reference to a compiler-generated field
            idsCAnonStorey2F4.\u003C\u003Ef__ref\u0024755 = idsCAnonStorey2F3;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            for (idsCAnonStorey2F4.i = 0; idsCAnonStorey2F4.i < idsCAnonStorey2F3.list.Count; ++idsCAnonStorey2F4.i)
            {
                // ISSUE: reference to a compiler-generated method
                int index = rankingQuestParamList.FindIndex(new Predicate <RankingQuestParam>(idsCAnonStorey2F4.\u003C\u003Em__2F5));
                RankingQuestParam rankingQuestParam = index == -1 ? (RankingQuestParam)null : rankingQuestParamList[index];
                if (rankingQuestParam != null)
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    rankingQuestParamList[index] = RankingQuestScheduleParam.CompareOpenOrLatest(ref serverTime, rankingQuestParam, idsCAnonStorey2F3.list[idsCAnonStorey2F4.i]);
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    rankingQuestParamList.Add(idsCAnonStorey2F3.list[idsCAnonStorey2F4.i]);
                }
            }
            return(rankingQuestParamList);
        }