예제 #1
0
        private QuestMissionTypeAttribute GetQuestMissionTypeAttribute(EMissionType missionType)
        {
            QuestMissionTypeAttribute missionTypeAttribute = (QuestMissionTypeAttribute)null;

            if (!QuestBonusObjective.m_QuestMissionTypeDic.TryGetValue(missionType, out missionTypeAttribute))
            {
                missionTypeAttribute = GameUtility.GetCustomAttribute <QuestMissionTypeAttribute>((object)missionType, false);
                QuestBonusObjective.m_QuestMissionTypeDic.Add(missionType, missionTypeAttribute);
            }
            return(missionTypeAttribute);
        }
예제 #2
0
        public bool CheckMissionValueAchievable(int missions_val)
        {
            if (!this.IsProgressMission())
            {
                return(false);
            }
            TowerQuestMissionTypeAttribute missionTypeAttribute1 = this.GetTowerQuestMissionTypeAttribute(this.Type);

            if (missionTypeAttribute1 == null)
            {
                DebugUtility.LogError(string.Format("塔ではサポートされていないミッションです。⇒ type : {0}", (object)this.Type));
                return(false);
            }
            QuestMissionTypeAttribute missionTypeAttribute2 = this.GetQuestMissionTypeAttribute(this.Type);
            string empty = string.Empty;
            int    num   = 0;

            if (missionTypeAttribute2.ValueType == QuestMissionValueType.ValueIsInt)
            {
                this.TryGetIntValue(ref num);
            }
            else if (missionTypeAttribute2.ValueType == QuestMissionValueType.ValueIsKeyAndIntValue)
            {
                this.TryGetKeyValue(ref empty, ref num);
            }
            switch (missionTypeAttribute1.ProgressJudgeType)
            {
            case QuestMissionProgressJudgeType.GreatorEqual:
                return(missions_val >= num);

            case QuestMissionProgressJudgeType.Greator:
                return(missions_val > num);

            case QuestMissionProgressJudgeType.LessEqual:
                return(missions_val <= num);

            case QuestMissionProgressJudgeType.Less:
                return(missions_val < num);

            case QuestMissionProgressJudgeType.Equal:
                return(missions_val == num);

            case QuestMissionProgressJudgeType.EqualZero:
                return(missions_val == 0);

            default:
                return(false);
            }
        }