Пример #1
0
 private void CreateItems(QuestParam questParam)
 {
     if (questParam.bonusObjective == null)
     {
         return;
     }
     for (int index = 0; index < questParam.bonusObjective.Length; ++index)
     {
         QuestBonusObjective bonusObjective = questParam.bonusObjective[index];
         QuestMissionItem    rewardItem     = this.CreateRewardItem(bonusObjective);
         if (bonusObjective.itemType == RewardType.ConceptCard)
         {
             ConceptCardIcon componentInChildren = (ConceptCardIcon)((Component)rewardItem).get_gameObject().GetComponentInChildren <ConceptCardIcon>();
             if (UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren, (UnityEngine.Object)null))
             {
                 ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(bonusObjective.item);
                 componentInChildren.Setup(cardDataForDisplay);
             }
         }
         rewardItem.SetGameParameterIndex(index);
         this.m_ListItems.Add(new QuestDetail.ViewParam()
         {
             ListItem     = rewardItem,
             MissionIndex = index,
             IsAchieved   = questParam.IsMissionClear(index)
         });
         GameParameter.UpdateAll(((Component)rewardItem).get_gameObject());
     }
 }
 private void CreateResetMissionItems(QuestParam questParam)
 {
     this.DeleteMissionItems();
     if (questParam == null || questParam.bonusObjective == null || (Object.op_Equality((Object)this.m_MissionListParent, (Object)null) || Object.op_Equality((Object)this.m_MissionItemTemplate, (Object)null)))
     {
         return;
     }
     if (this.m_MissionListItems == null)
     {
         this.m_MissionListItems = new List <GameObject>();
     }
     DataSource.Bind <QuestParam>(((Component)this).get_gameObject(), questParam);
     for (int index = 0; index < questParam.bonusObjective.Length; ++index)
     {
         QuestBonusObjective bonusObjective = questParam.bonusObjective[index];
         if (!questParam.IsMissionClear(index) && bonusObjective.IsProgressMission())
         {
             QuestMissionItem missionItem = this.CreateMissionItem(bonusObjective);
             missionItem.SetGameParameterIndex(index);
             this.m_MissionListItems.Add(((Component)missionItem).get_gameObject());
             GameParameter.UpdateAll(((Component)missionItem).get_gameObject());
         }
     }
 }