Пример #1
0
    public static string GetItemDescWithTab(Items dataItem, string color = "")
    {
        string text = string.Empty;

        text = ((dataItem.describeId1 <= 0) ? GameDataUtils.DEFAULT_CHINESE : GameDataUtils.GetChineseContent(dataItem.describeId1, false));
        if (dataItem.tab == 5)
        {
            string canEnchantmentPosDesc = EquipGlobal.GetCanEnchantmentPosDesc(dataItem.id);
            text += "\n";
            text += "\n";
            if (canEnchantmentPosDesc != string.Empty)
            {
                text = text + "可用部位:" + canEnchantmentPosDesc;
            }
        }
        if (!string.IsNullOrEmpty(color))
        {
            text = TextColorMgr.GetColor(text, color, string.Empty);
        }
        return(text);
    }
Пример #2
0
    private void SetEnchantmentIcon(int typeId)
    {
        Items items = DataReader <Items> .Get(typeId);

        if (items == null)
        {
            return;
        }
        Transform transform = base.FindTransform("imgGrid0");
        Image     component = transform.GetComponent <Image>();

        ResourceManager.SetSprite(component, GameDataUtils.GetItemFrameByColor(items.color));
        Image component2 = transform.FindChild("imgItem").GetComponent <Image>();

        ResourceManager.SetSprite(component2, GameDataUtils.GetIcon(items.icon));
        Text component3 = transform.FindChild("texName").GetComponent <Text>();

        component3.set_text(GameDataUtils.GetItemName(typeId, true, 0L));
        Dictionary <string, Color> textColorByQuality = GameDataUtils.GetTextColorByQuality(items.color);

        component3.set_color(textColorByQuality.get_Item("TextColor"));
        transform.get_transform().FindChild("texName").GetComponent <Outline>().set_effectColor(textColorByQuality.get_Item("TextOutlineColor"));
        Text component4 = transform.FindChild("texLv").GetComponent <Text>();

        component4.set_text(string.Empty);
        Text component5 = base.FindTransform("texDesc").GetComponent <Text>();
        int  describeId = items.describeId1;

        component5.set_text(GameDataUtils.GetChineseContent(describeId, false));
        string canEnchantmentPosDesc = EquipGlobal.GetCanEnchantmentPosDesc(items.id);
        Text   expr_112 = component5;

        expr_112.set_text(expr_112.get_text() + "\n");
        Text expr_129 = component5;

        expr_129.set_text(expr_129.get_text() + "\n");
        Text expr_140 = component5;

        expr_140.set_text(expr_140.get_text() + "可用部位:" + canEnchantmentPosDesc);
    }