diff --git a/gamesrv/base/etcd.go b/gamesrv/base/etcd.go index 5452a21..44233f8 100644 --- a/gamesrv/base/etcd.go +++ b/gamesrv/base/etcd.go @@ -9,6 +9,7 @@ import ( "mongo.games.com/game/etcd" "mongo.games.com/game/model" "mongo.games.com/game/protocol/webapi" + "mongo.games.com/game/srvdata" ) var ConfigMgrInst = model.NewConfigMgr() @@ -18,6 +19,8 @@ func init() { etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, platformConfigEtcd) // 游戏配置 etcd.Register(etcd.ETCDKEY_GAME_CONFIG, webapi.GameConfig{}, platformConfigEtcd) + // 道具列表 + etcd.Register(etcd.ETCDKEY_Item, webapi.ItemConfig{}, platformConfigEtcd) // 集卡活动 etcd.Register(etcd.ETCDKEY_ACT_Collect, webapi.WelfareCollectConfig{}, platformConfigEtcd) // 渠道开关 @@ -45,6 +48,9 @@ func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d case *webapi.MachineConfig: ConfigMgrInst.GetConfig(d.Platform).MachineConfig = d + case *webapi.ItemConfig: + ConfigMgrInst.GetConfig(d.Platform).ItemConfig = d + srvdata.GameItemMgr.SetConfig(d) default: logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) } diff --git a/gamesrv/tienlen/scenedata_tienlen.go b/gamesrv/tienlen/scenedata_tienlen.go index 43c0797..cdcb4f3 100644 --- a/gamesrv/tienlen/scenedata_tienlen.go +++ b/gamesrv/tienlen/scenedata_tienlen.go @@ -1964,7 +1964,7 @@ func (this *TienLenSceneData) TrySmallGameBilled() { score = int64(this.roundScore) * int64(baseScore) / 100 //百分比 } losePlayerCoin := losePlayer.GetCoin() - if !this.IsMatchScene() && losePlayerCoin < score { //输完 + if !this.IsMatchScene() && !this.IsCustom() && losePlayerCoin < score { //输完 score = losePlayerCoin } //判断宠物技能生不生效 @@ -1983,7 +1983,7 @@ func (this *TienLenSceneData) TrySmallGameBilled() { gainScore := int64(float64(score) * float64(10000-taxRate) / 10000.0) //税后 bombTaxScore := score - gainScore // win - if this.IsMatchScene() { + if this.IsMatchScene() || this.IsCustom() { winPlayer.AddCoinNoLog(gainScore, 0) } else { winPlayer.AddCoin(gainScore, common.GainWay_CoinSceneWin, 0, "system", this.GetSceneName()) @@ -1997,7 +1997,7 @@ func (this *TienLenSceneData) TrySmallGameBilled() { winPlayer.bombRankScore += rankScore * rule.RankBaseScore } //lose - if this.IsMatchScene() { + if this.IsMatchScene() && this.IsCustom() { losePlayer.AddCoinNoLog(-score, 0) } else { losePlayer.AddCoin(-score, common.GainWay_CoinSceneLost, 0, "system", this.GetSceneName()) diff --git a/protocol/friend/friend.pb.go b/protocol/friend/friend.pb.go index f1d7d53..0c8c056 100644 --- a/protocol/friend/friend.pb.go +++ b/protocol/friend/friend.pb.go @@ -47,6 +47,7 @@ const ( OpResultCode_OPRC_InviteFriend_PosIsError OpResultCode = 1019 //座位不存在 OpResultCode_OPRC_InviteFriend_HadInRoom OpResultCode = 1020 //已在房间中 OpResultCode_OPRC_Friend_NotOpMyself OpResultCode = 1021 //不能操作自己 + OpResultCode_OPRC_InviteFriend_CostNotEnough OpResultCode = 1022 // 房卡不足 ) // Enum value maps for OpResultCode. @@ -75,6 +76,7 @@ var ( 1019: "OPRC_InviteFriend_PosIsError", 1020: "OPRC_InviteFriend_HadInRoom", 1021: "OPRC_Friend_NotOpMyself", + 1022: "OPRC_InviteFriend_CostNotEnough", } OpResultCode_value = map[string]int32{ "OPRC_Sucess": 0, @@ -100,6 +102,7 @@ var ( "OPRC_InviteFriend_PosIsError": 1019, "OPRC_InviteFriend_HadInRoom": 1020, "OPRC_Friend_NotOpMyself": 1021, + "OPRC_InviteFriend_CostNotEnough": 1022, } ) @@ -1726,7 +1729,7 @@ var file_friend_proto_rawDesc = []byte{ 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2a, 0xf3, 0x05, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, + 0x64, 0x2a, 0x99, 0x06, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x46, 0x72, 0x69, 0x65, @@ -1773,41 +1776,43 @@ var file_friend_proto_rawDesc = []byte{ 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x48, 0x61, 0x64, 0x49, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x10, 0xfc, 0x07, 0x12, 0x1c, 0x0a, 0x17, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x4e, 0x6f, 0x74, 0x4f, 0x70, 0x4d, 0x79, - 0x73, 0x65, 0x6c, 0x66, 0x10, 0xfd, 0x07, 0x2a, 0xe9, 0x03, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x41, - 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, - 0x45, 0x54, 0x5f, 0x43, 0x53, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x10, - 0x8c, 0x15, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x10, 0x8d, 0x15, 0x12, 0x16, 0x0a, 0x11, - 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, - 0x70, 0x10, 0x8e, 0x15, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, - 0x43, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, 0x70, 0x10, 0x8f, 0x15, 0x12, 0x20, 0x0a, 0x1b, - 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x6f, 0x67, 0x10, 0x90, 0x15, 0x12, 0x20, - 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x6f, 0x67, 0x10, 0x91, 0x15, - 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x92, 0x15, 0x12, 0x1a, 0x0a, 0x15, + 0x73, 0x65, 0x6c, 0x66, 0x10, 0xfd, 0x07, 0x12, 0x24, 0x0a, 0x1f, 0x4f, 0x50, 0x52, 0x43, 0x5f, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x43, 0x6f, 0x73, + 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xfe, 0x07, 0x2a, 0xe9, 0x03, + 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, + 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x18, + 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x10, 0x8c, 0x15, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, + 0x45, 0x54, 0x5f, 0x53, 0x43, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x10, + 0x8d, 0x15, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, 0x70, 0x10, 0x8e, 0x15, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, + 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, 0x70, 0x10, + 0x8f, 0x15, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x6f, + 0x67, 0x10, 0x90, 0x15, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, + 0x43, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, + 0x4c, 0x6f, 0x67, 0x10, 0x91, 0x15, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, + 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, + 0x92, 0x15, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x93, 0x15, 0x12, 0x1c, + 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, 0x70, 0x10, 0x94, 0x15, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x93, 0x15, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, - 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x4f, 0x70, 0x10, 0x94, 0x15, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, - 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, - 0x70, 0x10, 0x95, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, - 0x43, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, - 0x10, 0x96, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x10, 0x97, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, - 0x46, 0x75, 0x7a, 0x7a, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x10, 0x98, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, - 0x46, 0x75, 0x7a, 0x7a, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x10, 0x99, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x10, 0x9a, 0x15, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, - 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4f, 0x70, 0x10, 0x95, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, + 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, + 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x10, 0x96, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x72, 0x65, + 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x10, 0x97, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x46, 0x75, 0x7a, 0x7a, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x98, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x46, 0x75, 0x7a, 0x7a, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x99, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x9a, 0x15, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, + 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protocol/friend/friend.proto b/protocol/friend/friend.proto index 2c66cf2..ddf2284 100644 --- a/protocol/friend/friend.proto +++ b/protocol/friend/friend.proto @@ -27,6 +27,7 @@ enum OpResultCode { OPRC_InviteFriend_PosIsError = 1019; //座位不存在 OPRC_InviteFriend_HadInRoom = 1020; //已在房间中 OPRC_Friend_NotOpMyself = 1021; //不能操作自己 + OPRC_InviteFriend_CostNotEnough = 1022; // 房卡不足 } //好友数据消息id diff --git a/worldsrv/action_friend.go b/worldsrv/action_friend.go index db3bcc2..d9861e7 100644 --- a/worldsrv/action_friend.go +++ b/worldsrv/action_friend.go @@ -501,6 +501,17 @@ func (this *CSInviteFriendOpHandler) Process(s *netlib.Session, packetid int, da } } + // 房费是否充足 + if scene.IsCustom() { + cfg := PlatformMgrSingleton.GetConfig(p.Platform).RoomConfig[scene.RoomConfigId] + if scene.CostType == 1 && !scene.sp.CostEnough(int(scene.CostType), scene.playerNum, cfg, p) { + logger.Logger.Trace("CSInviteFriendHandler cost error") + opRetCode = friend.OpResultCode_OPRC_InviteFriend_CostNotEnough + send(p) + return nil + } + } + sp := GetScenePolicy(scene.gameId, scene.gameMode) if sp == nil { logger.Logger.Warn("CSInviteFriendHandler game not exist") diff --git a/worldsrv/action_game.go b/worldsrv/action_game.go index fbc7795..360feeb 100644 --- a/worldsrv/action_game.go +++ b/worldsrv/action_game.go @@ -1344,7 +1344,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{ return nil } - if cfg.GetCostType() == 2 { + if costType == 2 { sp.CostPayment(scene, p) } diff --git a/worldsrv/scenepolicydata.go b/worldsrv/scenepolicydata.go index db5642d..da9f6f3 100644 --- a/worldsrv/scenepolicydata.go +++ b/worldsrv/scenepolicydata.go @@ -142,7 +142,7 @@ func (spd *ScenePolicyData) CostPayment(s *Scene, p *Player) bool { if roomConfig == nil { return false } - return spd.costEnough(int(roomConfig.GetCostType()), s.playerNum, roomConfig, p.SnId, func(items []*model.Item) { + return spd.costEnough(int(s.GetCostType()), s.playerNum, roomConfig, p.SnId, func(items []*model.Item) { for _, v := range items { v.ItemNum = -v.ItemNum } @@ -166,7 +166,7 @@ func (spd *ScenePolicyData) GiveCostPayment(s *Scene, snid int32) bool { return false } - if roomConfig.GetCostType() != 1 { // 只有房主付费才有返还 + if s.GetCostType() != 2 { // 只有房主付费才有返还 return false } 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