Esempio n. 1
0
        /// <summary>
        /// 更新物品并保存
        /// </summary>
        /// <param name="package"></param>
        /// <param name="item"></param>
        /// <returns></returns>
        public MessageCode UpdateItem(ItemPackageFrame package, ItemInfoEntity item)
        {
            var code = package.Update(item);

            if (code == MessageCode.Success)
            {
                if (package.Save())
                {
                    package.Shadow.Save();
                    return(code);
                }
                else
                {
                    return(MessageCode.NbUpdateFail);
                }
            }
            return(code);
        }