From 4b77dea7095739ccd3549778aca01751a79917c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Sat, 23 Mar 2024 19:28:04 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=EC=B2=A8=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/Service/BuyShopItem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Server/Service/BuyShopItem.cs b/Server/Service/BuyShopItem.cs index 7433637..8bbc270 100644 --- a/Server/Service/BuyShopItem.cs +++ b/Server/Service/BuyShopItem.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json; using Server.SQL; using Server.Manager; using NLog; +using System.Diagnostics; namespace Server.Service { @@ -15,6 +16,7 @@ namespace Server.Service { Statics.userSQL.SaveChanges(); Statics.resetShopItemSQL.SaveChanges(); + Statics.shopItemSQL.SaveChanges(); item.box.SaveSQL(); } @@ -26,7 +28,7 @@ namespace Server.Service long reward; long id; ResetShopItem resetShopItem = null; - if (req.reset_id == 0) + if (req.reset_id == -1) { ShopItemData shopItemData = Statics.shopItemExcel.getShopItemData(req.shopItemIndex); buy_type = shopItemData.buy_type; @@ -69,11 +71,12 @@ namespace Server.Service if (reward != 0) { item.addReward(reward); - ShopItem shopItem = new ShopItem(); if(resetShopItem == null) { + ShopItem shopItem = new ShopItem(); shopItem.user_id = user.id; shopItem.shop_item_data_id = id; + shopItem.buy_date = DateTime.UtcNow; Statics.shopItemSQL.Insert(shopItem); } else