Compare commits
No commits in common. "d292cbc11826d61063e83c643dbe219820348d99" and "d2c5c4f1599d81ad5832931912b4416225a7ea52" have entirely different histories.
d292cbc118
...
d2c5c4f159
|
@ -34,7 +34,7 @@ const (
|
||||||
|
|
||||||
type ShopInfo struct {
|
type ShopInfo struct {
|
||||||
Id int32 // 商品ID
|
Id int32 // 商品ID
|
||||||
Page int32 // 页面 1,金币页面 2,钻石页面 3,道具页面 4,房卡
|
Page int32 // 页面 1,金币页面 2,钻石页面 3,道具页面
|
||||||
Order int32 // 排序 页面内商品的位置排序
|
Order int32 // 排序 页面内商品的位置排序
|
||||||
Location []int32 // 显示位置 第1位,竖版大厅 第2位,Tienlen1级选场 第3位,捕鱼1级选场
|
Location []int32 // 显示位置 第1位,竖版大厅 第2位,Tienlen1级选场 第3位,捕鱼1级选场
|
||||||
Picture string // 图片id
|
Picture string // 图片id
|
||||||
|
@ -44,7 +44,7 @@ type ShopInfo struct {
|
||||||
AdTime int32 // 观看几次广告
|
AdTime int32 // 观看几次广告
|
||||||
RepeatTimes int32 // 领取次数
|
RepeatTimes int32 // 领取次数
|
||||||
CoolingTime []int32 // 观看冷却时间
|
CoolingTime []int32 // 观看冷却时间
|
||||||
Type int32 // 获得类型 1,金币 2,钻石 3,道具类型 4,房卡
|
Type int32 // 获得类型 1,金币 2,钻石 3,道具类型
|
||||||
Amount int64 // 获得数量
|
Amount int64 // 获得数量
|
||||||
AddArea []int32 // 加送百分比(比如加送10%,就配置110)
|
AddArea []int32 // 加送百分比(比如加送10%,就配置110)
|
||||||
ItemId int32 // 获得道具ID
|
ItemId int32 // 获得道具ID
|
||||||
|
|
|
@ -63,8 +63,6 @@ const (
|
||||||
ShopTypeCoin = iota + 1 // 金币
|
ShopTypeCoin = iota + 1 // 金币
|
||||||
ShopTypeDiamond // 钻石
|
ShopTypeDiamond // 钻石
|
||||||
ShopTypeItem // 道具
|
ShopTypeItem // 道具
|
||||||
ShopTypeFangKa // 房卡
|
|
||||||
ShopTypeMax
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 兑换商品状态
|
// 兑换商品状态
|
||||||
|
@ -541,10 +539,10 @@ func (this *ShopMgr) shopAddItem(p *Player, shopInfo *model.ShopInfo, vipShopId
|
||||||
|
|
||||||
// createOrder 保存购买记录
|
// createOrder 保存购买记录
|
||||||
func (this *ShopMgr) createOrder(p *Player, shopInfo *model.ShopInfo, costNum int64, amount [3]int32) {
|
func (this *ShopMgr) createOrder(p *Player, shopInfo *model.ShopInfo, costNum int64, amount [3]int32) {
|
||||||
//if shopInfo.Type < ShopTypeCoin && shopInfo.Type >= ShopTypeMax {
|
if shopInfo.Type < ShopTypeCoin && shopInfo.Type > ShopTypeItem {
|
||||||
// logger.Logger.Errorf("createOrder err: type = %v", shopInfo.Type)
|
logger.Logger.Errorf("createOrder err: type = %v", shopInfo.Type)
|
||||||
// return
|
return
|
||||||
//}
|
}
|
||||||
|
|
||||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||||
dbShop := model.NewDbShop(p.Platform, shopInfo.Page, amount[:], "sys", 0, shopInfo.ConstType, int32(costNum),
|
dbShop := model.NewDbShop(p.Platform, shopInfo.Page, amount[:], "sys", 0, shopInfo.ConstType, int32(costNum),
|
||||||
|
@ -1230,15 +1228,17 @@ func (this *ShopMgr) SendAPICreateOrder(p *Player, ConfigPayId int32, data any,
|
||||||
amount[ShopTypeDiamond-1] = int32(addTotal)
|
amount[ShopTypeDiamond-1] = int32(addTotal)
|
||||||
var itemInfo []model.ItemInfo
|
var itemInfo []model.ItemInfo
|
||||||
var webItemInfo []*webapi_proto.ItemInfo
|
var webItemInfo []*webapi_proto.ItemInfo
|
||||||
for _, info := range shopInfo.GetItems() {
|
if shopInfo.AddItemInfo != nil {
|
||||||
itemInfo = append(itemInfo, model.ItemInfo{
|
for _, info := range shopInfo.AddItemInfo {
|
||||||
ItemId: info.ItemId,
|
itemInfo = append(itemInfo, model.ItemInfo{
|
||||||
ItemNum: info.ItemNum,
|
ItemId: info.ItemId,
|
||||||
})
|
ItemNum: int64(info.ItemNum),
|
||||||
webItemInfo = append(webItemInfo, &webapi_proto.ItemInfo{
|
})
|
||||||
ItemId: info.ItemId,
|
webItemInfo = append(webItemInfo, &webapi_proto.ItemInfo{
|
||||||
ItemNum: info.ItemNum,
|
ItemId: info.ItemId,
|
||||||
})
|
ItemNum: info.ItemNum,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dbShop = this.NewDbShop(p, shopInfo.Page, amount[:], ShopConsumeMoney, costNum,
|
dbShop = this.NewDbShop(p, shopInfo.Page, amount[:], ShopConsumeMoney, costNum,
|
||||||
|
|
Loading…
Reference in New Issue