Пример #1
0
 private void Start()
 {
     if (Object.op_Equality((Object)this.mCardObjectTemplate, (Object)null) && Object.op_Equality((Object)this.mCardObjectParent, (Object)null))
     {
         Debug.LogWarning((object)"mCardObject is null");
     }
     else
     {
         this.mCardObjectTemplate.SetActive(false);
         ConceptCardManager instance = ConceptCardManager.Instance;
         if (Object.op_Equality((Object)instance, (Object)null))
         {
             return;
         }
         using (List <ConceptCardData> .Enumerator enumerator = instance.SelectedMaterials.GetList().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ConceptCardData current = enumerator.Current;
                 if (current.Param.not_sale)
                 {
                     GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.mCardObjectTemplate);
                     gameObject.get_transform().SetParent((Transform)this.mCardObjectParent, false);
                     ConceptCardIcon component = (ConceptCardIcon)gameObject.GetComponent <ConceptCardIcon>();
                     if (Object.op_Inequality((Object)component, (Object)null))
                     {
                         component.Setup(current);
                     }
                     gameObject.SetActive(true);
                 }
             }
         }
     }
 }
 private void Refresh()
 {
     if (this.m_Data == null)
     {
         DebugUtility.LogError("真理念装のデータがセットされていません");
     }
     else
     {
         ConceptCardIcon component = (ConceptCardIcon)this.Icon.GetComponent <ConceptCardIcon>();
         if (Object.op_Inequality((Object)component, (Object)null))
         {
             component.Setup(this.m_Data);
         }
         if (Object.op_Inequality((Object)this.NameText, (Object)null))
         {
             this.NameText.set_text(this.m_Data.Param.name);
         }
         if (Object.op_Inequality((Object)this.ExprText, (Object)null))
         {
             this.ExprText.set_text(this.m_Data.Param.expr);
         }
         if (!Object.op_Inequality((Object)this.FlavorText, (Object)null))
         {
             return;
         }
         this.FlavorText.set_text(this.m_Data.Param.GetLocalizedTextFlavor());
     }
 }
Пример #3
0
        public virtual void AddExpPlayer()
        {
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UnitExpText, (UnityEngine.Object)null))
            {
                this.UnitExpText.AddComponent <QuestResult.CampaignPartyExp>();
            }
            Transform transform = !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UnitList, (UnityEngine.Object)null) ? this.UnitListItem.get_transform().get_parent() : this.UnitList.get_transform();

            for (int index = 0; index < this.mUnits.Count; ++index)
            {
                GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.UnitListItem);
                gameObject.get_transform().SetParent(transform, false);
                QuestResult.CampaignPartyExp componentInChildren = (QuestResult.CampaignPartyExp)gameObject.GetComponentInChildren <QuestResult.CampaignPartyExp>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren, (UnityEngine.Object)null))
                {
                    componentInChildren.Exp = this.AcquiredUnitExp[index];
                }
                ConceptCardIcon component = (ConceptCardIcon)gameObject.GetComponent <ConceptCardIcon>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    component.Setup(this.mUnits[index].ConceptCard);
                }
                this.mUnitListItems.Add(gameObject);
                DataSource.Bind <UnitData>(gameObject, this.mUnits[index]);
                gameObject.SetActive(true);
            }
        }
Пример #4
0
        private GameObject SetConceptCard(string _iname)
        {
            GameObject gameObject = (GameObject)null;

            if (MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardParam(_iname) == null)
            {
                DebugUtility.LogError("真理念装 INAME:" + _iname + "は存在しません");
                return((GameObject)null);
            }
            if (Object.op_Inequality((Object)this.ConceptCardTemplate, (Object)null))
            {
                gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ConceptCardTemplate);
                if (Object.op_Inequality((Object)gameObject, (Object)null))
                {
                    gameObject.get_transform().SetParent(this.ConceptCardTemplate.get_transform().get_parent(), false);
                    gameObject.SetActive(true);
                    ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(_iname);
                    if (cardDataForDisplay != null)
                    {
                        ConceptCardIcon component = (ConceptCardIcon)gameObject.GetComponent <ConceptCardIcon>();
                        if (Object.op_Inequality((Object)component, (Object)null))
                        {
                            component.Setup(cardDataForDisplay);
                        }
                    }
                    this.SetAnimatorTrigger(gameObject, "on");
                }
            }
            return(gameObject);
        }
Пример #5
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());
     }
 }
Пример #6
0
        private void RefreshIcons(MultiConceptCard drawicons, MultiConceptCard materials)
        {
            if (drawicons == null)
            {
                return;
            }
            ConceptCardManager ccManager = this.CCManager;
            bool AcceptableExp           = true;
            bool AcceptableTrust         = true;
            bool flag = true;

            if (this.mListType == ConceptCardList.ListType.ENHANCE && ccManager.SelectedConceptCardData != null)
            {
                int mixTotalExp;
                int mixTrustExp;
                int mixTotalAwakeLv;
                ConceptCardManager.CalcTotalExpTrust(ccManager.SelectedConceptCardData, materials, out mixTotalExp, out mixTrustExp, out mixTotalAwakeLv);
                AcceptableExp   = mixTotalExp < ccManager.SelectedConceptCardData.GetExpToLevelMax();
                AcceptableTrust = mixTrustExp < ccManager.SelectedConceptCardData.GetTrustToLevelMax();
                if (ccManager.SelectedConceptCardData.GetReward() == null)
                {
                    AcceptableTrust = false;
                }
                if ((int)ccManager.SelectedConceptCardData.AwakeCount >= ccManager.SelectedConceptCardData.AwakeCountCap)
                {
                    flag = false;
                }
            }
            for (int index1 = 0; index1 < this.mCardIcons.Count; ++index1)
            {
                int index2 = this.mPage * this.mPageSize + index1;
                this.mCardIcons[index1].SetActive(true);
                ConceptCardIcon component1 = (ConceptCardIcon)this.mCardIcons[index1].GetComponent <ConceptCardIcon>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
                {
                    component1.Setup(drawicons.GetItem(index2));
                }
                if (0 <= index2 && index2 < drawicons.Count)
                {
                    ConceptCardIconMultiSelect component2 = (ConceptCardIconMultiSelect)this.mCardIcons[index1].GetComponent <ConceptCardIconMultiSelect>();
                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component2, (UnityEngine.Object)null))
                    {
                        bool CanAwake = true;
                        if (this.mListType == ConceptCardList.ListType.ENHANCE && ccManager.SelectedConceptCardData != null)
                        {
                            CanAwake = flag && ccManager.SelectedConceptCardData.Param.iname == component2.ConceptCard.Param.iname;
                        }
                        this.RefreshSelectParam(component2, materials);
                        this.RefreshEnableParam(component2, materials, AcceptableExp, AcceptableTrust, CanAwake);
                    }
                }
            }
        }
Пример #7
0
        private void OnListItemSelect(GameObject go)
        {
            ConceptCardIcon componentInChildren = (ConceptCardIcon)go.GetComponentInChildren <ConceptCardIcon>();

            if (!Object.op_Inequality((Object)componentInChildren, (Object)null) || componentInChildren.ConceptCard == null)
            {
                return;
            }
            GlobalVars.SelectedConceptCardData.Set(componentInChildren.ConceptCard);
            GetConceptCardListWindow.SetSelectedConceptCard(componentInChildren.ConceptCard);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
        }
Пример #8
0
 private void Start()
 {
     if (Object.op_Equality((Object)this.mCardObjectTemplate, (Object)null) && Object.op_Equality((Object)this.mCardObjectParent, (Object)null))
     {
         Debug.LogWarning((object)"mCardObject is null");
     }
     else
     {
         this.mCardObjectTemplate.SetActive(false);
         ConceptCardManager instance = ConceptCardManager.Instance;
         if (Object.op_Equality((Object)instance, (Object)null))
         {
             return;
         }
         this.mLText.set_text(string.Format(LocalizedText.Get(this.mLText.get_text()), (object)instance.CostConceptCardRare.ToString()));
         if (instance.IsDetailActive)
         {
             this.mButtonEnhance.SetActive(true);
             this.mButtonSell.SetActive(false);
         }
         else if (instance.IsSellListActive)
         {
             this.mButtonEnhance.SetActive(false);
             this.mButtonSell.SetActive(true);
         }
         else
         {
             Debug.LogWarning((object)"Must be from Sell or Enhance");
             return;
         }
         using (List <ConceptCardData> .Enumerator enumerator = instance.SelectedMaterials.GetList().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ConceptCardData current = enumerator.Current;
                 if ((int)current.Rarity + 1 >= instance.CostConceptCardRare)
                 {
                     GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.mCardObjectTemplate);
                     gameObject.get_transform().SetParent((Transform)this.mCardObjectParent, false);
                     ConceptCardIcon component = (ConceptCardIcon)gameObject.GetComponent <ConceptCardIcon>();
                     if (Object.op_Inequality((Object)component, (Object)null))
                     {
                         component.Setup(current);
                     }
                     gameObject.SetActive(true);
                 }
             }
         }
     }
 }
Пример #9
0
        private void OnItemDetail(GameObject go)
        {
            ConceptCardIcon component = (ConceptCardIcon)go.GetComponent <ConceptCardIcon>();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)component, (UnityEngine.Object)null))
            {
                return;
            }
            ConceptCardData conceptCard = component.ConceptCard;

            if (conceptCard == null)
            {
                return;
            }
            this.CCManager.SelectedConceptCardData = conceptCard;
        }
        private void Start()
        {
            if (FlowNode_ButtonEvent.currentValue == null)
            {
                return;
            }
            SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;

            if (currentValue == null)
            {
                return;
            }
            ConceptCardIcon component = currentValue.GetComponent <ConceptCardIcon>("_self");

            if (Object.op_Equality((Object)component, (Object)null))
            {
                return;
            }
            this.mConceptCardData = component.ConceptCard;
            if (this.mConceptCardData == null)
            {
                return;
            }
            if (Object.op_Inequality((Object)this.mIllustImage, (Object)null))
            {
                string path = AssetPath.ConceptCard(this.mConceptCardData.Param);
                if (((Object)this.mIllustImage.get_mainTexture()).get_name() != Path.GetFileName(path))
                {
                    MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.mIllustImage, path);
                }
            }
            if (Object.op_Inequality((Object)this.mIllustFrame, (Object)null))
            {
                this.mIllustFrame.ImageIndex = Mathf.Min(Mathf.Max((int)this.mConceptCardData.Rarity, 0), this.mIllustFrame.Images.Length - 1);
            }
            this.SetText(this.mCardNameText, this.mConceptCardData.Param.name);
            this.SetFlavorTextText();
            if (Object.op_Inequality((Object)this.mStarGauge, (Object)null))
            {
                this.mStarGauge.Max   = (int)this.mConceptCardData.Rarity + 1;
                this.mStarGauge.Value = (int)this.mConceptCardData.Rarity + 1;
            }
            foreach (Scrollbar componentsInChild in (Scrollbar[])((Component)this).GetComponentsInChildren <Scrollbar>())
            {
                componentsInChild.set_value(1f);
            }
        }
Пример #11
0
 public void SetupConceptCard(ConceptCardData conceptCardData)
 {
     this.mConceptCardData = conceptCardData;
     if (Object.op_Equality((Object)this.ConceptCard, (Object)null))
     {
         DebugUtility.LogError("ConceptCard == null");
     }
     else
     {
         ConceptCardIcon componentInChildren = (ConceptCardIcon)this.ConceptCard.GetComponentInChildren <ConceptCardIcon>();
         if (!Object.op_Inequality((Object)componentInChildren, (Object)null))
         {
             return;
         }
         componentInChildren.Setup(conceptCardData);
     }
 }
Пример #12
0
        private void LateUpdate()
        {
            if (!this.mIsInitialized || !this.mIsChangeRectSize)
            {
                return;
            }
            this.mLastPage = this.CalcLastPage();
            int num = -1;

            if (this.mIsKeepCurrentPage)
            {
                this.mCurrentPage = Mathf.Min(this.mCurrentPage, this.LastPage);
            }
            else
            {
                num = this.GetCardPage(this.mReservedSelectConceptCardData);
                if (num >= 0)
                {
                    this.mCurrentPage = num;
                }
            }
            this.CreateIcon();
            this.RefreshNoEquipButtonObject();
            this.RefreshFirstIconIndex();
            this.RefreshIcon();
            this.mIsChangeRectSize = false;
            if (num < 0)
            {
                return;
            }
            ConceptCardIcon selected_icon = this.mCardIcons.Find((Predicate <ConceptCardIcon>)(card =>
            {
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)card, (UnityEngine.Object)null) && card.ConceptCard != null)
                {
                    return((long)card.ConceptCard.UniqueID == (long)this.mReservedSelectConceptCardData.UniqueID);
                }
                return(false);
            }));

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)selected_icon, (UnityEngine.Object)null))
            {
                this.SelectCardIcon(selected_icon);
            }
            this.mReservedSelectConceptCardData = (ConceptCardData)null;
        }
Пример #13
0
        private void OnItemSelect(GameObject go)
        {
            ConceptCardIcon component = (ConceptCardIcon)go.GetComponent <ConceptCardIcon>();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)component, (UnityEngine.Object)null))
            {
                return;
            }
            ConceptCardData conceptCard = component.ConceptCard;

            if (conceptCard == null || !this.mSelectedMaterials.IsSelected(conceptCard) && this.mSelectedMaterials.Count >= this.MAX_MULTI_SELECT)
            {
                return;
            }
            this.mSelectedMaterials.Flip(conceptCard);
            this.RefreshSelectParam((ConceptCardIconMultiSelect)go.GetComponent <ConceptCardIconMultiSelect>(), this.mSelectedMaterials);
            this.RefreshIconList(false);
        }
Пример #14
0
        private void SelectCardIcon()
        {
            SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;

            if (currentValue == null)
            {
                return;
            }
            ConceptCardIcon component = currentValue.GetComponent <ConceptCardIcon>("_self");

            this.mConceptCardEquipList.SelectCardIcon(component);
            this.SetActiveParamViewObject(Object.op_Equality((Object)component, (Object)null));
            this.mSelectedCardData = !Object.op_Inequality((Object)component, (Object)null) ? (ConceptCardData)null : component.ConceptCard;
            if (this.mSelectedCardData == null || this.mSelectedUnit == null)
            {
                return;
            }
            this.SetParam(this.mSelectedCardData, this.mSelectedUnit, this.mSelectedUnit.JobIndex);
        }
Пример #15
0
        private void RefreshSlots(GenericSlot slot, ConceptCardIcon icon, ConceptCardData card, bool is_locked, bool enable)
        {
            if (Object.op_Equality((Object)slot, (Object)null) || Object.op_Equality((Object)icon, (Object)null))
            {
                return;
            }
            slot.SetLocked(is_locked);
            slot.SetSlotData <ConceptCardData>(card);
            icon.Setup(card);
            SRPG_Button componentInChildren = (SRPG_Button)((Component)slot).get_gameObject().GetComponentInChildren <SRPG_Button>();

            if (!Object.op_Inequality((Object)componentInChildren, (Object)null))
            {
                return;
            }
            ((Behaviour)componentInChildren).set_enabled(enable);
            ((UnityEventBase)componentInChildren.get_onClick()).RemoveAllListeners();
            // ISSUE: method pointer
            ((UnityEvent)componentInChildren.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnEquipCardSlot)));
        }
Пример #16
0
 public void SelectCardIcon(ConceptCardIcon selected_icon)
 {
     this.ResetSelectCardAnimation();
     if (UnityEngine.Object.op_Equality((UnityEngine.Object)selected_icon, (UnityEngine.Object)null))
     {
         this.mSelectedConceptCardData = (ConceptCardData)null;
         ConceptCardEquipWindow.Instance.SetSelectedCardIcon((ConceptCardIcon)null);
     }
     else
     {
         this.mSelectedConceptCardData = selected_icon.ConceptCard;
         ConceptCardEquipWindow.Instance.SetSelectedCardIcon(selected_icon);
         Animator component = (Animator)((Component)selected_icon).GetComponent <Animator>();
         if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
         {
             return;
         }
         component.SetInteger("st", 1);
     }
 }
Пример #17
0
        private GameObject CreateListItem(ConceptCardData data)
        {
            GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.m_ListItemTemplate);

            gameObject.get_transform().SetParent((Transform)this.m_ContentRoot, false);
            gameObject.SetActive(true);
            ConceptCardIcon componentInChildren1 = (ConceptCardIcon)gameObject.GetComponentInChildren <ConceptCardIcon>();

            if (Object.op_Inequality((Object)componentInChildren1, (Object)null))
            {
                componentInChildren1.Setup(data);
            }
            ListItemEvents componentInChildren2 = (ListItemEvents)gameObject.GetComponentInChildren <ListItemEvents>();

            if (Object.op_Inequality((Object)componentInChildren2, (Object)null))
            {
                componentInChildren2.OnSelect += new ListItemEvents.ListItemEvent(this.OnListItemSelect);
            }
            return(gameObject);
        }
Пример #18
0
        private void CreateMakeCardIcon()
        {
            if (Object.op_Equality((Object)this.ListParent, (Object)null) || Object.op_Equality((Object)this.ListItemTemplate, (Object)null))
            {
                return;
            }
            this.ListItemTemplate.SetActive(false);
            ConceptCardManager instance = ConceptCardManager.Instance;

            if (Object.op_Equality((Object)instance, (Object)null) || instance.BulkSelectedMaterialList.Count == 0)
            {
                return;
            }
            for (int index = 0; index < instance.BulkSelectedMaterialList.Count; ++index)
            {
                ConceptCardData mSelectedData = instance.BulkSelectedMaterialList[index].mSelectedData;
                if (mSelectedData != null)
                {
                    GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ListItemTemplate);
                    gameObject.SetActive(true);
                    gameObject.get_transform().SetParent((Transform)this.ListParent, false);
                    ConceptCardIcon component = (ConceptCardIcon)gameObject.GetComponent <ConceptCardIcon>();
                    if (Object.op_Equality((Object)component, (Object)null))
                    {
                        return;
                    }
                    component.Setup(mSelectedData);
                    this.mConceptCardIcon.Add(component);
                    this.mSelectedCard.Add(mSelectedData.Param.iname, instance.BulkSelectedMaterialList[index].mSelectNum);
                }
            }
            using (List <ConceptCardIcon> .Enumerator enumerator = this.mConceptCardIcon.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ConceptCardIcon current = enumerator.Current;
                    int             num     = this.mSelectedCard[current.ConceptCard.Param.iname];
                    current.SetCardNum(num);
                }
            }
        }
Пример #19
0
        private void SelectedCardIconActive()
        {
            if (this.mSelectedConceptCardData == null)
            {
                return;
            }
            ConceptCardIcon selected_icon = this.mCardIcons.Find((Predicate <ConceptCardIcon>)(card =>
            {
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)card, (UnityEngine.Object)null) && card.ConceptCard != null)
                {
                    return((long)card.ConceptCard.UniqueID == (long)this.mSelectedConceptCardData.UniqueID);
                }
                return(false);
            }));

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)selected_icon, (UnityEngine.Object)null))
            {
                return;
            }
            this.SelectCardIcon(selected_icon);
        }
        private void RefreshResult(GachaDropData[] _drops, GameObject _block, int _block_type, bool _is_anim = false)
        {
            if (_drops == null || _drops.Length < 0 || UnityEngine.Object.op_Equality((UnityEngine.Object)_block, (UnityEngine.Object)null))
            {
                return;
            }
            _block.SetActive(true);
            int length = _drops.Length;
            SerializeValueBehaviour component1 = (SerializeValueBehaviour)_block.GetComponent <SerializeValueBehaviour>();

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
            {
                GameObject gameObject1 = component1.list.GetGameObject("icon");
                gameObject1.SetActive(false);
                for (int index1 = 0; index1 < length; ++index1)
                {
                    GachaDropData drop = _drops[index1];
                    int           num  = index1;
                    GachaResultThumbnailWindow.GachaResultType gachaResultType = GachaResultThumbnailWindow.GachaResultType.None;
                    if (drop != null)
                    {
                        GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)gameObject1);
                        gameObject2.get_transform().SetParent(gameObject1.get_transform().get_parent(), false);
                        ((Behaviour)gameObject2.GetComponent <Animator>()).set_enabled(_is_anim);
                        SerializeValueBehaviour component2 = (SerializeValueBehaviour)gameObject2.GetComponent <SerializeValueBehaviour>();
                        if (!UnityEngine.Object.op_Equality((UnityEngine.Object)component2, (UnityEngine.Object)null))
                        {
                            GameObject gameObject3 = (GameObject)null;
                            if (drop.type == GachaDropData.Type.Unit)
                            {
                                gameObject3 = component2.list.GetGameObject("unit");
                                DataSource.Bind <UnitData>(gameObject3, this.CreateUnitData(drop.unit));
                                gachaResultType = GachaResultThumbnailWindow.GachaResultType.Unit;
                            }
                            else if (drop.type == GachaDropData.Type.Item)
                            {
                                gameObject3 = component2.list.GetGameObject("item");
                                DataSource.Bind <ItemData>(gameObject3, this.CreateItemData(drop.item, drop.num));
                                ItemIcon component3 = (ItemIcon)gameObject3.GetComponent <ItemIcon>();
                                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component3, (UnityEngine.Object)null))
                                {
                                    component3.UpdateValue();
                                }
                                gachaResultType = !string.IsNullOrEmpty(drop.item.Flavor) ? GachaResultThumbnailWindow.GachaResultType.Item : GachaResultThumbnailWindow.GachaResultType.Piece;
                            }
                            else if (drop.type == GachaDropData.Type.Artifact)
                            {
                                gameObject3 = component2.list.GetGameObject("artifact");
                                DataSource.Bind <ArtifactData>(gameObject3, this.CreateArtifactData(drop.artifact, drop.Rare));
                                gachaResultType = GachaResultThumbnailWindow.GachaResultType.Artifact;
                            }
                            else if (drop.type == GachaDropData.Type.ConceptCard)
                            {
                                gameObject3 = component2.list.GetGameObject("conceptcard");
                                ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(drop.conceptcard.iname);
                                ConceptCardIcon component3         = (ConceptCardIcon)gameObject3.GetComponent <ConceptCardIcon>();
                                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component3, (UnityEngine.Object)null))
                                {
                                    component3.Setup(cardDataForDisplay);
                                    SerializeValueBehaviour component4 = (SerializeValueBehaviour)gameObject3.GetComponent <SerializeValueBehaviour>();
                                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component4, (UnityEngine.Object)null))
                                    {
                                        GameObject gameObject4 = component4.list.GetGameObject("unit_icon");
                                        if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject4, (UnityEngine.Object)null))
                                        {
                                            UnitData data = (UnitData)null;
                                            if (drop.cardunit != null)
                                            {
                                                data = this.CreateUnitData(drop.cardunit);
                                            }
                                            DataSource.Bind <UnitData>(gameObject4, data);
                                            gameObject4.SetActive(drop.cardunit != null);
                                        }
                                        GameObject gameObject5 = component4.list.GetGameObject("skin");
                                        if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject5, (UnityEngine.Object)null))
                                        {
                                            bool flag = false;
                                            if (drop.conceptcard.effects != null && drop.conceptcard.effects.Length > 0)
                                            {
                                                for (int index2 = 0; index2 < drop.conceptcard.effects.Length; ++index2)
                                                {
                                                    ConceptCardEffectsParam effect = drop.conceptcard.effects[index2];
                                                    if (effect != null && !string.IsNullOrEmpty(effect.skin))
                                                    {
                                                        flag = true;
                                                        break;
                                                    }
                                                }
                                            }
                                            gameObject5.SetActive(flag);
                                        }
                                    }
                                }
                                gachaResultType = GachaResultThumbnailWindow.GachaResultType.ConceptCard;
                            }
                            if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject3, (UnityEngine.Object)null))
                            {
                                DebugUtility.LogError("アイコンオブジェクトがありません");
                                break;
                            }
                            SerializeValueBehaviour component5 = (SerializeValueBehaviour)gameObject3.GetComponent <SerializeValueBehaviour>();
                            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component5, (UnityEngine.Object)null))
                            {
                                GameObject gameObject4 = component5.list.GetGameObject("new");
                                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component5, (UnityEngine.Object)null))
                                {
                                    gameObject4.SetActive(drop.isNew);
                                }
                            }
                            ButtonEvent component6 = (ButtonEvent)gameObject3.GetComponent <ButtonEvent>();
                            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component6, (UnityEngine.Object)null))
                            {
                                ButtonEvent.Event @event = component6.GetEvent("CLICK_ICON");
                                if (@event != null)
                                {
                                    @event.valueList.SetField("index", num);
                                    @event.valueList.SetField("type", (int)gachaResultType);
                                    @event.valueList.SetField("block", _block_type);
                                    if (gachaResultType == GachaResultThumbnailWindow.GachaResultType.ConceptCard)
                                    {
                                        @event.valueList.SetField("is_first_get_unit", drop.cardunit != null);
                                    }
                                }
                            }
                            gameObject3.SetActive(true);
                            this.m_ResultIconRootList.Add(gameObject2);
                            if (_block_type == 0)
                            {
                                this.m_ResultIconRootList.Add(gameObject2);
                            }
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
            SerializeValueBehaviour component7 = (SerializeValueBehaviour)((Component)this).get_gameObject().GetComponent <SerializeValueBehaviour>();

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component7, (UnityEngine.Object)null))
            {
                return;
            }
            GameObject gameObject = component7.list.GetGameObject("space");

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null))
            {
                return;
            }
            gameObject.get_transform().SetAsLastSibling();
            gameObject.SetActive(length > GachaResultThumbnailWindow.VIEW_COUNT);
        }
Пример #21
0
 public void SetSelectedCardIcon(ConceptCardIcon card_icon)
 {
     this.mSelectedCardData = !Object.op_Inequality((Object)card_icon, (Object)null) ? (ConceptCardData)null : card_icon.ConceptCard;
 }
Пример #22
0
        private void Refresh()
        {
            GameUtility.DestroyGameObjects(this.mItems);
            this.mItems.Clear();
            ShopData shopData = MonoSingleton <GameManager> .Instance.Player.GetShopData(GlobalVars.ShopType);

            if (shopData == null || shopData.items.Count <= 0 || UnityEngine.Object.op_Equality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null))
            {
                return;
            }
            int       shopdata_index = GlobalVars.ShopBuyIndex;
            Transform parent         = !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemParent, (UnityEngine.Object)null) ? this.ItemTemplate.get_transform().get_parent() : this.ItemParent.get_transform();
            ShopItem  shopItem       = shopData.items.FirstOrDefault <ShopItem>((Func <ShopItem, bool>)(item => item.id == shopdata_index));
            List <Json_ShopItemDesc> jsonShopItemDescList = new List <Json_ShopItemDesc>();

            if (shopItem.IsArtifact)
            {
                jsonShopItemDescList.Add(new Json_ShopItemDesc()
                {
                    iname = shopItem.iname,
                    itype = ShopData.ShopItemType2String(shopItem.ShopItemType),
                    num   = shopItem.num
                });
            }
            else if (shopItem.children != null && shopItem.children.Length > 0)
            {
                jsonShopItemDescList.AddRange((IEnumerable <Json_ShopItemDesc>)shopItem.children);
            }
            if (jsonShopItemDescList.Count > 0)
            {
                for (int index = 0; index < jsonShopItemDescList.Count; ++index)
                {
                    Json_ShopItemDesc shop_item_desc = jsonShopItemDescList[index];
                    string            empty          = string.Empty;
                    GameObject        gameObject;
                    string            name;
                    if (shop_item_desc.IsArtifact)
                    {
                        ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(shop_item_desc.iname);

                        if (artifactParam != null)
                        {
                            gameObject = this.InstantiateItem <ArtifactParam>(this.ItemTemplate, parent, artifactParam);
                            name       = artifactParam.name;
                        }
                        else
                        {
                            continue;
                        }
                    }
                    else if (shop_item_desc.IsConceptCard)
                    {
                        ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(shop_item_desc.iname);
                        if (cardDataForDisplay != null)
                        {
                            gameObject = this.InstantiateItem <ConceptCardData>(this.ItemTemplate, parent, cardDataForDisplay);
                            ConceptCardIcon componentInChildren = (ConceptCardIcon)gameObject.GetComponentInChildren <ConceptCardIcon>();
                            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren, (UnityEngine.Object)null))
                            {
                                componentInChildren.Setup(cardDataForDisplay);
                            }
                            name = cardDataForDisplay.Param.name;
                        }
                        else
                        {
                            continue;
                        }
                    }
                    else
                    {
                        ItemData itemData = new ItemData();
                        if (itemData.Setup(0L, shop_item_desc.iname, shop_item_desc.num))
                        {
                            gameObject = this.InstantiateItem <ItemData>(this.ItemTemplate, parent, itemData);
                            name       = itemData.Param.name;
                        }
                        else
                        {
                            continue;
                        }
                    }
                    ShopGiftItem component = (ShopGiftItem)gameObject.GetComponent <ShopGiftItem>();
                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                    {
                        component.SetShopItemInfo(shop_item_desc, name, GlobalVars.ShopBuyAmount);
                    }
                }
            }
            GameParameter.UpdateAll(((Component)parent).get_gameObject());
        }
Пример #23
0
        private void Refresh()
        {
            GameUtility.DestroyGameObjects(this.mItems);
            this.mItems.Clear();
            Transform parent = !Object.op_Inequality((Object)this.ItemParent, (Object)null) ? this.ItemTemplate.get_transform().get_parent() : this.ItemParent.get_transform();

            if (GlobalVars.TimeOutShopItems != null && GlobalVars.TimeOutShopItems.Count > 0)
            {
                using (List <ShopItem> .Enumerator enumerator = GlobalVars.TimeOutShopItems.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ShopItem   current = enumerator.Current;
                        string     empty   = string.Empty;
                        GameObject gameObject;
                        string     name;
                        if (current.IsArtifact)
                        {
                            ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(current.iname);

                            if (artifactParam != null)
                            {
                                gameObject = this.InstantiateItem <ArtifactParam>(this.ItemTemplate, parent, artifactParam);
                                name       = artifactParam.name;
                            }
                            else
                            {
                                continue;
                            }
                        }
                        else if (current.IsConceptCard)
                        {
                            ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(current.iname);
                            if (cardDataForDisplay != null)
                            {
                                gameObject = this.InstantiateItem <ConceptCardData>(this.ItemTemplate, parent, cardDataForDisplay);
                                ConceptCardIcon componentInChildren = (ConceptCardIcon)gameObject.GetComponentInChildren <ConceptCardIcon>();
                                if (Object.op_Inequality((Object)componentInChildren, (Object)null))
                                {
                                    componentInChildren.Setup(cardDataForDisplay);
                                }
                                name = cardDataForDisplay.Param.name;
                            }
                            else
                            {
                                continue;
                            }
                        }
                        else
                        {
                            ItemData itemData = new ItemData();
                            if (itemData.Setup(0L, current.iname, current.num))
                            {
                                gameObject = this.InstantiateItem <ItemData>(this.ItemTemplate, parent, itemData);
                                name       = itemData.Param.name;
                            }
                            else
                            {
                                continue;
                            }
                        }
                        ShopTimeOutItem component = (ShopTimeOutItem)gameObject.GetComponent <ShopTimeOutItem>();
                        if (Object.op_Inequality((Object)component, (Object)null))
                        {
                            component.SetShopItemInfo(current, name);
                        }
                    }
                }
            }
            GameParameter.UpdateAll(((Component)parent).get_gameObject());
        }
Пример #24
0
        private void RefreshQuestMissionReward(QuestParam questParam)
        {
            if (questParam.bonusObjective == null)
            {
                return;
            }
            for (int index = 0; index < questParam.bonusObjective.Length; ++index)
            {
                QuestBonusObjective questBonusObjective = questParam.bonusObjective[index];
                QuestMissionItem    questMissionItem;
                if (questBonusObjective.itemType == RewardType.Artifact)
                {
                    questMissionItem = (QuestMissionItem)((GameObject)Object.Instantiate <GameObject>((M0)((Component)this.ArtifactTemplate).get_gameObject())).GetComponent <QuestMissionItem>();
                }
                else if (questBonusObjective.itemType == RewardType.ConceptCard)
                {
                    questMissionItem = (QuestMissionItem)((GameObject)Object.Instantiate <GameObject>((M0)((Component)this.ConceptCardTemplate).get_gameObject())).GetComponent <QuestMissionItem>();
                    ConceptCardIcon component = (ConceptCardIcon)((Component)questMissionItem).get_gameObject().GetComponent <ConceptCardIcon>();
                    if (Object.op_Inequality((Object)component, (Object)null))
                    {
                        ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(questBonusObjective.item);
                        component.Setup(cardDataForDisplay);
                    }
                }
                else if (questBonusObjective.itemType == RewardType.Nothing)
                {
                    questMissionItem = (QuestMissionItem)((GameObject)Object.Instantiate <GameObject>((M0)((Component)this.NothingRewardTemplate).get_gameObject())).GetComponent <QuestMissionItem>();
                }
                else
                {
                    ItemParam itemParam = MonoSingleton <GameManager> .Instance.GetItemParam(questBonusObjective.item);

                    if (itemParam != null)
                    {
                        questMissionItem = itemParam.type != EItemType.Unit ? (QuestMissionItem)((GameObject)Object.Instantiate <GameObject>((M0)((Component)this.ItemTemplate).get_gameObject())).GetComponent <QuestMissionItem>() : (QuestMissionItem)((GameObject)Object.Instantiate <GameObject>((M0)((Component)this.UnitTemplate).get_gameObject())).GetComponent <QuestMissionItem>();
                    }
                    else
                    {
                        continue;
                    }
                }
                if (!Object.op_Equality((Object)questMissionItem, (Object)null))
                {
                    if (Object.op_Inequality((Object)questMissionItem.Star, (Object)null))
                    {
                        questMissionItem.Star.Index = index;
                    }
                    if (Object.op_Inequality((Object)questMissionItem.FrameParam, (Object)null))
                    {
                        questMissionItem.FrameParam.Index = index;
                    }
                    if (Object.op_Inequality((Object)questMissionItem.IconParam, (Object)null))
                    {
                        questMissionItem.IconParam.Index = index;
                    }
                    if (Object.op_Inequality((Object)questMissionItem.NameParam, (Object)null))
                    {
                        questMissionItem.NameParam.Index = index;
                    }
                    if (Object.op_Inequality((Object)questMissionItem.AmountParam, (Object)null))
                    {
                        questMissionItem.AmountParam.Index = index;
                    }
                    if (Object.op_Inequality((Object)questMissionItem.ObjectigveParam, (Object)null))
                    {
                        questMissionItem.ObjectigveParam.Index = index;
                    }
                    Rect rect = (((Component)questMissionItem).get_transform() as RectTransform).get_rect();
                    // ISSUE: explicit reference operation
                    this.m_ItemHeight = ((Rect)@rect).get_height();
                    ((Component)questMissionItem).get_gameObject().SetActive(true);
                    ((Component)questMissionItem).get_transform().SetParent(this.ContentsParent.get_transform(), false);
                    this.allStarObjects.Add(((Component)questMissionItem.Star).get_gameObject());
                    GameParameter.UpdateAll(((Component)questMissionItem).get_gameObject());
                }
            }
            if (!Object.op_Inequality((Object)this.ScrollRect, (Object)null))
            {
                return;
            }
            this.ScrollRect.set_verticalNormalizedPosition(1f);
            this.ScrollRect.set_horizontalNormalizedPosition(1f);
        }
Пример #25
0
        private void Initalize()
        {
            GachaHistoryItemData dataOfClass = DataSource.FindDataOfClass <GachaHistoryItemData>(((Component)this).get_gameObject(), (GachaHistoryItemData)null);

            if (dataOfClass == null)
            {
                DebugUtility.LogError("履歴が存在しません");
            }
            else
            {
                for (int index = dataOfClass.historys.Length - 1; index >= 0; --index)
                {
                    GachaHistoryData history = dataOfClass.historys[index];
                    if (history != null)
                    {
                        GameObject gameObject1 = (GameObject)null;
                        bool       flag        = false;
                        if (history.type == GachaDropData.Type.Unit)
                        {
                            gameObject1 = (GameObject)Object.Instantiate <GameObject>((M0)this.UnitIconObj);
                            if (Object.op_Inequality((Object)gameObject1, (Object)null))
                            {
                                gameObject1.get_transform().SetParent(this.ListParent, false);
                                gameObject1.SetActive(true);
                                DataSource.Bind <UnitData>(gameObject1, GachaHistoryWindow.CreateUnitData(history.unit));
                                flag = history.isNew;
                                this.mItems.Add(gameObject1);
                                gameObject1.get_transform().SetAsFirstSibling();
                            }
                        }
                        else if (history.type == GachaDropData.Type.Item)
                        {
                            gameObject1 = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemIconObj);
                            if (Object.op_Inequality((Object)gameObject1, (Object)null))
                            {
                                gameObject1.get_transform().SetParent(this.ListParent, false);
                                gameObject1.SetActive(true);
                                DataSource.Bind <ItemData>(gameObject1, GachaHistoryWindow.CreateItemData(history.item, history.num));
                                flag = history.isNew;
                                this.mItems.Add(gameObject1);
                                gameObject1.get_transform().SetAsFirstSibling();
                            }
                        }
                        else if (history.type == GachaDropData.Type.Artifact)
                        {
                            gameObject1 = (GameObject)Object.Instantiate <GameObject>((M0)this.ArtifactIconObj);
                            if (Object.op_Inequality((Object)gameObject1, (Object)null))
                            {
                                gameObject1.get_transform().SetParent(this.ListParent, false);
                                gameObject1.SetActive(true);
                                DataSource.Bind <ArtifactData>(gameObject1, GachaHistoryWindow.CreateArtifactData(history.artifact, history.rarity));
                                flag = history.isNew;
                                this.mItems.Add(gameObject1);
                                gameObject1.get_transform().SetAsFirstSibling();
                            }
                        }
                        else if (history.type == GachaDropData.Type.ConceptCard)
                        {
                            gameObject1 = (GameObject)Object.Instantiate <GameObject>((M0)this.ConceptCardIconObj);
                            if (Object.op_Inequality((Object)gameObject1, (Object)null))
                            {
                                gameObject1.get_transform().SetParent(this.ListParent, false);
                                gameObject1.SetActive(true);
                                ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(history.conceptcard.iname);
                                ConceptCardIcon component          = (ConceptCardIcon)gameObject1.GetComponent <ConceptCardIcon>();
                                if (Object.op_Inequality((Object)component, (Object)null))
                                {
                                    component.Setup(cardDataForDisplay);
                                }
                                flag = history.isNew;
                                this.mItems.Add(gameObject1);
                                gameObject1.get_transform().SetAsFirstSibling();
                            }
                        }
                        if (Object.op_Inequality((Object)gameObject1, (Object)null))
                        {
                            SerializeValueBehaviour component = (SerializeValueBehaviour)gameObject1.GetComponent <SerializeValueBehaviour>();
                            if (Object.op_Inequality((Object)component, (Object)null))
                            {
                                GameObject gameObject2 = component.list.GetGameObject("new");
                                if (Object.op_Inequality((Object)gameObject2, (Object)null))
                                {
                                    gameObject2.SetActive(flag);
                                }
                            }
                        }
                    }
                }
                if (Object.op_Inequality((Object)this.TitleText, (Object)null))
                {
                    Text component = (Text)this.TitleText.GetComponent <Text>();
                    if (Object.op_Inequality((Object)component, (Object)null))
                    {
                        string str = LocalizedText.Get("sys.TEXT_GACHA_HISTORY_FOOTER", (object)dataOfClass.GetDropAt().ToString("yyyy/MM/dd HH:mm:ss"), (object)dataOfClass.gachaTitle);
                        component.set_text(str);
                    }
                }
                GameParameter.UpdateAll(((Component)this).get_gameObject());
            }
        }
Пример #26
0
        private void UpdateItems()
        {
            if (Object.op_Equality((Object)this.ItemTemplate, (Object)null) || this.mMailListItems == null)
            {
                return;
            }
            List <MailData> currentMails = MonoSingleton <GameManager> .Instance.Player.CurrentMails;

            if (this.mMailListItems.Count < currentMails.Count)
            {
                Transform transform = ((Component)this).get_transform();
                int       num       = currentMails.Count - this.mMailListItems.Count;
                for (int index = 0; index < num; ++index)
                {
                    GameObject listItem = this.CreateListItem();
                    listItem.get_transform().SetParent(transform, false);
                    this.mMailListItems.Add(listItem);
                }
            }
            for (int index1 = 0; index1 < this.mMailListItems.Count; ++index1)
            {
                GameObject mMailListItem = this.mMailListItems[index1];
                if (index1 >= currentMails.Count)
                {
                    mMailListItem.SetActive(false);
                }
                else
                {
                    mMailListItem.SetActive(true);
                    MailData data1 = currentMails[index1];
                    DataSource.Bind <MailData>(mMailListItem, data1);
                    DataSource.Bind <MailData>(((MailListItem)mMailListItem.GetComponent <MailListItem>()).Button, data1);
                    int num = 0;
                    for (int index2 = 0; index2 < data1.gifts.Length; ++index2)
                    {
                        if (data1.gifts[index2].giftTypes != 0L)
                        {
                            ++num;
                        }
                        if (num >= 2)
                        {
                            break;
                        }
                    }
                    if (num >= 2)
                    {
                        MailIcon component = (MailIcon)mMailListItem.GetComponent <MailIcon>();
                        if (Object.op_Inequality((Object)component, (Object)null))
                        {
                            if (Object.op_Inequality((Object)component.CurrentIcon, (Object)null))
                            {
                                component.CurrentIcon.SetActive(false);
                            }
                            component.CurrentIcon = component.SetIconTemplate;
                            component.CurrentIcon.SetActive(true);
                        }
                    }
                    else
                    {
                        MailIcon component1 = (MailIcon)mMailListItem.GetComponent <MailIcon>();
                        for (int index2 = 0; index2 < data1.gifts.Length; ++index2)
                        {
                            GiftData gift = data1.gifts[index2];
                            if (!gift.NotSet)
                            {
                                if (gift.CheckGiftTypeIncluded(GiftTypes.IgnoreReceiveAll | GiftTypes.Item))
                                {
                                    ItemData data2 = new ItemData();
                                    data2.Setup(0L, gift.iname, gift.num);
                                    DataSource.Bind <ItemData>(mMailListItem, data2);
                                    if (Object.op_Inequality((Object)component1, (Object)null))
                                    {
                                        if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                        {
                                            component1.CurrentIcon.SetActive(false);
                                        }
                                        component1.CurrentIcon = component1.ItemIconTemplate;
                                        component1.CurrentIcon.SetActive(true);
                                        break;
                                    }
                                    break;
                                }
                                if (gift.CheckGiftTypeIncluded(GiftTypes.Artifact))
                                {
                                    ArtifactData artifactData = gift.CreateArtifactData();
                                    if (artifactData != null)
                                    {
                                        DataSource.Bind <ArtifactData>(mMailListItem, artifactData);
                                    }
                                    if (Object.op_Inequality((Object)component1, (Object)null))
                                    {
                                        if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                        {
                                            component1.CurrentIcon.SetActive(false);
                                        }
                                        component1.CurrentIcon = component1.ArtifactIconTemplate;
                                        component1.CurrentIcon.SetActive(true);
                                        break;
                                    }
                                    break;
                                }
                                if (gift.CheckGiftTypeIncluded(GiftTypes.Award))
                                {
                                    AwardParam awardParam = MonoSingleton <GameManager> .Instance.GetAwardParam(gift.iname);

                                    ItemData data2 = new ItemData();
                                    data2.Setup(0L, awardParam.ToItemParam(), gift.num);
                                    DataSource.Bind <ItemData>(mMailListItem, data2);
                                    if (Object.op_Inequality((Object)component1, (Object)null))
                                    {
                                        if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                        {
                                            component1.CurrentIcon.SetActive(false);
                                        }
                                        component1.CurrentIcon = component1.ItemIconTemplate;
                                        component1.CurrentIcon.SetActive(true);
                                        break;
                                    }
                                    break;
                                }
                                if (gift.CheckGiftTypeIncluded(GiftTypes.Coin))
                                {
                                    if (Object.op_Inequality((Object)component1, (Object)null))
                                    {
                                        if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                        {
                                            component1.CurrentIcon.SetActive(false);
                                        }
                                        component1.CurrentIcon = component1.CoinIconTemplate;
                                        component1.CurrentIcon.SetActive(true);
                                        break;
                                    }
                                    break;
                                }
                                if (gift.CheckGiftTypeIncluded(GiftTypes.Gold))
                                {
                                    if (Object.op_Inequality((Object)component1, (Object)null))
                                    {
                                        if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                        {
                                            component1.CurrentIcon.SetActive(false);
                                        }
                                        component1.CurrentIcon = component1.GoldIconTemplate;
                                        component1.CurrentIcon.SetActive(true);
                                        break;
                                    }
                                    break;
                                }
                                if (gift.CheckGiftTypeIncluded(GiftTypes.ArenaCoin))
                                {
                                    if (Object.op_Inequality((Object)component1, (Object)null))
                                    {
                                        if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                        {
                                            component1.CurrentIcon.SetActive(false);
                                        }
                                        component1.CurrentIcon = component1.ArenaCoinIconTemplate;
                                        component1.CurrentIcon.SetActive(true);
                                    }
                                }
                                else
                                {
                                    if (gift.CheckGiftTypeIncluded(GiftTypes.MultiCoin))
                                    {
                                        if (Object.op_Inequality((Object)component1, (Object)null))
                                        {
                                            if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                            {
                                                component1.CurrentIcon.SetActive(false);
                                            }
                                            component1.CurrentIcon = component1.MultiCoinIconTemplate;
                                            component1.CurrentIcon.SetActive(true);
                                            break;
                                        }
                                        break;
                                    }
                                    if (gift.CheckGiftTypeIncluded(GiftTypes.KakeraCoin))
                                    {
                                        if (Object.op_Inequality((Object)component1, (Object)null))
                                        {
                                            if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                            {
                                                component1.CurrentIcon.SetActive(false);
                                            }
                                            component1.CurrentIcon = component1.KakeraCoinIconTemplate;
                                            component1.CurrentIcon.SetActive(true);
                                            break;
                                        }
                                        break;
                                    }
                                    if (gift.CheckGiftTypeIncluded(GiftTypes.ConceptCard))
                                    {
                                        if (Object.op_Inequality((Object)component1, (Object)null))
                                        {
                                            if (MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardParam(gift.ConceptCardIname) == null)
                                            {
                                                DebugUtility.LogError(string.Format("MasterParam.ConceptCardParamに「{0}」が存在しない", (object)gift.ConceptCardIname));
                                                break;
                                            }
                                            ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(gift.ConceptCardIname);
                                            if (Object.op_Inequality((Object)component1.CurrentIcon, (Object)null))
                                            {
                                                component1.CurrentIcon.SetActive(false);
                                            }
                                            component1.CurrentIcon = component1.ConceptCardIconTemplate;
                                            component1.CurrentIcon.SetActive(true);
                                            ConceptCardIcon component2 = (ConceptCardIcon)component1.CurrentIcon.GetComponent <ConceptCardIcon>();
                                            if (Object.op_Inequality((Object)component2, (Object)null))
                                            {
                                                component2.Setup(cardDataForDisplay);
                                                break;
                                            }
                                            break;
                                        }
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    MailListItem component3 = (MailListItem)mMailListItem.GetComponent <MailListItem>();
                    if (Object.op_Inequality((Object)component3, (Object)null))
                    {
                        component3.Set(data1.IsPeriod, data1.IsReadMail(), data1.post_at, data1.read);
                    }
                }
            }
            GameParameter.UpdateAll(((Component)this).get_gameObject());
        }
Пример #27
0
        private void RefreshRewardIcon(TrophyParam trophy)
        {
            bool      flag1  = false;
            bool      flag2  = false;
            bool      flag3  = false;
            bool      flag4  = false;
            string    str    = string.Empty;
            ItemParam data   = (ItemParam)null;
            bool      flag5  = false;
            string    format = "@{0}";

            if (trophy.Gold != 0)
            {
                flag3 = true;
                str   = string.Format(format, (object)trophy.Gold);
            }
            else if (trophy.Exp != 0)
            {
                flag2 = true;
                str   = string.Format(format, (object)trophy.Exp);
            }
            else if (trophy.Coin != 0)
            {
                flag1 = true;
                data  = MonoSingleton <GameManager> .Instance.GetItemParam("$COIN");

                str = string.Format(format, (object)trophy.Coin);
            }
            else if (trophy.Stamina != 0)
            {
                flag4 = true;
                str   = string.Format(format, (object)trophy.Stamina);
            }
            else if (trophy.Items != null && trophy.Items.Length > 0)
            {
                flag1 = true;
                data  = MonoSingleton <GameManager> .Instance.GetItemParam(trophy.Items[0].iname);

                if (data != null)
                {
                    str = string.Format(format, (object)trophy.Items[0].Num);
                }
            }
            else if (trophy.ConceptCards != null && trophy.ConceptCards.Length > 0)
            {
                flag5 = true;
                str   = string.Format(format, (object)trophy.ConceptCards[0].Num);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ImageItem, (UnityEngine.Object)null))
            {
                ((Component)this.ImageItem).get_gameObject().SetActive(flag1);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ImageExp, (UnityEngine.Object)null))
            {
                ((Component)this.ImageExp).get_gameObject().SetActive(flag2);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ImageGold, (UnityEngine.Object)null))
            {
                ((Component)this.ImageGold).get_gameObject().SetActive(flag3);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ImageAp, (UnityEngine.Object)null))
            {
                ((Component)this.ImageAp).get_gameObject().SetActive(flag4);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TextReward, (UnityEngine.Object)null))
            {
                this.TextReward.set_text(str);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ConceptCard, (UnityEngine.Object)null))
            {
                this.ConceptCard.SetActive(flag5);
            }
            if (flag5)
            {
                ConceptCardIcon component = (ConceptCardIcon)this.ConceptCard.GetComponent <ConceptCardIcon>();
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    return;
                }
                ConceptCardData card = new ConceptCardData();
                card.Deserialize(new JSON_ConceptCard()
                {
                    iid   = 1L,
                    iname = trophy.ConceptCards[0].iname,
                    exp   = 0,
                    trust = 0,
                    fav   = 0
                });
                component.Setup(card);
            }
            else
            {
                DataSource.Bind <ItemParam>(((Component)this).get_gameObject(), data);
            }
        }