shop처리작업

This commit is contained in:
김판돌 2024-03-20 22:14:28 +09:00
parent 4dca1cdd62
commit 064a6082e9
4 changed files with 8 additions and 6 deletions

View File

@ -40,6 +40,6 @@ public class ShopTypeitemPrefab : MonoBehaviour
Statics.itemManager.box.add(data.consumableItem); Statics.itemManager.box.add(data.consumableItem);
Statics.itemManager.box.add(data.etcItem); Statics.itemManager.box.add(data.etcItem);
GetItemWindows.Instance.SetUI(addGold, addCash, data.deck_unit, data.equipment, data.consumableItem, data.etcItem); GetItemWindows.Instance.SetUI(addGold, addCash, data.deck_unit, data.equipment, data.consumableItem, data.etcItem);
}, shopItemData.index); }, shopItemData.index, shopItemData.id);
} }
} }

View File

@ -41,7 +41,7 @@ public class ShopUiType1 : MonoBehaviour
public void Set(long shop_index) 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) if(item.Value.shop_index == shop_index)
{ {

View File

@ -6,7 +6,7 @@ public class ShopUiType2 : MonoBehaviour
[SerializeField] Transform itemContent; [SerializeField] Transform itemContent;
public void Set(long shop_index) 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) if (item.Value.shop_index == shop_index)
{ {

View File

@ -173,11 +173,13 @@ public class BuyShopItemReq
{ {
public string uuid { get; set; } public string uuid { get; set; }
public long shopItemIndex { 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.uuid = Statics.uuid;
this.shopItemIndex = shopItemIndex; this.shopItemIndex = shopItemIndex;
this.reset_id = reset_id;
} }
} }
@ -194,9 +196,9 @@ public class BuyShopItemResp : Request<BuyShopItemResp>
public List<ConsumableItem> consumableItem { get; set; } public List<ConsumableItem> consumableItem { get; set; }
public List<EtcItem> etcItem { get; set; } public List<EtcItem> etcItem { get; set; }
public void Request(Action<BuyShopItemResp> onRequestFinished, long shopItemIndex) public void Request(Action<BuyShopItemResp> 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 #endregion