首充支持道具
This commit is contained in:
parent
675a1cb078
commit
ca9827db16
|
|
@ -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,
|
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)
|
p.DeviceId, bbd.Name, amount, int32(bbd.Price2), nil, "", p.Channel, p.ChannelId)
|
||||||
} else if wfs, ok := data.(*webapi_proto.WelfareSpree); ok {
|
} else if wfs, ok := data.(*webapi_proto.WelfareSpree); ok {
|
||||||
|
var items []model.ItemInfo
|
||||||
for _, it := range wfs.Item {
|
for _, it := range wfs.Item {
|
||||||
if it.Type == 1 {
|
if it.Type == 1 {
|
||||||
amount[0] = it.Grade
|
amount[0] = it.Grade
|
||||||
} else if it.Type == 2 {
|
} else if it.Type == 2 {
|
||||||
amount[1] = it.Grade
|
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
|
var gainWay int32 = common.GainWay_ActFirstPay
|
||||||
if remark == "ContinuousPay" {
|
if remark == "ContinuousPay" {
|
||||||
gainWay = common.GainWay_ActContinuousPay
|
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)
|
err := model.InsertDbShopLog(dbShop)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Errorf("model.InsertDbShopLog err:", err)
|
logger.Logger.Errorf("model.InsertDbShopLog err:", err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue