Пример #1
0
 void AddFristPropertyUIEft()
 {
     CharBag.Goods _fristGoods = new CharBag.Goods();
     string[]      mt          = recipe.Target.Split(',');
     _fristGoods.Property = Materiral.GetMaterialProperty(int.Parse(mt[0]), int.Parse(mt[1]));
     AddPropertyUIEft(_fristGoods);
 }
Пример #2
0
    static public int AddGoodsByID(int materialType, int ID)
    {
        Goods newgoods = new Goods();

        newgoods.ID       = ID;
        newgoods.Number   = 1;
        newgoods.Property = Materiral.GetMaterialProperty(materialType, ID);
        newgoods.Quality  = 80;

        if (materialType == 0)
        {
            Materiral.Items _item = Materiral.FindItemByID(ID);
            newgoods.Name  = _item.Name;
            newgoods.Price = _item.Price;
            newgoods.Type  = _item.Type;
        }   //item
        else if (materialType == 1)
        {
            Materiral.Minds _mind = Materiral.FindMindByID(ID);
            newgoods.Name          = _mind.Name;
            newgoods.Price         = _mind.Price;
            newgoods.Type          = _mind.Type;
            newgoods.MateriralType = 1;
        }   //mind
        else if (materialType == 2)
        {
            Materiral.SpecialItem _sepcial = Materiral.FindSpecialItemByID(ID);
            newgoods.Name          = _sepcial.Name;
            newgoods.Price         = _sepcial.Price;
            newgoods.Type          = _sepcial.Type;
            newgoods.MateriralType = 2;
        }   //specail

        //添加物品
        int uid = AddGoods(newgoods);

        return(uid);
    }