Beispiel #1
0
        /// <summary>
        /// 通过模板添加物品
        /// </summary>
        /// <param name="temp"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public int AddItemTemplate(ItemTemplateInfo temp, int count)
        {
            //ItemInfo info = new ItemInfo(temp);
            ItemInfo info = ItemInfo.CreateFromTemplate(temp, count);

            if (info == null)
            {
                return(-1);
            }
            ItemInfo.BuyItemDate(info, 0);
            info.UserID = _player.PlayerCharacter.ID;
            return(AddItem(info));
        }