From ff086c3de349aae10674e1f1329e4b3bdec8c351 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Mon, 12 Aug 2024 16:37:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=91=E6=8D=A2=E4=BF=A1=E6=81=AF=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/shopmgr.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index e302baf..a66e524 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -108,6 +108,7 @@ type ExchangeShopInfo struct { TelCharge int32 //话费 ShopType int32 //商品类型 TelData []*shop.TelChargeData //运营商配置 + Items []*shop.ItemInfo //道具 } func (this *ShopMgr) ModuleName() string { @@ -777,6 +778,13 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf Url: info.Url, }) } + var items []*shop.ItemInfo + for _, v := range data.GetItems() { + items = append(items, &shop.ItemInfo{ + ItemId: v.GetItemId(), + ItemNum: v.GetItemNum(), + }) + } return &ExchangeShopInfo{ Id: data.Id, Picture: data.Picture, @@ -788,6 +796,7 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf TelCharge: data.TelCharge, ShopType: data.ShopType, TelData: telData, + Items: items, } } }