diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index f6f2d2a..e0ab93d 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -1239,18 +1239,24 @@ func (this *ShopMgr) SendAPICreateOrder(p *Player, ConfigPayId int32, data any, 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), nil, "", p.Channel, p.ChannelId) } else if wfs, ok := data.(*webapi_proto.WelfareSpree); ok { + var items []model.ItemInfo for _, it := range wfs.Item { if it.Type == 1 { amount[0] = it.Grade } else if it.Type == 2 { amount[1] = it.Grade + } else if it.Type == 3 { + items = append(items, model.ItemInfo{ + ItemId: it.Item_Id, + ItemNum: int64(it.Grade), + }) } } var gainWay int32 = common.GainWay_ActFirstPay if remark == "ContinuousPay" { gainWay = common.GainWay_ActContinuousPay } - dbShop = this.NewDbShop(p, 0, amount[:], ShopConsumeMoney, int32(wfs.Price2), gainWay, nil, 0, "", 0, remark, []int32{wfs.Day}) + dbShop = this.NewDbShop(p, 0, amount[:], ShopConsumeMoney, int32(wfs.Price2), gainWay, items, 0, "", 0, remark, []int32{wfs.Day}) err := model.InsertDbShopLog(dbShop) if err != nil { logger.Logger.Errorf("model.InsertDbShopLog err:", err)