Example #1
0
 /// <summary>
 /// 更新物品
 /// </summary>
 /// <returns></returns>
 public static void UpdateItemInfo(item.ItemInfo item, ref ItemTypeInfo I)
 {
     if (item == null || I == null)
     {
         return;
     }
     //
     I.ID      = item.id;
     I.Positon = item.position;
     I.Num     = item.superpose;
 }
Example #2
0
    /// <summary>
    /// 获取物品
    /// </summary>
    /// <returns></returns>
    public static ItemTypeInfo GetItemInfo(item.ItemInfo item)
    {
        if (item == null)
        {
            return(null);
        }
        ItemTypeInfo   I    = new ItemTypeInfo();
        s_itemtypeInfo info = GetItemInfo(item.itemtypeid);

        if (info == null)
        {
            return(null);
        }

        I.ID      = item.id;
        I.Positon = item.position;
        I.Num     = item.superpose;
        FillBaseItemInfo(info, ref I);

        return(I);
    }