Ejemplo n.º 1
0
    public JewelryItem(string id, string name, string description, string icon, int max_c, float weight, int bprice, int sprice, bool sellable, bool usable, JewelryType type, PowerUps add, SuitEffectInfo set) :
        base(id, name, description, icon, max_c, weight, bprice, sprice, sellable, usable)
    {
        /*if(icon.Contains("Icon/Item/Jewelry/Necklace/"))
         * {
         *  StringBuilder sb = new StringBuilder(icon);
         *  sb.Replace("Icon/Item/Jewelry/Necklace/", "");
         *  icon = sb.ToString();
         * }
         * else if(icon.Contains("Icon/Item/Jewelry/Belt/"))
         * {
         *  StringBuilder sb = new StringBuilder(icon);
         *  sb.Replace("Icon/Item/Jewelry/Belt/", "");
         *  icon = sb.ToString();
         * }
         * else if(icon.Contains("Icon/Item/Jewelry/Ring/"))
         * {
         *  StringBuilder sb = new StringBuilder(icon);
         *  sb.Replace("Icon/Item/Jewelry/Ring/", "");
         *  icon = sb.ToString();
         * }*/
        switch (type)
        {
        case JewelryType.Necklace: type_name = "项链"; /*Icon = "Icon/Item/Jewelry/Necklace/" + icon;*/ break;

        case JewelryType.Belt: type_name = "腰饰"; /*Icon = "Icon/Item/Jewelry/Belt/" + icon;*/ break;

        case JewelryType.Ring: type_name = "戒指"; /*Icon = "Icon/Item/Jewelry/Ring/" + icon;*/ break;
        }
        this.jewelry_Type = type;
        if (add != null)
        {
            power_Add = add.Clone();
        }
        ItemType     = ItemType.Jewelry;
        ItemTypeName = "首饰";
        IsEqu        = false;
        enchant      = null;
        StackAble    = false;
        suitEffect   = set;
    }