Ejemplo n.º 1
0
        public override void UpdateValue()
        {
            ArtifactParam dataOfClass = DataSource.FindDataOfClass <ArtifactParam>(((Component)this).get_gameObject(), (ArtifactParam)null);

            if (dataOfClass == null)
            {
                return;
            }
            if (Object.op_Inequality((Object)this.Num, (Object)null))
            {
                this.Num.set_text(DataSource.FindDataOfClass <int>(((Component)this).get_gameObject(), 0).ToString());
            }
            if (!Object.op_Inequality((Object)this.HaveNum, (Object)null))
            {
                return;
            }
            int artifactNumByRarity = MonoSingleton <GameManager> .Instance.Player.GetArtifactNumByRarity(dataOfClass.iname, dataOfClass.rareini);

            if (artifactNumByRarity <= 0)
            {
                return;
            }
            this.HaveNum.set_text(LocalizedText.Get("sys.QUESTRESULT_REWARD_ITEM_HAVE", new object[1]
            {
                (object)artifactNumByRarity
            }));
        }
Ejemplo n.º 2
0
        private void AddArtifactContents(BundleParam.BundleItemInfo itemInfo)
        {
            GameObject gameObject = this.itemCount >= this.limited_shop_item_set_list.Count ? (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate) : ((Component)this.limited_shop_item_set_list[this.itemCount]).get_gameObject();

            if (Object.op_Inequality((Object)gameObject, (Object)null))
            {
                gameObject.SetActive(true);
                Vector3 localScale = gameObject.get_transform().get_localScale();
                gameObject.get_transform().SetParent(this.ItemParent.get_transform());
                gameObject.get_transform().set_localScale(localScale);
                LimitedShopSetItemListElement component = (LimitedShopSetItemListElement)gameObject.GetComponent <LimitedShopSetItemListElement>();
                ArtifactParam artifactParam1            = new ArtifactParam();
                ArtifactParam artifactParam2            = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(itemInfo.Name);

                ItemData      itemData      = new ItemData();
                StringBuilder stringBuilder = GameUtility.GetStringBuilder();
                if (itemData != null)
                {
                    stringBuilder.Append(artifactParam2.name);
                }
                stringBuilder.Append(" × ");
                stringBuilder.Append(itemInfo.Quantity.ToString());
                component.itemName.set_text(stringBuilder.ToString());
                component.itemData      = itemData;
                component.ArtifactParam = artifactParam2;
                this.limited_shop_item_set_list.Add(component);
            }
            ++this.itemCount;
        }
Ejemplo n.º 3
0
        private GameObject SetArtifact(string _iname)
        {
            GameObject    gameObject    = (GameObject)null;
            ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(_iname);

            if (artifactParam == null)
            {
                DebugUtility.LogError("武具 INAME:" + _iname + "は存在しません");
                return((GameObject)null);
            }
            if (Object.op_Inequality((Object)this.ArtifactTemplate, (Object)null))
            {
                gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ArtifactTemplate);
                if (Object.op_Inequality((Object)gameObject, (Object)null))
                {
                    gameObject.get_transform().SetParent(this.ArtifactTemplate.get_transform().get_parent(), false);
                    gameObject.SetActive(true);
                    ArtifactData data = new ArtifactData();
                    data.Deserialize(new Json_Artifact()
                    {
                        iid   = 1L,
                        exp   = 0,
                        iname = artifactParam.iname,
                        fav   = 0,
                        rare  = artifactParam.rareini
                    });
                    DataSource.Bind <ArtifactData>(gameObject, data);
                    this.SetAnimatorTrigger(gameObject, "on");
                }
            }
            return(gameObject);
        }
Ejemplo n.º 4
0
        public ArtifactData CreateArtifactData()
        {
            if (!this.CheckGiftTypeIncluded(GiftTypes.Artifact))
            {
                DebugUtility.LogError("このギフトは武具ではありません");
                return((ArtifactData)null);
            }
            ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(this.iname);

            if (artifactParam == null)
            {
                return((ArtifactData)null);
            }
            ArtifactData artifactData = new ArtifactData();

            artifactData.Deserialize(new Json_Artifact()
            {
                iid   = 1L,
                exp   = 0,
                iname = artifactParam.iname,
                fav   = 0,
                rare  = !this.IsValidRarity ? artifactParam.rareini : this.rarity
            });
            return(artifactData);
        }
Ejemplo n.º 5
0
 private void Start()
 {
     this.mCurrentArtifactParam = DataSource.FindDataOfClass <ArtifactParam>(((Component)this).get_gameObject(), (ArtifactParam)null);
     this.mCurrentArtifactData  = DataSource.FindDataOfClass <ArtifactData>(((Component)this).get_gameObject(), (ArtifactData)null);
     this.mCurrentUnit          = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null);
     this.mCurrentEquipSlot     = DataSource.FindDataOfClass <ArtifactTypes>(((Component)this).get_gameObject(), ArtifactTypes.None);
     this.mCurrentJob           = DataSource.FindDataOfClass <JobData>(((Component)this).get_gameObject(), (JobData)null);
     if (this.mCurrentArtifactParam == null)
     {
         this.mCurrentArtifactParam           = ArtifactDetailWindow.s_ArtifactParam;
         ArtifactDetailWindow.s_ArtifactParam = (ArtifactParam)null;
         if (this.mCurrentArtifactParam != null)
         {
             DataSource.Bind <ArtifactParam>(((Component)this).get_gameObject(), this.mCurrentArtifactParam);
         }
     }
     if (this.mCurrentArtifactParam == null && this.mCurrentArtifactData != null)
     {
         this.mCurrentArtifactParam = this.mCurrentArtifactData.ArtifactParam;
     }
     if (this.mCurrentArtifactParam == null)
     {
         return;
     }
     ArtifactSetList.SetSelectedArtifactParam(this.mCurrentArtifactParam);
     this.RefreshView();
 }
Ejemplo n.º 6
0
 public static string Artifacts(ArtifactParam artifalct)
 {
     AssetPath.mSB.Length = 0;
     AssetPath.mSB.Append("Equipments/");
     AssetPath.mSB.Append(artifalct.asset);
     return(AssetPath.mSB.ToString());
 }
Ejemplo n.º 7
0
 public static string ArtifactIcon(ArtifactParam arti)
 {
     AssetPath.mSB.Length = 0;
     AssetPath.mSB.Append("ArtiIcon/");
     AssetPath.mSB.Append(arti.icon);
     return(AssetPath.mSB.ToString());
 }
Ejemplo n.º 8
0
        private void OnSelectAll(GameObject go)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mDecidedItem, (UnityEngine.Object)go))
            {
                this.DecideButtonInteractive(false);
            }
            else
            {
                this.DecideButtonInteractive(!this.IsViewOnly);
            }
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mPointingItem, (UnityEngine.Object)go))
            {
                return;
            }
            ArtifactParam dataOfClass = DataSource.FindDataOfClass <ArtifactParam>(go, (ArtifactParam)null);

            if (dataOfClass != null)
            {
                this.TitleSkinName.set_text(dataOfClass.name);
                this.TitleSkinDesc.set_text(dataOfClass.Expr);
            }
            if (this.OnSkinSelect != null)
            {
                this.OnSkinSelect(dataOfClass);
            }
            this.SetPointingOverLay(go);
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mDecidedItem, (UnityEngine.Object)go))
            {
                this.SetDecidedOverlay(this.mDecidedItem);
            }
            this.mPointingItem = go;
        }
Ejemplo n.º 9
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 1:
                if (this.mCurrentUnit != null && this.mConfirmSkin != null && !string.IsNullOrEmpty(this.mConfirmSkin.iname))
                {
                    this.mCurrentUnit.SetJobSkin(this.mConfirmSkin.iname, -1);
                    this.Refresh();
                    if (this.OnSkinDecide != null)
                    {
                        this.OnSkinDecide(this.mConfirmSkin);
                    }
                }
                this.mConfirmSkin = (ArtifactParam)null;
                break;

            case 2:
                this.mConfirmSkin = (ArtifactParam)null;
                break;

            case 3:
                if (this.mCurrentUnit != null)
                {
                    this.mCurrentUnit.ResetJobSkin(-1);
                    this.Refresh();
                    if (this.OnSkinRemove != null)
                    {
                        this.OnSkinRemove();
                    }
                }
                this.mConfirmSkin = (ArtifactParam)null;
                break;

            case 4:
                ArtifactParam dataOfClass = DataSource.FindDataOfClass <ArtifactParam>(this.mPointingItem, (ArtifactParam)null);
                if (this.mCurrentUnit != null)
                {
                    if (dataOfClass != null && !string.IsNullOrEmpty(dataOfClass.iname))
                    {
                        this.mCurrentUnit.SetJobSkinAll(dataOfClass.iname);
                    }
                    else
                    {
                        this.mCurrentUnit.SetJobSkinAll((string)null);
                    }
                    this.SetPointingOverLay(this.mPointingItem);
                    this.SetDecidedOverlay(this.mPointingItem);
                    this.DecideButtonInteractive(false);
                    this.Refresh();
                    if (this.OnSkinDecideAll != null)
                    {
                        this.OnSkinDecideAll(dataOfClass);
                    }
                }
                this.mConfirmSkin = (ArtifactParam)null;
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
                break;
            }
        }
Ejemplo n.º 10
0
 private ArtifactParam[] MergeSkinArray(ArtifactParam[] array1, ArtifactParam[] array2)
 {
     ArtifactParam[] artifactParamArray = new ArtifactParam[array1.Length + array2.Length];
     array1.CopyTo((Array)artifactParamArray, 0);
     array2.CopyTo((Array)artifactParamArray, array1.Length);
     return(artifactParamArray);
 }
Ejemplo n.º 11
0
        protected override void Refresh()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null))
            {
                return;
            }
            for (int index = this.mItems.Count - 1; index >= 0; --index)
            {
                UnityEngine.Object.Destroy((UnityEngine.Object) this.mItems[index]);
            }
            QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(((Component)this).get_gameObject(), (QuestParam)null);

            if (dataOfClass == null)
            {
                return;
            }
            Transform transform = ((Component)this).get_transform();
            List <TowerRewardItem> towerRewardItem = MonoSingleton <GameManager> .Instance.FindTowerReward(MonoSingleton <GameManager> .Instance.FindTowerFloor(dataOfClass.iname).reward_id).GetTowerRewardItem();

            for (int index = 0; index < towerRewardItem.Count; ++index)
            {
                TowerRewardItem item = towerRewardItem[index];
                if (item.visible && item.type != TowerRewardItem.RewardType.Gold)
                {
                    GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ItemTemplate);
                    gameObject.get_transform().SetParent(transform, false);
                    gameObject.get_transform().set_localScale(this.ItemTemplate.get_transform().get_localScale());
                    DataSource.Bind <TowerRewardItem>(gameObject, item);
                    gameObject.SetActive(true);
                    foreach (GameParameter componentsInChild in (GameParameter[])gameObject.GetComponentsInChildren <GameParameter>())
                    {
                        componentsInChild.Index = index;
                    }
                    TowerRewardUI componentInChildren1 = (TowerRewardUI)gameObject.GetComponentInChildren <TowerRewardUI>();
                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren1, (UnityEngine.Object)null))
                    {
                        componentInChildren1.Refresh();
                    }
                    if (item.type == TowerRewardItem.RewardType.Artifact)
                    {
                        ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(item.iname);

                        DataSource.Bind <ArtifactParam>(gameObject, artifactParam);
                        ArtifactIcon componentInChildren2 = (ArtifactIcon)gameObject.GetComponentInChildren <ArtifactIcon>();
                        if (UnityEngine.Object.op_Equality((UnityEngine.Object)componentInChildren2, (UnityEngine.Object)null))
                        {
                            break;
                        }
                        ((Behaviour)componentInChildren2).set_enabled(true);
                        componentInChildren2.UpdateValue();
                        if (MonoSingleton <GameManager> .Instance.Player.Artifacts.Find((Predicate <ArtifactData>)(x => x.ArtifactParam.iname == item.iname)) != null)
                        {
                            break;
                        }
                        item.is_new = true;
                        break;
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private List <GenericBadge <ArtifactData> > AddCreatableInfo(List <ArtifactData> artifactDataList)
        {
            List <GenericBadge <ArtifactData> > genericBadgeList = new List <GenericBadge <ArtifactData> >();
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null) || instanceDirect.Player == null)
            {
                return(genericBadgeList);
            }
            List <ItemData> all = instanceDirect.Player.Items.FindAll((Predicate <ItemData>)(i => i.ItemType == EItemType.ArtifactPiece));

            using (List <ArtifactData> .Enumerator enumerator = artifactDataList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ArtifactData  current       = enumerator.Current;
                    ArtifactParam artifactParam = current.ArtifactParam;
                    ItemData      itemData      = all.Find((Predicate <ItemData>)(piece => piece.Param.iname == artifactParam.iname));
                    if (itemData == null)
                    {
                        genericBadgeList.Add(new GenericBadge <ArtifactData>(current, false));
                    }
                    else
                    {
                        RarityParam rarityParam = MonoSingleton <GameManager> .Instance.GetRarityParam(artifactParam.rareini);

                        bool flag = itemData.Num >= (int)rarityParam.ArtifactCreatePieceNum;
                        genericBadgeList.Add(new GenericBadge <ArtifactData>(current, flag));
                    }
                }
            }
            return(genericBadgeList);
        }
Ejemplo n.º 13
0
        private bool IsCreatableArtifact(List <ArtifactData> artifactDataList)
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null) || instanceDirect.Player == null)
            {
                return(false);
            }
            List <ItemData> all = instanceDirect.Player.Items.FindAll((Predicate <ItemData>)(i => i.ItemType == EItemType.ArtifactPiece));

            using (List <ArtifactData> .Enumerator enumerator = artifactDataList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ArtifactParam artifactParam = enumerator.Current.ArtifactParam;
                    ItemData      itemData      = all.Find((Predicate <ItemData>)(piece => piece.Param.iname == artifactParam.iname));
                    if (itemData != null)
                    {
                        RarityParam rarityParam = MonoSingleton <GameManager> .Instance.GetRarityParam(artifactParam.rareini);

                        if (itemData.Num >= (int)rarityParam.ArtifactCreatePieceNum)
                        {
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
Ejemplo n.º 14
0
        public void SetItemInames(Json_ShopLineupItem[] lineups)
        {
            if (lineups == null || lineups.Length <= 0)
            {
                return;
            }
            GameManager   instance      = MonoSingleton <GameManager> .Instance;
            StringBuilder stringBuilder = new StringBuilder();

            for (int index1 = 0; index1 < lineups.Length; ++index1)
            {
                Json_ShopLineupItemDetail[] items = lineups[index1].items;
                if (items != null)
                {
                    for (int index2 = 0; index2 < items.Length; ++index2)
                    {
                        Json_ShopLineupItemDetail lineupItemDetail = items[index2];
                        if (lineupItemDetail != null)
                        {
                            switch (lineupItemDetail.GetShopItemTypeWithIType())
                            {
                            case EShopItemType.Item:
                                ItemParam itemParam = instance.GetItemParam(lineupItemDetail.iname);
                                if (itemParam != null)
                                {
                                    stringBuilder.Append("・" + itemParam.name + "\n");
                                    continue;
                                }
                                continue;

                            case EShopItemType.Artifact:
                                ArtifactParam artifactParam = instance.MasterParam.GetArtifactParam(lineupItemDetail.iname);
                                if (artifactParam != null)
                                {
                                    stringBuilder.Append("・" + artifactParam.name + "\n");
                                    continue;
                                }
                                continue;

                            case EShopItemType.ConceptCard:
                                ConceptCardParam conceptCardParam = instance.MasterParam.GetConceptCardParam(lineupItemDetail.iname);
                                if (conceptCardParam != null)
                                {
                                    stringBuilder.Append("・" + conceptCardParam.name + "\n");
                                    continue;
                                }
                                continue;

                            default:
                                DebugUtility.LogError(string.Format("不明な商品タイプです (item.itype => {0})", (object)lineupItemDetail.itype));
                                continue;
                            }
                        }
                    }
                    stringBuilder.Append("\n");
                }
            }
            stringBuilder.Append(LocalizedText.Get("sys.MSG_SHOP_LINEUP_CAUTION"));
            this.lineuplist.set_text(stringBuilder.ToString());
        }
Ejemplo n.º 15
0
        public bool Setup(long iid, string iname)
        {
            this.mArtifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(iname);

            DebugUtility.Assert(this.mArtifactParam != null, "Failed ArtifactParam iname \"" + iname + "\" not found.");
            this.mUniqueID = (OLong)iid;
            return(true);
        }
Ejemplo n.º 16
0
 private string GetIconPath(ArtifactParam param)
 {
     if (param == null)
     {
         return((string)null);
     }
     return(AssetPath.ArtifactIcon(param));
 }
Ejemplo n.º 17
0
 public void AddReward(ArtifactParam param, int num)
 {
     if (param == null)
     {
         return;
     }
     this.AddReward(param.iname, GiftTypes.Artifact, param.rareini, num);
 }
Ejemplo n.º 18
0
 private string GetName(ArtifactParam param)
 {
     if (param == null)
     {
         return((string)null);
     }
     return(param.name);
 }
Ejemplo n.º 19
0
 public void Init()
 {
     this.type     = GachaDropData.Type.None;
     this.unit     = (UnitParam)null;
     this.item     = (ItemParam)null;
     this.artifact = (ArtifactParam)null;
     this.num      = 0;
     this.isNew    = false;
 }
Ejemplo n.º 20
0
        private void Refresh()
        {
            MonoSingleton <GameManager> .Instance.Player.UpdateEventCoin();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null))
            {
                return;
            }
            this.SetPossessionCoinParam();
            EventShopData eventShopData = MonoSingleton <GameManager> .Instance.Player.GetEventShopData();

            DebugUtility.Assert(eventShopData != null, "ショップ情報が存在しない");
            for (int index = 0; index < this.mBuyItems.Count; ++index)
            {
                this.mBuyItems[index].get_gameObject().SetActive(false);
            }
            int count = eventShopData.items.Count;

            for (int index = 0; index < count; ++index)
            {
                EventShopItem data1 = eventShopData.items[index];
                if (index >= this.mBuyItems.Count)
                {
                    GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ItemTemplate);
                    gameObject.get_transform().SetParent((Transform)this.ItemLayoutParent, false);
                    this.mBuyItems.Add(gameObject);
                }
                GameObject mBuyItem = this.mBuyItems[index];
                ((EventShopBuyList)mBuyItem.GetComponentInChildren <EventShopBuyList>()).eventShopItem = data1;
                DataSource.Bind <EventShopItem>(mBuyItem, data1);
                if (data1.IsArtifact)
                {
                    ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(data1.iname);

                    DataSource.Bind <ArtifactParam>(mBuyItem, artifactParam);
                }
                else
                {
                    ItemData data2 = new ItemData();
                    data2.Setup(0L, data1.iname, data1.num);
                    DataSource.Bind <ItemData>(mBuyItem, data2);
                    DataSource.Bind <ItemParam>(mBuyItem, MonoSingleton <GameManager> .Instance.GetItemParam(data1.iname));
                }
                ListItemEvents component1 = (ListItemEvents)mBuyItem.GetComponent <ListItemEvents>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
                {
                    component1.OnSelect = new ListItemEvents.ListItemEvent(this.OnSelect);
                }
                Button component2 = (Button)mBuyItem.GetComponent <Button>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component2, (UnityEngine.Object)null))
                {
                    ((Selectable)component2).set_interactable(!data1.is_soldout);
                }
                mBuyItem.SetActive(true);
            }
            GameParameter.UpdateAll(((Component)this).get_gameObject());
        }
Ejemplo n.º 21
0
 public override void OnActivate(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     if (!GameUtility.Config_UseAssetBundles.Value)
     {
         this.ActivateOutputLinks(11);
     }
     else
     {
         if (((Behaviour)this).get_enabled())
         {
             return;
         }
         GameManager  instance = MonoSingleton <GameManager> .Instance;
         GachaParam[] gachas   = instance.Gachas;
         for (int index1 = 0; index1 < gachas.Length; ++index1)
         {
             if (gachas[index1] != null)
             {
                 if (gachas[index1].units != null && gachas[index1].units.Count > 0)
                 {
                     for (int index2 = 0; index2 < gachas[index1].units.Count; ++index2)
                     {
                         if (instance.Player.FindUnitDataByUnitID(gachas[index1].units[index2].iname) == null && this.DownloadUnits.IndexOf(gachas[index1].units[index2].iname) == -1)
                         {
                             this.DownloadUnits.Add(gachas[index1].units[index2].iname);
                         }
                     }
                 }
                 if (gachas[index1].artifacts != null && gachas[index1].artifacts.Count > 0)
                 {
                     for (int index2 = 0; index2 < gachas[index1].artifacts.Count; ++index2)
                     {
                         ArtifactParam artifact = gachas[index1].artifacts[index2];
                         if (artifact != null)
                         {
                             string path = AssetPath.Artifacts(artifact);
                             if (!string.IsNullOrEmpty(path))
                             {
                                 AssetList.Item itemByPath = AssetManager.AssetList.FindItemByPath(path);
                                 if (itemByPath != null && !AssetManager.IsAssetInCache(itemByPath.IDStr))
                                 {
                                     this.DownloadArtifacts.Add(artifact);
                                 }
                             }
                         }
                     }
                 }
             }
         }
         ((Behaviour)this).set_enabled(true);
         this.StartCoroutine(this.AsyncWork(pinID == 1));
     }
 }
Ejemplo n.º 22
0
 public void Reset()
 {
     this.mArtifactParam = (ArtifactParam)null;
     this.mRarityParam   = (RarityParam)null;
     this.mRarity        = (OInt)0;
     this.mExp           = (OInt)0;
     this.mLv            = (OInt)1;
     this.mUniqueID      = (OLong)0L;
     this.mFavorite      = false;
 }
Ejemplo n.º 23
0
        private Sprite GetFrameSprite(ArtifactParam param, int rarity)
        {
            Sprite sprite = this.Frame.get_sprite();

            if (param == null)
            {
                return(sprite);
            }
            return(GameSettings.Instance.ArtifactIcon_Frames[rarity]);
        }
Ejemplo n.º 24
0
        public void Setup(int _index)
        {
            ArtifactParam artifact = GachaResultData.drops[_index].artifact;
            int           rare     = GachaResultData.drops[_index].Rare;

            if (artifact == null)
            {
                return;
            }
            this.Setup(this.CreateArtifactData(artifact, rare));
        }
Ejemplo n.º 25
0
 public void Init()
 {
     this.type        = GachaDropData.Type.None;
     this.unit        = (UnitParam)null;
     this.item        = (ItemParam)null;
     this.artifact    = (ArtifactParam)null;
     this.conceptcard = (ConceptCardParam)null;
     this.num         = 0;
     this.isNew       = false;
     this.rarity      = 0;
 }
Ejemplo n.º 26
0
 public void Init()
 {
     this.type       = GachaDropData.Type.None;
     this.unit       = (UnitParam)null;
     this.item       = (ItemParam)null;
     this.artifact   = (ArtifactParam)null;
     this.num        = 0;
     this.unitOrigin = (UnitParam)null;
     this.isNew      = false;
     this.rarity     = 0;
     this.excites    = new int[3];
 }
Ejemplo n.º 27
0
        private RewardData GiftDataToRewardData(GiftData[] giftDatas)
        {
            RewardData rewardData = new RewardData();

            rewardData.Exp        = 0;
            rewardData.Stamina    = 0;
            rewardData.MultiCoin  = 0;
            rewardData.KakeraCoin = 0;
            GameManager instance = MonoSingleton <GameManager> .Instance;

            for (int index = 0; index < giftDatas.Length; ++index)
            {
                GiftData giftData = giftDatas[index];
                rewardData.Coin       += giftData.coin;
                rewardData.Gold       += giftData.gold;
                rewardData.ArenaMedal += giftData.arenacoin;
                rewardData.MultiCoin  += giftData.multicoin;
                rewardData.KakeraCoin += giftData.kakeracoin;
                if (giftData.iname != null)
                {
                    if (giftData.CheckGiftTypeIncluded(GiftTypes.Artifact))
                    {
                        ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(giftData.iname);

                        if (artifactParam != null)
                        {
                            if (rewardData.GiftRecieveItemDataDic.ContainsKey(giftData.iname))
                            {
                                rewardData.GiftRecieveItemDataDic[giftData.iname].num += giftData.num;
                            }
                            else
                            {
                                GiftRecieveItemData giftRecieveItemData = new GiftRecieveItemData();
                                giftRecieveItemData.Set(giftData.iname, GiftTypes.Artifact, artifactParam.rareini, giftData.num);
                                rewardData.GiftRecieveItemDataDic.Add(giftData.iname, giftRecieveItemData);
                            }
                        }
                    }
                    else
                    {
                        ItemData itemData = new ItemData();
                        if (itemData.Setup(0L, giftData.iname, giftData.num))
                        {
                            rewardData.Items.Add(itemData);
                            ItemData itemDataByItemId = instance.Player.FindItemDataByItemID(itemData.Param.iname);
                            int      num = itemDataByItemId == null ? 0 : itemDataByItemId.Num;
                            rewardData.ItemsBeforeAmount.Add(num);
                        }
                    }
                }
            }
            return(rewardData);
        }
Ejemplo n.º 28
0
        private RewardData GiftDataToRewardData(GiftData[] giftDatas)
        {
            RewardData rewardData = new RewardData();

            rewardData.Exp        = 0;
            rewardData.Stamina    = 0;
            rewardData.MultiCoin  = 0;
            rewardData.KakeraCoin = 0;
            for (int index = 0; index < giftDatas.Length; ++index)
            {
                GiftData giftData = giftDatas[index];
                rewardData.Coin       += giftData.coin;
                rewardData.Gold       += giftData.gold;
                rewardData.ArenaMedal += giftData.arenacoin;
                rewardData.MultiCoin  += giftData.multicoin;
                rewardData.KakeraCoin += giftData.kakeracoin;
                if (giftData.CheckGiftTypeIncluded(GiftTypes.ConceptCard))
                {
                    ConceptCardParam conceptCardParam = MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardParam(giftData.ConceptCardIname);

                    rewardData.AddReward(conceptCardParam, giftData.ConceptCardNum);
                    if (giftData.IsGetConceptCardUnit)
                    {
                        ItemParam itemParam = MonoSingleton <GameManager> .Instance.GetItemParam(giftData.ConceptCardGetUnitIname);

                        rewardData.AddReward(itemParam, 1);
                    }
                }
                if (giftData.iname != null)
                {
                    if (giftData.CheckGiftTypeIncluded(GiftTypes.Artifact))
                    {
                        ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(giftData.iname);

                        rewardData.AddReward(artifactParam, giftData.num);
                    }
                    else if (giftData.CheckGiftTypeIncluded(GiftTypes.Award))
                    {
                        AwardParam awardParam = MonoSingleton <GameManager> .Instance.GetAwardParam(giftData.iname);

                        rewardData.AddReward(awardParam.ToItemParam(), giftData.num);
                    }
                    else
                    {
                        ItemParam itemParam = MonoSingleton <GameManager> .Instance.GetItemParam(giftData.iname);

                        rewardData.AddReward(itemParam, giftData.num);
                    }
                }
            }
            return(rewardData);
        }
Ejemplo n.º 29
0
        private void SetRewardName(int idx, VersusTowerParam param)
        {
            GameManager      instance       = MonoSingleton <GameManager> .Instance;
            int              num            = (int)param.SeasonItemnum[idx];
            string           key            = (string)param.SeasonIteminame[idx];
            VERSUS_ITEM_TYPE versusItemType = param.SeasonItemType[idx];

            if (!Object.op_Inequality((Object)this.rewardTxt, (Object)null))
            {
                return;
            }
            string str = string.Empty;

            switch (versusItemType)
            {
            case VERSUS_ITEM_TYPE.item:
                ItemParam itemParam = instance.GetItemParam(key);
                if (itemParam != null)
                {
                    str = itemParam.name + string.Format(LocalizedText.Get("sys.CROSS_NUM"), (object)num);
                    break;
                }
                break;

            case VERSUS_ITEM_TYPE.gold:
                str = num.ToString() + LocalizedText.Get("sys.GOLD");
                break;

            case VERSUS_ITEM_TYPE.coin:
                str = string.Format(LocalizedText.Get("sys.CHALLENGE_REWARD_COIN"), (object)num);
                break;

            case VERSUS_ITEM_TYPE.unit:
                UnitParam unitParam = instance.GetUnitParam(key);
                if (unitParam != null)
                {
                    str = unitParam.name;
                    break;
                }
                break;

            case VERSUS_ITEM_TYPE.artifact:
                ArtifactParam artifactParam = instance.MasterParam.GetArtifactParam(key);
                if (artifactParam != null)
                {
                    str = artifactParam.name;
                    break;
                }
                break;
            }
            this.rewardTxt.set_text(string.Format(LocalizedText.Get("sys.MULTI_VERSUS_REWARD_NAME"), (object)str));
        }
Ejemplo n.º 30
0
 public static string UnitSkinImage2(UnitParam unit, ArtifactParam skin, string jobName)
 {
     if (skin == null)
     {
         return(AssetPath.UnitImage2(unit, jobName));
     }
     AssetPath.mSB.Length = 0;
     AssetPath.mSB.Append("UnitImages2/");
     AssetPath.mSB.Append(unit.image);
     AssetPath.mSB.Append("_");
     AssetPath.mSB.Append(skin.asset);
     return(AssetPath.mSB.ToString());
 }