From 064a6082e90962174250416f10d46300b62c7d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Wed, 20 Mar 2024 22:14:28 +0900 Subject: [PATCH] =?UTF-8?q?shop=EC=B2=98=EB=A6=AC=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/1_Script/Prefab/ShopTypeitemPrefab.cs | 2 +- Client/Assets/1_Script/ShopUiType/ShopUiType1.cs | 2 +- Client/Assets/1_Script/ShopUiType/ShopUiType2.cs | 2 +- Client/Assets/1_Script/System/Http/Protocol.cs | 8 +++++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Client/Assets/1_Script/Prefab/ShopTypeitemPrefab.cs b/Client/Assets/1_Script/Prefab/ShopTypeitemPrefab.cs index c60ef951..e6585da7 100644 --- a/Client/Assets/1_Script/Prefab/ShopTypeitemPrefab.cs +++ b/Client/Assets/1_Script/Prefab/ShopTypeitemPrefab.cs @@ -40,6 +40,6 @@ public class ShopTypeitemPrefab : MonoBehaviour Statics.itemManager.box.add(data.consumableItem); Statics.itemManager.box.add(data.etcItem); GetItemWindows.Instance.SetUI(addGold, addCash, data.deck_unit, data.equipment, data.consumableItem, data.etcItem); - }, shopItemData.index); + }, shopItemData.index, shopItemData.id); } } diff --git a/Client/Assets/1_Script/ShopUiType/ShopUiType1.cs b/Client/Assets/1_Script/ShopUiType/ShopUiType1.cs index 4aee7312..24d9cc44 100644 --- a/Client/Assets/1_Script/ShopUiType/ShopUiType1.cs +++ b/Client/Assets/1_Script/ShopUiType/ShopUiType1.cs @@ -41,7 +41,7 @@ public class ShopUiType1 : MonoBehaviour public void Set(long shop_index) { - foreach(var item in Statics.excelDatas.shopItemData) + foreach(var item in Statics.shopItems) { if(item.Value.shop_index == shop_index) { diff --git a/Client/Assets/1_Script/ShopUiType/ShopUiType2.cs b/Client/Assets/1_Script/ShopUiType/ShopUiType2.cs index 3292bdc5..d0d35241 100644 --- a/Client/Assets/1_Script/ShopUiType/ShopUiType2.cs +++ b/Client/Assets/1_Script/ShopUiType/ShopUiType2.cs @@ -6,7 +6,7 @@ public class ShopUiType2 : MonoBehaviour [SerializeField] Transform itemContent; public void Set(long shop_index) { - foreach (var item in Statics.excelDatas.shopItemData) + foreach (var item in Statics.shopItems) { if (item.Value.shop_index == shop_index) { diff --git a/Client/Assets/1_Script/System/Http/Protocol.cs b/Client/Assets/1_Script/System/Http/Protocol.cs index 898d4a57..180838e1 100644 --- a/Client/Assets/1_Script/System/Http/Protocol.cs +++ b/Client/Assets/1_Script/System/Http/Protocol.cs @@ -173,11 +173,13 @@ public class BuyShopItemReq { public string uuid { get; set; } public long shopItemIndex { get; set; } + public long reset_id { get; set; } - public BuyShopItemReq(long shopItemIndex) + public BuyShopItemReq(long shopItemIndex, long reset_id) { this.uuid = Statics.uuid; this.shopItemIndex = shopItemIndex; + this.reset_id = reset_id; } } @@ -194,9 +196,9 @@ public class BuyShopItemResp : Request public List consumableItem { get; set; } public List etcItem { get; set; } - public void Request(Action onRequestFinished, long shopItemIndex) + public void Request(Action onRequestFinished, long shopItemIndex, long reset_id) { - CreateRequest(protocol, onRequestFinished, new BuyShopItemReq(shopItemIndex), HTTPMethods.Post, null); + CreateRequest(protocol, onRequestFinished, new BuyShopItemReq(shopItemIndex, reset_id), HTTPMethods.Post, null); } } #endregion