상첨 처리 추가

This commit is contained in:
김판돌 2024-03-23 19:28:04 +09:00
parent 92b0e9d212
commit 4b77dea709
1 changed files with 5 additions and 2 deletions

View File

@ -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