Exemplo n.º 1
0
    public static int GetFashionModelTypeID(string id, out FashionModelType type)
    {
        if (!DataReader <ShiZhuangXiTong> .Contains(id))
        {
            type = FashionModelType.None;
            return(0);
        }
        ShiZhuangXiTong shiZhuangXiTong = DataReader <ShiZhuangXiTong> .Get(id);

        switch (shiZhuangXiTong.kind)
        {
        case 1:
        case 2:
            if (shiZhuangXiTong.IsModelChange == 0)
            {
                type = FashionModelType.Equip;
                return(shiZhuangXiTong.itemsID);
            }
            type = FashionModelType.Model;
            return(shiZhuangXiTong.model);

        case 3:
            type = FashionModelType.Wing;
            return(shiZhuangXiTong.model);

        default:
            type = FashionModelType.None;
            return(0);
        }
    }
Exemplo n.º 2
0
    protected void DecomposeFashion()
    {
        this.FashionModelID  = 0;
        this.FashionEquipIDs = null;
        this.FashionWingID   = 0;
        for (int i = 0; i < this.fashionIDs.get_Count(); i++)
        {
            FashionModelType fashionModelType = FashionModelType.None;
            int fashionModelTypeID            = ExteriorArithmeticUnit.GetFashionModelTypeID(this.fashionIDs.get_Item(i), out fashionModelType);
            if (fashionModelTypeID != 0)
            {
                switch (fashionModelType)
                {
                case FashionModelType.Equip:
                    this.FashionEquipIDs.Add(fashionModelTypeID);
                    break;

                case FashionModelType.Wing:
                    this.FashionWingID = fashionModelTypeID;
                    break;

                case FashionModelType.Model:
                    this.FashionModelID = fashionModelTypeID;
                    break;
                }
            }
        }
    }