Exemple #1
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);
                }
            }
        }
        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);
                }
            }
        }