From 1063cc8fbac5b7337faa052b53459fb695ad7909 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 11 Sep 2024 16:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B2=E7=9B=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/shopmgr.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index e01fe96..22551fe 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -1276,27 +1276,14 @@ func (this *ShopMgr) SendAPICreateOrder(p *Player, ConfigPayId int32, data any, amount[ShopParamDiamond] = bbd.Grade } - var itemInfo []model.ItemInfo - var webItemInfo []*webapi_proto.ItemInfo - for _, info := range shopInfo.GetItems() { - itemInfo = append(itemInfo, model.ItemInfo{ - ItemId: info.ItemId, - ItemNum: info.ItemNum, - }) - webItemInfo = append(webItemInfo, &webapi_proto.ItemInfo{ - ItemId: info.ItemId, - ItemNum: info.ItemNum, - }) - } - - dbShop = this.NewDbShop(p, 0, amount[:], ShopConsumeMoney, int32(bbd.Price2), common.GainWay_ActBlindBox, itemInfo, 0, "", 0, remark, []int32{bbd.Id}) + dbShop = this.NewDbShop(p, 0, amount[:], ShopConsumeMoney, int32(bbd.Price2), common.GainWay_ActBlindBox, nil, 0, "", 0, remark, []int32{bbd.Id}) err := model.InsertDbShopLog(dbShop) if err != nil { logger.Logger.Errorf("model.InsertDbShopLog err:", err) return nil } return webapi.API_CreateOrder(common.GetAppId(), dbShop.LogId.Hex(), ConfigPayId, p.SnId, 0, p.Platform, p.PackageID, p.DeviceOS, - p.DeviceId, bbd.Name, amount, int32(bbd.Price2), webItemInfo, "", p.Channel, p.ChannelId) + p.DeviceId, bbd.Name, amount, int32(bbd.Price2), nil, "", p.Channel, p.ChannelId) } else if wfs, ok := data.(*webapi_proto.WelfareSpree); ok { var items []model.ItemInfo var webItemInfo []*webapi_proto.ItemInfo