Beispiel #1
0
    private void NewShow(List <EquipmentInfoData> eid)
    {
        SysCustomizationVo dataById = BaseDataMgr.instance.GetDataById <SysCustomizationVo>(this.modelID.ToString());

        this.newmark.gameObject.SetActive(dataById.newproduct == 1);
        this.isNew  = (dataById.newproduct == 1);
        this.source = int.Parse(dataById.customization_source);
        EquipmentInfoData equipmentInfoData = eid.Find((EquipmentInfoData obj) => obj.ModelId == this.modelID);

        if (dataById.newproduct != 1)
        {
            if (equipmentInfoData != null)
            {
                this.hasWore = (1 == equipmentInfoData.isweared);
                this.exclamation.gameObject.SetActive(!this.hasWore);
            }
            else
            {
                this.exclamation.gameObject.SetActive(false);
            }
        }
        else
        {
            this.exclamation.gameObject.SetActive(false);
        }
    }
Beispiel #2
0
        private void CreateBookList()
        {
            Dictionary <string, SysSummonersHeadportraitVo> typeDicByType = BaseDataMgr.instance.GetTypeDicByType <SysSummonersHeadportraitVo>();

            foreach (SysSummonersHeadportraitVo current in typeDicByType.Values)
            {
                if (current.headportrait_output == 5)
                {
                    ItemBoookData itemBoookData = new ItemBoookData();
                    itemBoookData._icon           = current.headportrait_icon;
                    itemBoookData._name           = current.headportrait_name;
                    itemBoookData._quality        = current.headportrait_quality;
                    itemBoookData._bottleBookType = BookItemType.HeadPortrait;
                    itemBoookData._itemType       = ItemType.HeadPortrait;
                    this.bookItems.Add(itemBoookData);
                }
            }
            Dictionary <string, SysGameItemsVo> typeDicByType2 = BaseDataMgr.instance.GetTypeDicByType <SysGameItemsVo>();

            foreach (SysGameItemsVo current2 in typeDicByType2.Values)
            {
                if (current2.hero_decorate_type >= 1 && current2.hero_decorate_type <= 6)
                {
                    SysCustomizationVo dataById = BaseDataMgr.instance.GetDataById <SysCustomizationVo>(current2.items_id);
                    if (dataById.customization_source.Equals("2"))
                    {
                        ItemBoookData itemBoookData2 = new ItemBoookData();
                        itemBoookData2._icon           = current2.icon;
                        itemBoookData2._name           = current2.name;
                        itemBoookData2._quality        = current2.quality;
                        itemBoookData2._itemType       = ItemType.NormalGameItem;
                        itemBoookData2._bottleBookType = this.Hero_Decorate_Type(current2.hero_decorate_type);
                        this.bookItems.Add(itemBoookData2);
                    }
                }
            }
            Dictionary <string, SysHeroSkinVo> typeDicByType3 = BaseDataMgr.instance.GetTypeDicByType <SysHeroSkinVo>();

            foreach (SysHeroSkinVo current3 in typeDicByType3.Values)
            {
                if (current3.source == "2")
                {
                    ItemBoookData itemBoookData3 = new ItemBoookData();
                    itemBoookData3._icon           = current3.avatar_icon;
                    itemBoookData3._name           = current3.name;
                    itemBoookData3._quality        = current3.quality;
                    itemBoookData3._itemType       = ItemType.HeroSkin;
                    itemBoookData3._bottleBookType = BookItemType.HeroSkin;
                    this.bookItems.Add(itemBoookData3);
                }
            }
            this.bookItems = (from item in this.bookItems
                              orderby item._quality descending, item._bottleBookType
                              select item).ToList <ItemBoookData>();
            this.itemSize = this.bookItems.Count;
            this.FillTheBookList(this.bookItems, 4);
            this.corTask = this.cMgr.StartCoroutine(this.SetPanelState(), true);
        }
Beispiel #3
0
    public void CheckIsCurrentHero(List <int> tempItemCurrHero, List <int> tempItemAllHero)
    {
        this.isCurrentHero = tempItemCurrHero.Contains(this.modelID);
        SysCustomizationVo dataById = BaseDataMgr.instance.GetDataById <SysCustomizationVo>(this.modelID.ToString());

        if (!this.isOwned)
        {
            this.isOwned = tempItemAllHero.Contains(this.modelID);
        }
        if (!this.hasWore)
        {
            this.hasWore = tempItemAllHero.Contains(this.modelID);
        }
        if (dataById.newproduct != 1)
        {
            this.exclamation.gameObject.SetActive(!this.hasWore);
        }
        else
        {
            this.exclamation.gameObject.SetActive(false);
        }
        this.countLabel.gameObject.SetActive(this.isOwned);
        this.lockPic.gameObject.SetActive(!this.isOwned);
    }
Beispiel #4
0
    private void InitEquipNewMark(EquipmentInfoData eid)
    {
        SysCustomizationVo dataById = BaseDataMgr.instance.GetDataById <SysCustomizationVo>(this.modelID.ToString());

        this.newmark.gameObject.SetActive(dataById.newproduct == 1);
        this.isNew  = (dataById.newproduct == 1);
        this.source = int.Parse(dataById.customization_source);
        if (dataById.newproduct != 1)
        {
            if (eid != null)
            {
                this.hasWore = (1 == eid.isweared);
                this.exclamation.gameObject.SetActive(!this.hasWore);
            }
            else
            {
                this.exclamation.gameObject.SetActive(false);
            }
        }
        else
        {
            this.exclamation.gameObject.SetActive(false);
        }
    }
        private void OnGetMsg_UserDataCode(OperationResponse operationResponse)
        {
            string arg  = operationResponse[10] as string;
            string arg2 = operationResponse[59] as string;

            byte[] buffer            = operationResponse[246] as byte[];
            List <DropItemData> list = SerializeHelper.Deserialize <List <DropItemData> >(buffer);

            if (list == null || list.Count < 1)
            {
                return;
            }
            foreach (DropItemData current in list)
            {
                Com.Game.Module.ItemType dropItemType = ToolsFacade.Instance.GetDropItemType(current);
                string text = ToolsFacade.Instance.GetDropItemTypeName(dropItemType);
                Com.Game.Module.ItemType itemType = dropItemType;
                if (itemType != Com.Game.Module.ItemType.HeroSkin)
                {
                    if (itemType == Com.Game.Module.ItemType.NormalGameItem)
                    {
                        SysGameItemsVo     dataById  = BaseDataMgr.instance.GetDataById <SysGameItemsVo>(current.itemId.ToString());
                        SysCustomizationVo dataById2 = BaseDataMgr.instance.GetDataById <SysCustomizationVo>(current.itemId.ToString());
                        if (dataById2 != null && dataById2.customization_type != 1 && dataById.quality < 5)
                        {
                            break;
                        }
                        string text2;
                        switch (dataById.quality)
                        {
                        case 3:
                            text2 = "[C138F9]史诗级";
                            break;

                        case 4:
                            text2 = "[ECC16F]传说级";
                            break;

                        case 5:
                            text2 = "[f81841]典藏级";
                            break;

                        default:
                            text2 = string.Empty;
                            break;
                        }
                        text = string.Concat(new string[]
                        {
                            text2,
                            text,
                            "【",
                            LanguageManager.Instance.GetStringById(dataById.name),
                            "】"
                        });
                    }
                }
                else
                {
                    SysHeroSkinVo dataById3 = BaseDataMgr.instance.GetDataById <SysHeroSkinVo>(current.itemCount.ToString());
                    text = string.Concat(new string[]
                    {
                        (dataById3.quality != 5) ? "[ECC16F]传说级" : "[f81841]典藏级",
                        text,
                        "【",
                        LanguageManager.Instance.GetStringById(dataById3.name),
                        "】"
                    });
                }
                this.data.otherMsgQueue.Enqueue(string.Format("天降鸿运!恭喜[e3905b]{0}[-]在{1}中获得{2}", arg2, arg, text));
            }
        }