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, } } }