Example #1
0
        /// <summary>
        /// 載入全部商店資料
        /// </summary>
        /// <returns></returns>
        public byte[] LoadStoreData()
        {
            StoreData storeData = new StoreData();

            storeData.ReturnCode    = "(UI)S900";
            storeData.ReturnMessage = "";

            try
            {
                StoreDataLogic storeDataLogic = new StoreDataLogic();
                storeData = storeDataLogic.LoadStoreData();
            }
            catch (Exception e)
            {
                storeData.ReturnCode    = "S999";
                storeData.ReturnMessage = e.Message;
            }
            return(TextUtility.SerializeToStream(storeData));
        }
Example #2
0
        /// <summary>
        /// 更新道具"限量"數量
        /// </summary>
        /// <param name="itemName">道具名稱</param>
        /// <param name="itemType">道具類別</param>
        /// <param name="buyCount">購買數量</param>
        /// <returns></returns>
        public byte[] UpdateStoreLimit(Int16 itemID, byte itemType, int buyCount)
        {
            StoreData storeData = new StoreData();

            storeData.ReturnCode    = "S900";
            storeData.ReturnMessage = "";

            try
            {
                StoreDataLogic storeDataLogic = new StoreDataLogic();
                storeData = storeDataLogic.UpdateStoreLimit(itemID, itemType, buyCount);
            }
            catch (Exception e)
            {
                storeData.ReturnCode    = "S999";
                storeData.ReturnMessage = e.Message;
            }
            return(TextUtility.SerializeToStream(storeData));
        }