Beispiel #1
0
        public static List <KeyValuePair <QuestParam, bool> > GetCollaboSkillQuests(UnitData unitData1, UnitData unitData2)
        {
            List <KeyValuePair <QuestParam, bool> > keyValuePairList = new List <KeyValuePair <QuestParam, bool> >();
            List <QuestParam> questList = CollaboSkillQuestList.GetCollaboSkillQuests(unitData1, unitData2);

            QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
            for (int i = 0; i < questList.Count; ++i)
            {
                bool   flag1 = questList[i].IsDateUnlock(-1L);
                bool   flag2 = Array.Find <QuestParam>(availableQuests, (Predicate <QuestParam>)(p => p == questList[i])) != null;
                bool   flag3 = questList[i].state == QuestStates.Cleared;
                string empty = string.Empty;
                if (questList[i].IsEntryQuestConditionCh(unitData1, ref empty) && (flag1 && flag2 && !flag3))
                {
                    KeyValuePair <QuestParam, bool> keyValuePair = new KeyValuePair <QuestParam, bool>(questList[i], true);
                    keyValuePairList.Add(keyValuePair);
                }
                else
                {
                    KeyValuePair <QuestParam, bool> keyValuePair = new KeyValuePair <QuestParam, bool>(questList[i], false);
                    keyValuePairList.Add(keyValuePair);
                }
            }
            return(keyValuePairList);
        }
Beispiel #2
0
        private void CreateStoryList()
        {
            if (Object.op_Equality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null))
            {
                return;
            }
            List <QuestParam> collaboSkillQuests = CollaboSkillQuestList.GetCollaboSkillQuests(this.CurrentUnit1, this.CurrentUnit2);

            if (collaboSkillQuests == null)
            {
                DebugUtility.LogError(string.Format("連携スキルクエストが見つかりません:{0} × {1}", (object)this.CurrentUnit1.UnitParam.iname, (object)this.CurrentUnit2.UnitParam.iname));
            }
            else
            {
                QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
                for (int index = 0; index < collaboSkillQuests.Count; ++index)
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: variable of a compiler-generated type
                    CollaboSkillQuestList.\u003CCreateStoryList\u003Ec__AnonStorey23F listCAnonStorey23F = new CollaboSkillQuestList.\u003CCreateStoryList\u003Ec__AnonStorey23F();
                    // ISSUE: reference to a compiler-generated field
                    listCAnonStorey23F.questParam = collaboSkillQuests[index];
                    // ISSUE: reference to a compiler-generated field
                    bool flag1 = listCAnonStorey23F.questParam.IsDateUnlock(-1L);
                    // ISSUE: reference to a compiler-generated method
                    bool flag2 = Array.Find <QuestParam>(availableQuests, new Predicate <QuestParam>(listCAnonStorey23F.\u003C\u003Em__258)) != null;
                    // ISSUE: reference to a compiler-generated field
                    bool       flag3 = listCAnonStorey23F.questParam.state == QuestStates.Cleared;
                    bool       flag4 = flag1 && flag2 && !flag3;
                    GameObject gameObject;
                    if (flag2 || flag3)
                    {
                        gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.StoryQuestItemTemplate);
                        ((Selectable)gameObject.GetComponent <Button>()).set_interactable(flag4);
                    }
                    else
                    {
                        gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.StoryQuestDisableItemTemplate);
                    }
                    gameObject.SetActive(true);
                    gameObject.get_transform().SetParent(this.QuestList, false);
                    // ISSUE: reference to a compiler-generated field
                    DataSource.Bind <QuestParam>(gameObject, listCAnonStorey23F.questParam);
                    CharacterQuestListItem component1 = (CharacterQuestListItem)gameObject.GetComponent <CharacterQuestListItem>();
                    if (Object.op_Inequality((Object)component1, (Object)null))
                    {
                        // ISSUE: reference to a compiler-generated field
                        component1.SetUp(this.CurrentUnit1, this.CurrentUnit2, listCAnonStorey23F.questParam);
                    }
                    ListItemEvents component2 = (ListItemEvents)gameObject.GetComponent <ListItemEvents>();
                    component2.OnSelect      = new ListItemEvents.ListItemEvent(this.OnQuestSelect);
                    component2.OnOpenDetail  = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail);
                    component2.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail);
                    this.mStoryQuestListItems.Add(gameObject);
                }
            }
        }
Beispiel #3
0
        public static QuestParam GetCollaboSkillQuest(UnitData unitData1, UnitData unitData2)
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return((QuestParam)null);
            }
            return(CollaboSkillQuestList.GetLearnSkillQuest(instanceDirect.MasterParam.GetCollaboSkillData(unitData1.UnitParam.iname), unitData2));
        }
        public static List <KeyValuePair <QuestParam, bool> > GetCollaboSkillQuests(UnitData unitData1, UnitData unitData2)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            CharacterQuestList.\u003CGetCollaboSkillQuests\u003Ec__AnonStorey237 questsCAnonStorey237 = new CharacterQuestList.\u003CGetCollaboSkillQuests\u003Ec__AnonStorey237();
            List <KeyValuePair <QuestParam, bool> > keyValuePairList = new List <KeyValuePair <QuestParam, bool> >();

            // ISSUE: reference to a compiler-generated field
            questsCAnonStorey237.questList = CollaboSkillQuestList.GetCollaboSkillQuests(unitData1, unitData2);
            QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            CharacterQuestList.\u003CGetCollaboSkillQuests\u003Ec__AnonStorey238 questsCAnonStorey238 = new CharacterQuestList.\u003CGetCollaboSkillQuests\u003Ec__AnonStorey238();
            // ISSUE: reference to a compiler-generated field
            questsCAnonStorey238.\u003C\u003Ef__ref\u0024567 = questsCAnonStorey237;
            // 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 (questsCAnonStorey238.i = 0; questsCAnonStorey238.i < questsCAnonStorey237.questList.Count; ++questsCAnonStorey238.i)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                bool flag1 = questsCAnonStorey237.questList[questsCAnonStorey238.i].IsDateUnlock(-1L);
                // ISSUE: reference to a compiler-generated method
                bool flag2 = Array.Find <QuestParam>(availableQuests, new Predicate <QuestParam>(questsCAnonStorey238.\u003C\u003Em__248)) != null;
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                bool   flag3 = questsCAnonStorey237.questList[questsCAnonStorey238.i].state == QuestStates.Cleared;
                string empty = string.Empty;
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                if (questsCAnonStorey237.questList[questsCAnonStorey238.i].IsEntryQuestConditionCh(unitData1, ref empty) && (flag1 && flag2 && !flag3))
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    KeyValuePair <QuestParam, bool> keyValuePair = new KeyValuePair <QuestParam, bool>(questsCAnonStorey237.questList[questsCAnonStorey238.i], true);
                    keyValuePairList.Add(keyValuePair);
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    KeyValuePair <QuestParam, bool> keyValuePair = new KeyValuePair <QuestParam, bool>(questsCAnonStorey237.questList[questsCAnonStorey238.i], false);
                    keyValuePairList.Add(keyValuePair);
                }
            }
            return(keyValuePairList);
        }
        private void CreateStoryList()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object)MonoSingleton <GameManager> .GetInstanceDirect(), (UnityEngine.Object)null))
            {
                return;
            }
            List <QuestParam> collaboSkillQuests = CollaboSkillQuestList.GetCollaboSkillQuests(this.CurrentUnit1, this.CurrentUnit2);

            if (collaboSkillQuests == null)
            {
                DebugUtility.LogError(string.Format("連携スキルクエストが見つかりません:{0} × {1}", (object)this.CurrentUnit1.UnitParam.iname, (object)this.CurrentUnit2.UnitParam.iname));
            }
            else
            {
                QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
                for (int index = 0; index < collaboSkillQuests.Count; ++index)
                {
                    QuestParam questParam = collaboSkillQuests[index];
                    bool       flag1      = questParam.IsDateUnlock(-1L);
                    bool       flag2      = Array.Find <QuestParam>(availableQuests, (Predicate <QuestParam>)(p => p == questParam)) != null;
                    bool       flag3      = questParam.state == QuestStates.Cleared;
                    bool       flag4      = flag1 && flag2 && !flag3;
                    GameObject gameObject;
                    if (flag2 || flag3)
                    {
                        gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.StoryQuestItemTemplate);
                        ((Selectable)gameObject.GetComponent <Button>()).set_interactable(flag4);
                    }
                    else
                    {
                        gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.StoryQuestDisableItemTemplate);
                    }
                    gameObject.SetActive(true);
                    gameObject.get_transform().SetParent(this.QuestList, false);
                    DataSource.Bind <QuestParam>(gameObject, questParam);
                    CharacterQuestListItem component1 = (CharacterQuestListItem)gameObject.GetComponent <CharacterQuestListItem>();
                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
                    {
                        component1.SetUp(this.CurrentUnit1, this.CurrentUnit2, questParam);
                    }
                    ListItemEvents component2 = (ListItemEvents)gameObject.GetComponent <ListItemEvents>();
                    component2.OnSelect      = new ListItemEvents.ListItemEvent(this.OnQuestSelect);
                    component2.OnOpenDetail  = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail);
                    component2.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail);
                    this.mStoryQuestListItems.Add(gameObject);
                }
            }
        }
        private void OnBack(GameObject go, bool visible)
        {
            if (visible)
            {
                return;
            }
            CollaboSkillQuestList componentInChildren = (CollaboSkillQuestList)this.Instance.GetComponentInChildren <CollaboSkillQuestList>();

            if (Object.op_Equality((Object)componentInChildren, (Object)null) || visible)
            {
                return;
            }
            ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).SetCollision(true);
            ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).OnWindowStateChange = (WindowController.WindowStateChangeEvent)null;
            Object.Destroy((Object)((Component)componentInChildren).get_gameObject());
        }
Beispiel #7
0
        public static List <QuestParam> GetCollaboSkillQuests(UnitData unitData1, UnitData unitData2)
        {
            List <QuestParam> questParamList = new List <QuestParam>();
            GameManager       instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return(questParamList);
            }
            QuestParam collaboSkillQuest = CollaboSkillQuestList.GetCollaboSkillQuest(unitData1, unitData2);

            if (collaboSkillQuest != null)
            {
                QuestParam[] quests = instanceDirect.Quests;
                for (int index = 0; index < quests.Length; ++index)
                {
                    if (quests[index].ChapterID == collaboSkillQuest.ChapterID)
                    {
                        questParamList.Add(quests[index]);
                    }
                }
            }
            return(questParamList);
        }
        protected override void OnInstanceCreate()
        {
            base.OnInstanceCreate();
            CollaboSkillQuestList componentInChildren = (CollaboSkillQuestList)this.Instance.GetComponentInChildren <CollaboSkillQuestList>();

            if (Object.op_Equality((Object)componentInChildren, (Object)null))
            {
                return;
            }
            CollaboSkillParam.Pair collaboSkillPair = GlobalVars.SelectedCollaboSkillPair;
            if (collaboSkillPair == null)
            {
                DebugUtility.LogError("CollaboSkillParam.Pair が セットされていない");
            }
            else
            {
                componentInChildren.CurrentUnit1 = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueParam(collaboSkillPair.UnitParam1);

                componentInChildren.CurrentUnit2 = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueParam(collaboSkillPair.UnitParam2);

                if (componentInChildren.CurrentUnit1 == null)
                {
                    DebugUtility.LogError("window.CurrentUnit1 == null");
                }
                else if (componentInChildren.CurrentUnit2 == null)
                {
                    DebugUtility.LogError("window.CurrentUnit2 == null");
                }
                else
                {
                    ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).SetCollision(false);
                    ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).OnWindowStateChange = new WindowController.WindowStateChangeEvent(this.OnBack);
                    WindowController.OpenIfAvailable((Component)componentInChildren);
                }
            }
        }