Compare commits
26 Commits
d62a57375e
...
365ba5edc8
| Author | SHA1 | Date |
|---|---|---|
|
|
365ba5edc8 | |
|
|
05a9c79dc1 | |
|
|
d9d78d2f13 | |
|
|
ff7452d335 | |
|
|
4d30e087c6 | |
|
|
24dd497af4 | |
|
|
f2497b77d3 | |
|
|
8e156dba18 | |
|
|
7d7f5804f1 | |
|
|
9cc5d30032 | |
|
|
be57df77a1 | |
|
|
02dded9b9a | |
|
|
3c51f2794d | |
|
|
fafc946f75 | |
|
|
d82822c990 | |
|
|
d3642c93e4 | |
|
|
7e8ceebbf7 | |
|
|
5c4e4d0f4a | |
|
|
2925465b41 | |
|
|
999eea0766 | |
|
|
7dd1a191ea | |
|
|
2206eba159 | |
|
|
e479b2e6fd | |
|
|
692cf306f5 | |
|
|
70d051d938 | |
|
|
e7e08755a4 |
|
|
@ -314,8 +314,10 @@ const (
|
|||
GainWayRoomCost = 106 //房费消耗
|
||||
GainWayRoomGain = 107 //房卡场获得
|
||||
GainWayItemShop = 108 // 交易市场道具交易
|
||||
GainWayClawdoorCostItem = 109 // 娃娃机上分扣道具
|
||||
GainWayItemChangeDoll = 110 // 道具兑换娃娃
|
||||
GainWayClawdollCostItem = 109 // 娃娃机上分扣道具
|
||||
GainWayItemShopChangeDoll = 110 // 商城兑换娃娃
|
||||
GainWayItemBagChangeDoll = 111 // 背包内兑换娃娃
|
||||
GainWayClawdollCatch = 112 // 娃娃机抓取到娃娃获取卡
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
|
@ -566,7 +568,6 @@ const (
|
|||
ItemIDVCard = 30001 // v卡
|
||||
ItemIDJCard = 30002 // 金券
|
||||
ItemDiamondScore = 100012 //钻石积分
|
||||
ItemDollCard = 40004 // 娃娃卡积分
|
||||
)
|
||||
|
||||
func ToItemId(id int32) int32 {
|
||||
|
|
@ -596,7 +597,6 @@ const (
|
|||
ItemTypeExpireTime = 15 // 时效类道具
|
||||
ItemTypeObjective = 16 // 目标类道具
|
||||
ItemTypeChange = 17 // 兑换话费
|
||||
ItemTypeMachine = 18 //娃娃兑换
|
||||
ItemTypeSkinChip = 22 // 皮肤碎片
|
||||
)
|
||||
|
||||
|
|
@ -851,9 +851,3 @@ type NotifyType int // 通知类型
|
|||
const (
|
||||
NotifyPrivateRoomList NotifyType = 1 // 私人房间列表
|
||||
)
|
||||
|
||||
// SCPlayerCoinChange 中数值类型
|
||||
const (
|
||||
PlayerChangeTypeCoin = 0 // 金币
|
||||
PlayerChangeTypeNum = 1 // 积分
|
||||
)
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
|
@ -0,0 +1,73 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"net/rpc"
|
||||
)
|
||||
|
||||
func DbBagChangeDollLogCollection(plt string) *mongo.Collection {
|
||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.BagChangeDollLogDBName)
|
||||
if s != nil {
|
||||
dollRec, first := s.DB().C(model.BagChangeDollLogCollName)
|
||||
if first {
|
||||
dollRec.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
}
|
||||
return dollRec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DbBagChangeDollLogSvc struct {
|
||||
}
|
||||
|
||||
func (svc *DbBagChangeDollLogSvc) InsertDbBagChangeDollLog(args *model.DbBagChangeDollLogArgs, ret *bool) (err error) {
|
||||
clog := DbBagChangeDollLogCollection(args.Log.Platform)
|
||||
if clog == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("DbBagChangeDollLogSvc.InsertDbBagChangeDollLog")
|
||||
err = clog.Insert(args.Log)
|
||||
if err != nil {
|
||||
logger.Logger.Error("DbBagChangeDollLogSvc.InsertDbBagChangeDollLog error:", err)
|
||||
return
|
||||
}
|
||||
*ret = true
|
||||
return
|
||||
}
|
||||
func (svc *DbBagChangeDollLogSvc) GetDbBagChangeDollLog(args *model.DbBagChangeDollLogArgs, dollLog *[]*model.BagChangeDollLog) (err error) {
|
||||
clog := DbBagChangeDollLogCollection(args.Log.Platform)
|
||||
if clog == nil {
|
||||
logger.Logger.Error("GetDbBagChangeDollLog == nil")
|
||||
return nil
|
||||
}
|
||||
logger.Logger.Trace("DbBagChangeDollLogSvc.GetDbBagChangeDollLog")
|
||||
err = clog.Find(bson.M{"snid": args.Log.Snid}).All(dollLog)
|
||||
if err != nil {
|
||||
logger.Logger.Error("DbBagChangeDollLogSvc.GetDbBagChangeDollLog error:", err)
|
||||
return nil
|
||||
}
|
||||
return
|
||||
}
|
||||
func (svc *DbBagChangeDollLogSvc) UpdateDbShopState(args *model.DbBagChangeDollLogArgs, ret *bool) (err error) {
|
||||
clog := DbBagChangeDollLogCollection(args.Log.Platform)
|
||||
if clog == nil {
|
||||
logger.Logger.Error("UpdateDbShopState == nil")
|
||||
return nil
|
||||
}
|
||||
logger.Logger.Trace("DbBagChangeDollLogSvc.UpdateDbShopState")
|
||||
err = clog.UpdateId(args.Log.LogId, bson.M{"$set": bson.M{"state": args.Log.State}})
|
||||
if err != nil {
|
||||
logger.Logger.Error("DbBagChangeDollLogSvc.UpdateDbShopState error:", err)
|
||||
return nil
|
||||
}
|
||||
*ret = true
|
||||
return
|
||||
}
|
||||
|
||||
func init() {
|
||||
rpc.Register(new(DbBagChangeDollLogSvc))
|
||||
}
|
||||
|
|
@ -113,6 +113,17 @@ func (svc *ItemLogSvc) UpdateState(req *model.UpdateParam, res *model.UpdateRes)
|
|||
return err
|
||||
}
|
||||
|
||||
func (svc *ItemLogSvc) GetClawdollItemLog(args *model.ClawdollItemLogReq, ret *[]model.CoinWAL) (err error) {
|
||||
cond := bson.M{"snid": args.Snid, "typeid": common.GainWayClawdollCostItem}
|
||||
c := ItemLogsCollection(args.Platform)
|
||||
if c == nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = c.Find(cond).All(&ret)
|
||||
return
|
||||
}
|
||||
|
||||
func init() {
|
||||
rpc.Register(new(ItemLogSvc))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,5 +75,7 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
ClawDoorItemID = 40003
|
||||
ClawDollItemID = 40003
|
||||
ClawDollGiveItemID = 74004
|
||||
ClawDollCostItemCount = 2
|
||||
)
|
||||
|
|
|
|||
|
|
@ -73,12 +73,19 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
|||
return nil
|
||||
}
|
||||
|
||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch msg.TypeId {
|
||||
case 1:
|
||||
logger.Logger.Tracef("ClawDoll OnPlayerOp payCoin response, SnId= %v", p.SnId)
|
||||
if msg.Result == 1 {
|
||||
logger.Logger.Tracef("上分成功!!!!!!!!!!!!snid = %v", msg.Snid)
|
||||
|
||||
playerEx.CostPlayCoin(2)
|
||||
|
||||
sceneEx.playingSnid = p.SnId
|
||||
|
||||
//发送向前移动指令
|
||||
|
|
@ -99,6 +106,9 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
|||
case 2:
|
||||
if msg.Result == 1 {
|
||||
// 获得娃娃卡
|
||||
|
||||
playerEx.CatchCardClawdoll(1)
|
||||
|
||||
logger.Logger.Tracef("下抓成功!!!!!!!!!!!!snid = %v", msg.Snid)
|
||||
} else {
|
||||
logger.Logger.Tracef("下抓失败!!!!!!!!!!!!snid = %v", msg.Snid)
|
||||
|
|
@ -179,6 +189,52 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf
|
|||
return nil
|
||||
}
|
||||
|
||||
type CSDollConfigPacketFactory struct {
|
||||
}
|
||||
|
||||
type CSDollConfigHandler struct {
|
||||
}
|
||||
|
||||
func (f *CSDollConfigPacketFactory) CreatePacket() interface{} {
|
||||
pack := &clawdoll.CSCLAWDOLLConfig{}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (h *CSDollConfigHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSDollConfigHandler")
|
||||
if _, ok := data.(*clawdoll.CSCLAWDOLLConfig); ok {
|
||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warn("CSDollConfigHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
scene := p.GetScene()
|
||||
if scene == nil {
|
||||
return nil
|
||||
}
|
||||
sceneEx, ok := scene.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
machineId := scene.GetDBGameFree().GetId() % 6080000
|
||||
machineInfo := sceneEx.GetMachineServerInfo(machineId, p.Platform)
|
||||
if machineInfo == nil {
|
||||
logger.Logger.Warn("CSDollConfigHandler machineId = %v not found", machineId)
|
||||
return nil
|
||||
}
|
||||
pack := &clawdoll.SCCLAWDOLLConfig{
|
||||
IconAddr: machineInfo.IconAddr,
|
||||
CostItemNum: machineInfo.CostItemNum,
|
||||
ItemId: machineInfo.ItemId,
|
||||
ItemNum: machineInfo.ItemNum,
|
||||
GameId: scene.GetDBGameFree().GetId(),
|
||||
}
|
||||
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_DollConfig), pack)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func init() {
|
||||
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{})
|
||||
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{})
|
||||
|
|
@ -186,4 +242,7 @@ func init() {
|
|||
//客户端请求token
|
||||
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenHandler{})
|
||||
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenPacketFactory{})
|
||||
//客户端请求配置信息
|
||||
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_DollConfig), &CSDollConfigHandler{})
|
||||
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_DollConfig), &CSDollConfigPacketFactory{})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
|
|||
// 能否投币
|
||||
func (this *PlayerEx) CanPayCoin() bool {
|
||||
|
||||
itemID := int32(rule.ClawDoorItemID)
|
||||
itemID := int32(rule.ClawDollItemID)
|
||||
itemCount := this.GetItemCount(itemID)
|
||||
if itemCount < 1 {
|
||||
return true
|
||||
if itemCount < rule.ClawDollCostItemCount {
|
||||
return false
|
||||
}
|
||||
|
||||
itemData := srvdata.GameItemMgr.Get(this.Platform, itemID)
|
||||
|
|
@ -70,11 +70,11 @@ func (this *PlayerEx) CostPlayCoin(count int32) bool {
|
|||
|
||||
var items []*model.Item
|
||||
|
||||
itemData := srvdata.GameItemMgr.Get(this.Platform, rule.ClawDoorItemID)
|
||||
itemData := srvdata.GameItemMgr.Get(this.Platform, rule.ClawDollItemID)
|
||||
if itemData != nil {
|
||||
items = append(items, &model.Item{
|
||||
ItemId: rule.ClawDoorItemID,
|
||||
ItemNum: -1,
|
||||
ItemId: rule.ClawDollItemID,
|
||||
ItemNum: int64(count),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ func (this *PlayerEx) CostPlayCoin(count int32) bool {
|
|||
this.AddItems(&model.AddItemParam{
|
||||
P: this.PlayerData,
|
||||
Change: items,
|
||||
GainWay: common.GainWayClawdoorCostItem,
|
||||
GainWay: common.GainWayClawdollCostItem,
|
||||
Operator: "system",
|
||||
Remark: "娃娃机上分扣除道具",
|
||||
GameId: int64(sceneEx.GameId),
|
||||
|
|
@ -102,6 +102,42 @@ func (this *PlayerEx) CostPlayCoin(count int32) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// 抓取到娃娃获得娃娃
|
||||
func (this *PlayerEx) CatchCardClawdoll(count int32) bool {
|
||||
var items []*model.Item
|
||||
|
||||
itemData := srvdata.GameItemMgr.Get(this.Platform, rule.ClawDollGiveItemID)
|
||||
if itemData != nil {
|
||||
items = append(items, &model.Item{
|
||||
ItemId: rule.ClawDollGiveItemID,
|
||||
ItemNum: int64(count),
|
||||
})
|
||||
}
|
||||
|
||||
s := this.GetScene()
|
||||
if s == nil {
|
||||
logger.Logger.Warn("CatchCardClawdoll p.scene == nil")
|
||||
return false
|
||||
}
|
||||
|
||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
this.AddItems(&model.AddItemParam{
|
||||
P: this.PlayerData,
|
||||
Change: items,
|
||||
GainWay: common.GainWayClawdollCatch,
|
||||
Operator: "system",
|
||||
Remark: "娃娃机抓取到娃娃获得娃娃卡",
|
||||
GameId: int64(sceneEx.GameId),
|
||||
GameFreeId: int64(sceneEx.GetGameFreeId()),
|
||||
})
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// 能否移动
|
||||
func (this *PlayerEx) CanMove() bool {
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ func init() {
|
|||
if err != nil {
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "数据序列化失败"
|
||||
return common.ResponseTag_ParamError, pack
|
||||
return common.ResponseTag_Ok, pack
|
||||
}
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ func init() {
|
|||
if scene == nil || scene.ExtraData == nil {
|
||||
pack.Tag = webapiproto.TagCode_NotFound
|
||||
pack.Msg = "房间没找到"
|
||||
return common.ResponseTag_NoFindRoom, pack
|
||||
return common.ResponseTag_Ok, pack
|
||||
}
|
||||
|
||||
switch d := scene.ExtraData.(type) {
|
||||
|
|
@ -145,6 +145,6 @@ func init() {
|
|||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "未实现"
|
||||
}
|
||||
return common.ResponseTag_NoData, pack
|
||||
return common.ResponseTag_Ok, pack
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
var platform string
|
||||
var platform, appChannel, channelId string
|
||||
var snid int32
|
||||
var createTs int64
|
||||
var p *model.PlayerData
|
||||
|
|
@ -44,6 +44,8 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
|||
platform = p.Platform
|
||||
snid = p.SnId
|
||||
createTs = p.CreateTime.Unix()
|
||||
appChannel = p.Channel
|
||||
channelId = p.ChannelId
|
||||
}
|
||||
|
||||
//LogChannelSingleton.WriteLog(&model.ClientLog{
|
||||
|
|
@ -54,11 +56,13 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
|||
//})
|
||||
|
||||
LogChannelSingleton.WriteLog(&model.ClientLogMysql{
|
||||
Data: msg.GetData(),
|
||||
Platform: platform,
|
||||
Snid: snid,
|
||||
Ts: time.Now().Unix(),
|
||||
CreateTs: createTs,
|
||||
Data: msg.GetData(),
|
||||
Platform: platform,
|
||||
Snid: snid,
|
||||
Ts: time.Now().Unix(),
|
||||
CreateTs: createTs,
|
||||
AppChannel: appChannel,
|
||||
ChannelId: channelId,
|
||||
})
|
||||
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"net/http"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/admin"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
|
@ -15,9 +17,11 @@ import (
|
|||
"mongo.games.com/goserver/core/transact"
|
||||
"mongo.games.com/goserver/core/utils"
|
||||
"mongo.games.com/goserver/srvlib"
|
||||
"net/http"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -173,10 +177,16 @@ func init() {
|
|||
}),
|
||||
OnChildRespWrapper: transact.OnChildRespWrapper(func(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int, ud interface{}) transact.TransExeResult {
|
||||
logger.Logger.Tracef("GameSrvApi OnChildRespWrapper %v:%v", hChild, ud)
|
||||
if retCode == common.ResponseTag_Ok {
|
||||
tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud)
|
||||
if v, ok := ud.([]byte); ok {
|
||||
var msg webapi.SARoomInfo
|
||||
err := proto.Unmarshal(netlib.SkipHeaderGetRaw(v), &msg)
|
||||
if err == nil && msg.GetTag() == webapi.TagCode_SUCCESS {
|
||||
tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud)
|
||||
} else if err != nil {
|
||||
logger.Logger.Errorf("GameSrvApi OnChildRespWrapper unmarshal err %v", err)
|
||||
}
|
||||
}
|
||||
return transact.TransExeResult_Success
|
||||
return transact.TransExeResult(retCode)
|
||||
}),
|
||||
})
|
||||
// 对局详情
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"time"
|
||||
)
|
||||
|
||||
type BagChangeDollLog struct {
|
||||
LogId bson.ObjectId `bson:"_id"`
|
||||
Platform string //平台
|
||||
Snid int32 //用户id
|
||||
ItemId int32
|
||||
ItemNum int32
|
||||
UserName string //姓名
|
||||
UserTel string //手机号
|
||||
Addr string //地址
|
||||
State int32 //状态 0.默认 1.成功 2.失败 3.未发货准备发货
|
||||
Remark string //备注信息
|
||||
CreateTs int64 //订单生成时间
|
||||
OpTs int64 //订单最后操作时间
|
||||
Ts int64
|
||||
}
|
||||
|
||||
var (
|
||||
BagChangeDollLogDBName = "log"
|
||||
BagChangeDollLogCollName = "log_bagChangeDoll"
|
||||
)
|
||||
|
||||
type DbBagChangeDollLogArgs struct {
|
||||
Log *BagChangeDollLog
|
||||
}
|
||||
|
||||
func NewDbBagChangeDoll(platform string, snid, itemId, itemNum int32, state int32, remark string, addr string, userName string, userTel string) *BagChangeDollLog {
|
||||
t := time.Now()
|
||||
return &BagChangeDollLog{
|
||||
LogId: bson.NewObjectId(),
|
||||
Platform: platform,
|
||||
Snid: snid,
|
||||
ItemId: itemId,
|
||||
ItemNum: itemNum,
|
||||
State: state,
|
||||
UserName: userName,
|
||||
UserTel: userTel,
|
||||
Addr: addr,
|
||||
Remark: remark,
|
||||
CreateTs: t.Unix(),
|
||||
OpTs: t.Unix(),
|
||||
Ts: t.Unix(),
|
||||
}
|
||||
}
|
||||
func InsertDbBagChangeDollLog(log *BagChangeDollLog) (err error) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.InsertDbBagChangeDollLog rpcCli == nil")
|
||||
return
|
||||
}
|
||||
var ret bool
|
||||
args := &DbBagChangeDollLogArgs{
|
||||
Log: log,
|
||||
}
|
||||
err = rpcCli.CallWithTimeout("DbBagChangeDollLogSvc.InsertDbBagChangeDollLog", args, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Warn("InsertDbBagChangeDollLog error:", err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
func GetDbBagChangeDollLog(platform string, snid int32) []*BagChangeDollLog {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.GetDbBagChangeDollLog rpcCli == nil")
|
||||
return nil
|
||||
}
|
||||
var ret []*BagChangeDollLog
|
||||
args := &DbBagChangeDollLogArgs{
|
||||
Log: &BagChangeDollLog{Snid: snid, Platform: platform},
|
||||
}
|
||||
err := rpcCli.CallWithTimeout("DbBagChangeDollLogSvc.GetDbBagChangeDollLog", args, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Warn("GetDbBagChangeDollLog error:", err)
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
|
@ -7,11 +7,13 @@ var (
|
|||
)
|
||||
|
||||
type ClientLog struct {
|
||||
Data string // 客户端数据,json格式
|
||||
Platform string // 平台id
|
||||
Snid int32 // 玩家id
|
||||
Ts int64 // 时间戳
|
||||
CreateTs int64 // 注册时间
|
||||
Data string // 客户端数据,json格式
|
||||
Platform string // 平台id
|
||||
Snid int32 // 玩家id
|
||||
Ts int64 // 时间戳
|
||||
CreateTs int64 // 注册时间
|
||||
AppChannel string // 注册时的包渠道
|
||||
ChannelId string // 推广渠道
|
||||
}
|
||||
|
||||
type CustomData struct {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
var (
|
||||
ItemLogDBName = "log"
|
||||
ItemLogCollName = "log_itemlog"
|
||||
ClawDollItemIds = []int32{40003, 40004, 80001, 80002}
|
||||
)
|
||||
|
||||
type ItemLog struct {
|
||||
|
|
@ -118,3 +119,37 @@ func UpdateItemState(param *UpdateParam) error {
|
|||
|
||||
return err
|
||||
}
|
||||
|
||||
type ClawdollItemLogReq struct {
|
||||
Platform string
|
||||
Snid int32 // 玩家id
|
||||
ItemIds []int32 // 道具id
|
||||
}
|
||||
|
||||
func GetClawdollItemLog(plt string, snid int32) (logs []ItemLog, err error) {
|
||||
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.GetClawdollItemLog rpcCli == nil")
|
||||
return
|
||||
}
|
||||
|
||||
args := &ClawdollItemLogReq{
|
||||
Platform: plt,
|
||||
Snid: snid,
|
||||
}
|
||||
|
||||
args.ItemIds = append(args.ItemIds, ClawDollItemIds...)
|
||||
|
||||
var ret []ItemLog
|
||||
|
||||
//var ret ClawdollItemLogRet
|
||||
err = rpcCli.CallWithTimeout("ItemLogSvc.GetClawdollItemLog", args, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Warnf("GetClawdollItemLog err:%v", err)
|
||||
return
|
||||
}
|
||||
|
||||
logs = ret
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,8 +96,12 @@ const (
|
|||
SPacketID_PACKET_SC_ITEM_EXCHANGE_RES SPacketID = 2533 //背包道具兑换返回
|
||||
SPacketID_PACKET_ALL_BAG_END SPacketID = 2549 //最大消息号
|
||||
//3000~3099
|
||||
SPacketID_PACKET_PropExchange SPacketID = 3000 // 道具兑换
|
||||
SPacketID_PACKET_ExchangeList SPacketID = 3001 // 兑换列表
|
||||
SPacketID_PACKET_PropExchange SPacketID = 3000 // 道具兑换
|
||||
SPacketID_PACKET_ExchangeList SPacketID = 3001 // 兑换列表
|
||||
SPacketID_PACKET_CS_DollChange SPacketID = 3002 //娃娃卡兑换
|
||||
SPacketID_PACKET_SC_DollChange SPacketID = 3003 //娃娃卡兑换返回
|
||||
SPacketID_PACKET_CS_DollChangeLog SPacketID = 3004 //娃娃卡兑换记录
|
||||
SPacketID_PACKET_SC_DollChangeLog SPacketID = 3005 //娃娃卡兑换记录返回
|
||||
)
|
||||
|
||||
// Enum value maps for SPacketID.
|
||||
|
|
@ -111,6 +115,10 @@ var (
|
|||
2549: "PACKET_ALL_BAG_END",
|
||||
3000: "PACKET_PropExchange",
|
||||
3001: "PACKET_ExchangeList",
|
||||
3002: "PACKET_CS_DollChange",
|
||||
3003: "PACKET_SC_DollChange",
|
||||
3004: "PACKET_CS_DollChangeLog",
|
||||
3005: "PACKET_SC_DollChangeLog",
|
||||
}
|
||||
SPacketID_value = map[string]int32{
|
||||
"PACKET_BAG_ZERO": 0,
|
||||
|
|
@ -121,6 +129,10 @@ var (
|
|||
"PACKET_ALL_BAG_END": 2549,
|
||||
"PACKET_PropExchange": 3000,
|
||||
"PACKET_ExchangeList": 3001,
|
||||
"PACKET_CS_DollChange": 3002,
|
||||
"PACKET_SC_DollChange": 3003,
|
||||
"PACKET_CS_DollChangeLog": 3004,
|
||||
"PACKET_SC_DollChangeLog": 3005,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -972,6 +984,326 @@ func (x *SCExchangeList) GetTp() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
//娃娃卡兑换
|
||||
//PACKET_CS_DollChange
|
||||
type CSDollChange struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Items []*PropInfo `protobuf:"bytes,1,rep,name=Items,proto3" json:"Items,omitempty"`
|
||||
UserName string `protobuf:"bytes,2,opt,name=UserName,proto3" json:"UserName,omitempty"` //姓名
|
||||
UserTel string `protobuf:"bytes,3,opt,name=UserTel,proto3" json:"UserTel,omitempty"` //电话
|
||||
Addr string `protobuf:"bytes,4,opt,name=Addr,proto3" json:"Addr,omitempty"` //地址
|
||||
}
|
||||
|
||||
func (x *CSDollChange) Reset() {
|
||||
*x = CSDollChange{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSDollChange) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSDollChange) ProtoMessage() {}
|
||||
|
||||
func (x *CSDollChange) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CSDollChange.ProtoReflect.Descriptor instead.
|
||||
func (*CSDollChange) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *CSDollChange) GetItems() []*PropInfo {
|
||||
if x != nil {
|
||||
return x.Items
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CSDollChange) GetUserName() string {
|
||||
if x != nil {
|
||||
return x.UserName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CSDollChange) GetUserTel() string {
|
||||
if x != nil {
|
||||
return x.UserTel
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CSDollChange) GetAddr() string {
|
||||
if x != nil {
|
||||
return x.Addr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
//PACKET_SC_DollChange
|
||||
type SCDollChange struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RetCode OpResultCode `protobuf:"varint,1,opt,name=RetCode,proto3,enum=bag.OpResultCode" json:"RetCode,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCDollChange) Reset() {
|
||||
*x = SCDollChange{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCDollChange) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCDollChange) ProtoMessage() {}
|
||||
|
||||
func (x *SCDollChange) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SCDollChange.ProtoReflect.Descriptor instead.
|
||||
func (*SCDollChange) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *SCDollChange) GetRetCode() OpResultCode {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
}
|
||||
return OpResultCode_OPRC_Sucess
|
||||
}
|
||||
|
||||
//娃娃卡兑换记录
|
||||
//PACKET_CS_DollChangeLog
|
||||
type CSDollChangeLog struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *CSDollChangeLog) Reset() {
|
||||
*x = CSDollChangeLog{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSDollChangeLog) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSDollChangeLog) ProtoMessage() {}
|
||||
|
||||
func (x *CSDollChangeLog) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CSDollChangeLog.ProtoReflect.Descriptor instead.
|
||||
func (*CSDollChangeLog) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
//PACKET_SC_DollChangeLog
|
||||
type SCDillChangeLog struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info []*DillChangeLogInfo `protobuf:"bytes,1,rep,name=Info,proto3" json:"Info,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCDillChangeLog) Reset() {
|
||||
*x = SCDillChangeLog{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCDillChangeLog) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCDillChangeLog) ProtoMessage() {}
|
||||
|
||||
func (x *SCDillChangeLog) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[16]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SCDillChangeLog.ProtoReflect.Descriptor instead.
|
||||
func (*SCDillChangeLog) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
func (x *SCDillChangeLog) GetInfo() []*DillChangeLogInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DillChangeLogInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ItemId int32 `protobuf:"varint,1,opt,name=ItemId,proto3" json:"ItemId,omitempty"`
|
||||
ItemNum int32 `protobuf:"varint,2,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"`
|
||||
State int32 `protobuf:"varint,3,opt,name=State,proto3" json:"State,omitempty"`
|
||||
UserName string `protobuf:"bytes,4,opt,name=UserName,proto3" json:"UserName,omitempty"`
|
||||
UserTel string `protobuf:"bytes,5,opt,name=UserTel,proto3" json:"UserTel,omitempty"`
|
||||
Addr string `protobuf:"bytes,6,opt,name=Addr,proto3" json:"Addr,omitempty"`
|
||||
CreateTs string `protobuf:"bytes,7,opt,name=CreateTs,proto3" json:"CreateTs,omitempty"`
|
||||
OpTs string `protobuf:"bytes,8,opt,name=OpTs,proto3" json:"OpTs,omitempty"`
|
||||
Remark string `protobuf:"bytes,9,opt,name=Remark,proto3" json:"Remark,omitempty"` //备注信息
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) Reset() {
|
||||
*x = DillChangeLogInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DillChangeLogInfo) ProtoMessage() {}
|
||||
|
||||
func (x *DillChangeLogInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[17]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DillChangeLogInfo.ProtoReflect.Descriptor instead.
|
||||
func (*DillChangeLogInfo) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetItemId() int32 {
|
||||
if x != nil {
|
||||
return x.ItemId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetItemNum() int32 {
|
||||
if x != nil {
|
||||
return x.ItemNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetState() int32 {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetUserName() string {
|
||||
if x != nil {
|
||||
return x.UserName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetUserTel() string {
|
||||
if x != nil {
|
||||
return x.UserTel
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetAddr() string {
|
||||
if x != nil {
|
||||
return x.Addr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetCreateTs() string {
|
||||
if x != nil {
|
||||
return x.CreateTs
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetOpTs() string {
|
||||
if x != nil {
|
||||
return x.OpTs
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DillChangeLogInfo) GetRemark() string {
|
||||
if x != nil {
|
||||
return x.Remark
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_bag_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_bag_proto_rawDesc = []byte{
|
||||
|
|
@ -1057,31 +1389,70 @@ var file_bag_proto_rawDesc = []byte{
|
|||
0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61,
|
||||
0x67, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x54, 0x70, 0x2a, 0x99, 0x01, 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, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x55, 0x73, 0x65, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x49, 0x64, 0x45, 0x72, 0x72, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x44, 0x62, 0x45, 0x72, 0x72, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x42, 0x61, 0x67, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x52,
|
||||
0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x06, 0x12, 0x12, 0x0a,
|
||||
0x0e, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10,
|
||||
0x07, 0x2a, 0xde, 0x01, 0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12,
|
||||
0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x5a, 0x45,
|
||||
0x52, 0x4f, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41,
|
||||
0x4c, 0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe2, 0x13, 0x12, 0x17,
|
||||
0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x41, 0x47,
|
||||
0x5f, 0x55, 0x53, 0x45, 0x10, 0xe3, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x42, 0x41, 0x47, 0x44, 0x41, 0x54, 0x41,
|
||||
0x10, 0xe4, 0x13, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x5f, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x52,
|
||||
0x45, 0x53, 0x10, 0xe5, 0x13, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0xf5, 0x13, 0x12, 0x18,
|
||||
0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x72, 0x6f, 0x70, 0x45, 0x78, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xb8, 0x17, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10,
|
||||
0xb9, 0x17, 0x42, 0x23, 0x5a, 0x21, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65,
|
||||
0x05, 0x52, 0x02, 0x54, 0x70, 0x22, 0x7d, 0x0a, 0x0c, 0x43, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73,
|
||||
0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73,
|
||||
0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65,
|
||||
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x41, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x41, 0x64, 0x64, 0x72, 0x22, 0x3b, 0x0a, 0x0c, 0x53, 0x43, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x4f, 0x70, 0x52, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x4c, 0x6f, 0x67, 0x22, 0x3d, 0x0a, 0x0f, 0x53, 0x43, 0x44, 0x69, 0x6c, 0x6c, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x67, 0x12, 0x2a, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x44, 0x69, 0x6c, 0x6c,
|
||||
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49,
|
||||
0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x41, 0x64, 0x64, 0x72, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x4f, 0x70, 0x54, 0x73, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4f, 0x70, 0x54, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x52,
|
||||
0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d,
|
||||
0x61, 0x72, 0x6b, 0x2a, 0x99, 0x01, 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, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x55, 0x73,
|
||||
0x65, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x49, 0x64,
|
||||
0x45, 0x72, 0x72, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x62,
|
||||
0x45, 0x72, 0x72, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x42, 0x61,
|
||||
0x67, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x4e, 0x6f, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x4f,
|
||||
0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x07, 0x2a,
|
||||
0xd0, 0x02, 0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x5a, 0x45, 0x52, 0x4f,
|
||||
0x10, 0x00, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c,
|
||||
0x5f, 0x42, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe2, 0x13, 0x12, 0x17, 0x0a, 0x12,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x55,
|
||||
0x53, 0x45, 0x10, 0xe3, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x42, 0x41, 0x47, 0x44, 0x41, 0x54, 0x41, 0x10, 0xe4,
|
||||
0x13, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x49,
|
||||
0x54, 0x45, 0x4d, 0x5f, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x53,
|
||||
0x10, 0xe5, 0x13, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c,
|
||||
0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0xf5, 0x13, 0x12, 0x18, 0x0a, 0x13,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x72, 0x6f, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x10, 0xb8, 0x17, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xb9, 0x17,
|
||||
0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x44, 0x6f,
|
||||
0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xba, 0x17, 0x12, 0x19, 0x0a, 0x14, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x10, 0xbb, 0x17, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x43, 0x53, 0x5f, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f,
|
||||
0x67, 0x10, 0xbc, 0x17, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x5f, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x67, 0x10,
|
||||
0xbd, 0x17, 0x42, 0x23, 0x5a, 0x21, 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, 0x62, 0x61, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
|
@ -1099,7 +1470,7 @@ func file_bag_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_bag_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_bag_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_bag_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
||||
var file_bag_proto_goTypes = []interface{}{
|
||||
(OpResultCode)(0), // 0: bag.OpResultCode
|
||||
(SPacketID)(0), // 1: bag.SPacketID
|
||||
|
|
@ -1116,6 +1487,11 @@ var file_bag_proto_goTypes = []interface{}{
|
|||
(*ExchangeInfo)(nil), // 12: bag.ExchangeInfo
|
||||
(*CSExchangeList)(nil), // 13: bag.CSExchangeList
|
||||
(*SCExchangeList)(nil), // 14: bag.SCExchangeList
|
||||
(*CSDollChange)(nil), // 15: bag.CSDollChange
|
||||
(*SCDollChange)(nil), // 16: bag.SCDollChange
|
||||
(*CSDollChangeLog)(nil), // 17: bag.CSDollChangeLog
|
||||
(*SCDillChangeLog)(nil), // 18: bag.SCDillChangeLog
|
||||
(*DillChangeLogInfo)(nil), // 19: bag.DillChangeLogInfo
|
||||
}
|
||||
var file_bag_proto_depIdxs = []int32{
|
||||
0, // 0: bag.SCBagInfo.RetCode:type_name -> bag.OpResultCode
|
||||
|
|
@ -1130,11 +1506,14 @@ var file_bag_proto_depIdxs = []int32{
|
|||
9, // 9: bag.ExchangeInfo.CostItems:type_name -> bag.PropInfo
|
||||
9, // 10: bag.ExchangeInfo.GainItems:type_name -> bag.PropInfo
|
||||
12, // 11: bag.SCExchangeList.Infos:type_name -> bag.ExchangeInfo
|
||||
12, // [12:12] is the sub-list for method output_type
|
||||
12, // [12:12] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension type_name
|
||||
12, // [12:12] is the sub-list for extension extendee
|
||||
0, // [0:12] is the sub-list for field type_name
|
||||
9, // 12: bag.CSDollChange.Items:type_name -> bag.PropInfo
|
||||
0, // 13: bag.SCDollChange.RetCode:type_name -> bag.OpResultCode
|
||||
19, // 14: bag.SCDillChangeLog.Info:type_name -> bag.DillChangeLogInfo
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_bag_proto_init() }
|
||||
|
|
@ -1299,6 +1678,66 @@ func file_bag_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSDollChange); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCDollChange); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSDollChangeLog); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCDillChangeLog); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DillChangeLogInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
|
@ -1306,7 +1745,7 @@ func file_bag_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_bag_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 13,
|
||||
NumMessages: 18,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ enum SPacketID {
|
|||
//3000~3099
|
||||
PACKET_PropExchange = 3000; // 道具兑换
|
||||
PACKET_ExchangeList = 3001; // 兑换列表
|
||||
PACKET_CS_DollChange = 3002;//娃娃卡兑换
|
||||
PACKET_SC_DollChange = 3003;//娃娃卡兑换返回
|
||||
PACKET_CS_DollChangeLog = 3004;//娃娃卡兑换记录
|
||||
PACKET_SC_DollChangeLog = 3005;//娃娃卡兑换记录返回
|
||||
}
|
||||
//物品信息 后续精简
|
||||
message ItemInfo{
|
||||
|
|
@ -119,4 +123,36 @@ message CSExchangeList{
|
|||
message SCExchangeList{
|
||||
repeated ExchangeInfo Infos = 1; // 兑换列表
|
||||
int32 Tp = 2; // 兑换类型
|
||||
}
|
||||
//娃娃卡兑换
|
||||
//PACKET_CS_DollChange
|
||||
message CSDollChange{
|
||||
repeated PropInfo Items = 1;
|
||||
string UserName = 2;//姓名
|
||||
string UserTel = 3;//电话
|
||||
string Addr = 4;//地址
|
||||
}
|
||||
//PACKET_SC_DollChange
|
||||
message SCDollChange{
|
||||
OpResultCode RetCode = 1;
|
||||
}
|
||||
//娃娃卡兑换记录
|
||||
//PACKET_CS_DollChangeLog
|
||||
message CSDollChangeLog{
|
||||
|
||||
}
|
||||
//PACKET_SC_DollChangeLog
|
||||
message SCDillChangeLog{
|
||||
repeated DillChangeLogInfo Info =1;
|
||||
}
|
||||
message DillChangeLogInfo{
|
||||
int32 ItemId = 1;
|
||||
int32 ItemNum = 2;
|
||||
int32 State = 3;
|
||||
string UserName = 4;
|
||||
string UserTel = 5;
|
||||
string Addr = 6;
|
||||
string CreateTs = 7;
|
||||
string OpTs =8;
|
||||
string Remark = 9;//备注信息
|
||||
}
|
||||
|
|
@ -38,6 +38,8 @@ const (
|
|||
CLAWDOLLPacketID_PACKET_CS_WAITPLAYERS CLAWDOLLPacketID = 5611 // 获取等待玩家信息 (客户->服务)
|
||||
CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS CLAWDOLLPacketID = 5612 // 获取等待玩家信息 (服务->客户)
|
||||
CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO CLAWDOLLPacketID = 5613 // 正在控制娃娃机的玩家信息 (服务->客户)
|
||||
CLAWDOLLPacketID_PACKET_CS_DollConfig CLAWDOLLPacketID = 5614 //获取娃娃机配置信息
|
||||
CLAWDOLLPacketID_PACKET_SC_DollConfig CLAWDOLLPacketID = 5615 //返回娃娃机配置信息
|
||||
)
|
||||
|
||||
// Enum value maps for CLAWDOLLPacketID.
|
||||
|
|
@ -57,6 +59,8 @@ var (
|
|||
5611: "PACKET_CS_WAITPLAYERS",
|
||||
5612: "PACKET_SC_WAITPLAYERS",
|
||||
5613: "PACKET_SC_PLAYINGINFO",
|
||||
5614: "PACKET_CS_DollConfig",
|
||||
5615: "PACKET_SC_DollConfig",
|
||||
}
|
||||
CLAWDOLLPacketID_value = map[string]int32{
|
||||
"PACKET_ZERO": 0,
|
||||
|
|
@ -73,6 +77,8 @@ var (
|
|||
"PACKET_CS_WAITPLAYERS": 5611,
|
||||
"PACKET_SC_WAITPLAYERS": 5612,
|
||||
"PACKET_SC_PLAYINGINFO": 5613,
|
||||
"PACKET_CS_DollConfig": 5614,
|
||||
"PACKET_SC_DollConfig": 5615,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -1074,6 +1080,123 @@ func (x *CLAWDOLLPlayerDigestInfo) GetStat() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
type CSCLAWDOLLConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *CSCLAWDOLLConfig) Reset() {
|
||||
*x = CSCLAWDOLLConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_clawdoll_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CSCLAWDOLLConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CSCLAWDOLLConfig) ProtoMessage() {}
|
||||
|
||||
func (x *CSCLAWDOLLConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_clawdoll_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CSCLAWDOLLConfig.ProtoReflect.Descriptor instead.
|
||||
func (*CSCLAWDOLLConfig) Descriptor() ([]byte, []int) {
|
||||
return file_clawdoll_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
type SCCLAWDOLLConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IconAddr string `protobuf:"bytes,1,opt,name=IconAddr,proto3" json:"IconAddr,omitempty"` //图片地址
|
||||
CostItemNum int32 `protobuf:"varint,2,opt,name=CostItemNum,proto3" json:"CostItemNum,omitempty"` //消耗道具数量
|
||||
ItemId int32 `protobuf:"varint,3,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //获得道具ID
|
||||
ItemNum int32 `protobuf:"varint,4,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` //获得道具数量
|
||||
GameId int32 `protobuf:"varint,5,opt,name=GameId,proto3" json:"GameId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) Reset() {
|
||||
*x = SCCLAWDOLLConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_clawdoll_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCCLAWDOLLConfig) ProtoMessage() {}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_clawdoll_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SCCLAWDOLLConfig.ProtoReflect.Descriptor instead.
|
||||
func (*SCCLAWDOLLConfig) Descriptor() ([]byte, []int) {
|
||||
return file_clawdoll_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) GetIconAddr() string {
|
||||
if x != nil {
|
||||
return x.IconAddr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) GetCostItemNum() int32 {
|
||||
if x != nil {
|
||||
return x.CostItemNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) GetItemId() int32 {
|
||||
if x != nil {
|
||||
return x.ItemId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) GetItemNum() int32 {
|
||||
if x != nil {
|
||||
return x.ItemNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCCLAWDOLLConfig) GetGameId() int32 {
|
||||
if x != nil {
|
||||
return x.GameId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_clawdoll_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_clawdoll_proto_rawDesc = []byte{
|
||||
|
|
@ -1183,40 +1306,55 @@ var file_clawdoll_proto_rawDesc = []byte{
|
|||
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x55, 0x72, 0x6c,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x53, 0x74, 0x61, 0x74, 0x2a, 0xfd, 0x02, 0x0a, 0x10, 0x43, 0x4c, 0x41,
|
||||
0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x0f, 0x0a,
|
||||
0x0b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x17,
|
||||
0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d,
|
||||
0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2, 0x2b,
|
||||
0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c,
|
||||
0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45,
|
||||
0x10, 0xe4, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x5f, 0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe5, 0x2b, 0x12, 0x1a,
|
||||
0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79,
|
||||
0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65,
|
||||
0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe8,
|
||||
0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x47,
|
||||
0x45, 0x54, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x54, 0x4f, 0x4b, 0x45,
|
||||
0x4e, 0x10, 0xea, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
|
||||
0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xeb, 0x2b,
|
||||
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x41,
|
||||
0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xec, 0x2b, 0x12, 0x1a, 0x0a, 0x15,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x49, 0x4e,
|
||||
0x47, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xed, 0x2b, 0x2a, 0x64, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43,
|
||||
0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50,
|
||||
0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50,
|
||||
0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68,
|
||||
0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x6f, 0x73, 0x41, 0x6c,
|
||||
0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x28,
|
||||
0x5a, 0x26, 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,
|
||||
0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x28, 0x05, 0x52, 0x04, 0x53, 0x74, 0x61, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x53, 0x43, 0x4c,
|
||||
0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9a, 0x01, 0x0a,
|
||||
0x10, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x63, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x49, 0x63, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0b, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e,
|
||||
0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75,
|
||||
0x6d, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x2a, 0xb3, 0x03, 0x0a, 0x10, 0x43, 0x4c,
|
||||
0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x0f,
|
||||
0x0a, 0x0b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12,
|
||||
0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f,
|
||||
0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2,
|
||||
0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50,
|
||||
0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54,
|
||||
0x45, 0x10, 0xe4, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe5, 0x2b, 0x12,
|
||||
0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c,
|
||||
0x65, 0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10,
|
||||
0xe8, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
|
||||
0x47, 0x45, 0x54, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x54, 0x4f, 0x4b,
|
||||
0x45, 0x4e, 0x10, 0xea, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x43, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xeb,
|
||||
0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57,
|
||||
0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xec, 0x2b, 0x12, 0x1a, 0x0a,
|
||||
0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x49,
|
||||
0x4e, 0x47, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xed, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x10, 0xee, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x43, 0x5f, 0x44, 0x6f, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xef, 0x2b, 0x2a,
|
||||
0x64, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10,
|
||||
0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10,
|
||||
0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x6f,
|
||||
0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x52,
|
||||
0x43, 0x5f, 0x50, 0x6f, 0x73, 0x41, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x6c, 0x61, 0x79,
|
||||
0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 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, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -1232,7 +1370,7 @@ func file_clawdoll_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_clawdoll_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_clawdoll_proto_goTypes = []interface{}{
|
||||
(CLAWDOLLPacketID)(0), // 0: clawdoll.CLAWDOLLPacketID
|
||||
(OpResultCode)(0), // 1: clawdoll.OpResultCode
|
||||
|
|
@ -1249,6 +1387,8 @@ var file_clawdoll_proto_goTypes = []interface{}{
|
|||
(*SCCLAWDOLLSendToken)(nil), // 12: clawdoll.SCCLAWDOLLSendToken
|
||||
(*CLAWDOLLWaitPlayers)(nil), // 13: clawdoll.CLAWDOLLWaitPlayers
|
||||
(*CLAWDOLLPlayerDigestInfo)(nil), // 14: clawdoll.CLAWDOLLPlayerDigestInfo
|
||||
(*CSCLAWDOLLConfig)(nil), // 15: clawdoll.CSCLAWDOLLConfig
|
||||
(*SCCLAWDOLLConfig)(nil), // 16: clawdoll.SCCLAWDOLLConfig
|
||||
}
|
||||
var file_clawdoll_proto_depIdxs = []int32{
|
||||
2, // 0: clawdoll.SCCLAWDOLLRoomInfo.Players:type_name -> clawdoll.CLAWDOLLPlayerData
|
||||
|
|
@ -1424,6 +1564,30 @@ func file_clawdoll_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_clawdoll_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSCLAWDOLLConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_clawdoll_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCCLAWDOLLConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
|
@ -1431,7 +1595,7 @@ func file_clawdoll_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_clawdoll_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 13,
|
||||
NumMessages: 15,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ enum CLAWDOLLPacketID {
|
|||
PACKET_CS_WAITPLAYERS = 5611; // 获取等待玩家信息 (客户->服务)
|
||||
PACKET_SC_WAITPLAYERS = 5612; // 获取等待玩家信息 (服务->客户)
|
||||
PACKET_SC_PLAYINGINFO = 5613; // 正在控制娃娃机的玩家信息 (服务->客户)
|
||||
PACKET_CS_DollConfig = 5614; //获取娃娃机配置信息
|
||||
PACKET_SC_DollConfig = 5615; //返回娃娃机配置信息
|
||||
}
|
||||
|
||||
//操作结果
|
||||
|
|
@ -132,3 +134,12 @@ message CLAWDOLLPlayerDigestInfo {
|
|||
string Name = 4; //名字
|
||||
int32 Stat = 5; //玩家状态 0:排队状态 5:大厅观众状态
|
||||
}
|
||||
message CSCLAWDOLLConfig{
|
||||
}
|
||||
message SCCLAWDOLLConfig{
|
||||
string IconAddr =1; //图片地址
|
||||
int32 CostItemNum = 2; //消耗道具数量
|
||||
int32 ItemId = 3; //获得道具ID
|
||||
int32 ItemNum = 4;//获得道具数量
|
||||
int32 GameId = 5;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -232,6 +232,8 @@ enum PlayerPacketID {
|
|||
PACKET_SCUpdateAttribute = 2841;//返回更新属性
|
||||
PACKET_SCGuideConfig = 2842;//返回引导配置
|
||||
PACKET_SCDataConfig = 2843;//通知配置更新
|
||||
PACKET_CSClawdollItemLog = 2844;//请求娃娃卡道具记录
|
||||
PACKET_SCClawdollItemLog = 2845;//返回娃娃卡道具记录
|
||||
}
|
||||
|
||||
// 账变记录
|
||||
|
|
@ -1368,4 +1370,23 @@ message Config{
|
|||
//PACKET_SCDataConfig
|
||||
message SCDataConfig{
|
||||
repeated Config Cfg = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//娃娃卡记录
|
||||
//PACKET_CSClawdollItemLog
|
||||
message CSClawdollItemLog{
|
||||
int32 typeId = 1; //1-娃娃卡记录 2-充值记录
|
||||
}
|
||||
//PACKET_SCClawdollItemLog
|
||||
message SCClawdollItemLog{
|
||||
int32 typeId = 1; //1-娃娃卡记录 2-充值记录
|
||||
repeated ClawdollItemLogData ItemLogs = 2;
|
||||
}
|
||||
|
||||
message ClawdollItemLogData{
|
||||
int32 ItemLogType = 1; //道具记录类型
|
||||
int32 ItemId = 2; //道具ID
|
||||
int64 Num = 3; //数量
|
||||
int64 Time = 4; //时间
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -248,6 +248,7 @@ message RoomInfo{
|
|||
string Password = 22;// 密码
|
||||
int32 CostType = 23;// 付费方式 1房主 2AA
|
||||
int32 Voice = 24;// 语音开关 1开启
|
||||
int32 PlayerNum = 25; // 房间最大人数
|
||||
}
|
||||
|
||||
message PlayerSingleAdjust{
|
||||
|
|
@ -915,6 +916,7 @@ message MachineInfo{
|
|||
int32 CostItemNum = 5; //消耗道具数量
|
||||
int32 ItemId = 6; //获得道具Id
|
||||
int32 ItemNum = 7; //获得道具数量
|
||||
string IconAddr = 8;//图片地址
|
||||
}
|
||||
// etcd /game/match_audience
|
||||
message MatchAudience {
|
||||
|
|
|
|||
|
|
@ -6094,6 +6094,7 @@ type ASCreateExchangeOrder struct {
|
|||
TelCharge int32 `protobuf:"varint,15,opt,name=TelCharge,proto3" json:"TelCharge,omitempty"` // 电话充值
|
||||
VipLevel int32 `protobuf:"varint,16,opt,name=VipLevel,proto3" json:"VipLevel,omitempty"` //VIP等级
|
||||
TelId int32 `protobuf:"varint,17,opt,name=TelId,proto3" json:"TelId,omitempty"` //运营商ID
|
||||
DPrice int32 `protobuf:"varint,18,opt,name=DPrice,proto3" json:"DPrice,omitempty"` //消耗娃娃积分
|
||||
}
|
||||
|
||||
func (x *ASCreateExchangeOrder) Reset() {
|
||||
|
|
@ -6247,6 +6248,13 @@ func (x *ASCreateExchangeOrder) GetTelId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ASCreateExchangeOrder) GetDPrice() int32 {
|
||||
if x != nil {
|
||||
return x.DPrice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SACreateExchangeOrder struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
@ -6595,6 +6603,7 @@ type ASUpExchangeStatus struct {
|
|||
NeedNum int32 `protobuf:"varint,6,opt,name=NeedNum,proto3" json:"NeedNum,omitempty"` //消耗V卡
|
||||
JPrice int32 `protobuf:"varint,7,opt,name=JPrice,proto3" json:"JPrice,omitempty"` //消耗的金券数量
|
||||
Cash int32 `protobuf:"varint,8,opt,name=Cash,proto3" json:"Cash,omitempty"` //消耗的现金数量
|
||||
DPrice int32 `protobuf:"varint,9,opt,name=DPrice,proto3" json:"DPrice,omitempty"` //消耗的娃娃积分
|
||||
}
|
||||
|
||||
func (x *ASUpExchangeStatus) Reset() {
|
||||
|
|
@ -6685,6 +6694,13 @@ func (x *ASUpExchangeStatus) GetCash() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ASUpExchangeStatus) GetDPrice() int32 {
|
||||
if x != nil {
|
||||
return x.DPrice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 返回
|
||||
type SAUpExchangeStatus struct {
|
||||
state protoimpl.MessageState
|
||||
|
|
@ -10027,7 +10043,7 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x2f, 0x0a,
|
||||
0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x43, 0x50, 0x4f, 0x52, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x22, 0xcb,
|
||||
0x43, 0x50, 0x4f, 0x52, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x22, 0xe3,
|
||||
0x03, 0x0a, 0x15, 0x41, 0x53, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
|
||||
|
|
@ -10056,66 +10072,69 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x09, 0x54, 0x65, 0x6c, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x56, 0x69,
|
||||
0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x56, 0x69,
|
||||
0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x65, 0x6c, 0x49, 0x64, 0x18,
|
||||
0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x15,
|
||||
0x53, 0x41, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x2f, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x43, 0x50, 0x4f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65,
|
||||
0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x52, 0x09,
|
||||
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x22, 0x58, 0x0a, 0x12, 0x41, 0x53, 0x47,
|
||||
0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53,
|
||||
0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70,
|
||||
0x61, 0x67, 0x65, 0x22, 0xaf, 0x02, 0x0a, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x50,
|
||||
0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
|
||||
0x50, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x45,
|
||||
0x58, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0c, 0x45, 0x58, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x54, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x54, 0x65, 0x6c, 0x49, 0x64, 0x22, 0xdc, 0x01, 0x0a, 0x12, 0x53, 0x41, 0x47, 0x65, 0x74, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03,
|
||||
0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x75, 0x72, 0x50, 0x61, 0x67, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x43, 0x75, 0x72, 0x50, 0x61, 0x67, 0x65, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x09, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
|
||||
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x12, 0x41, 0x53, 0x55, 0x70, 0x45, 0x78, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69,
|
||||
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x65, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x4e, 0x65, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x4a,
|
||||
0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4a, 0x50, 0x72,
|
||||
0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x43, 0x61, 0x73, 0x68, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x41, 0x55, 0x70, 0x45,
|
||||
0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x44, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x44, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x15, 0x53, 0x41, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a,
|
||||
0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67,
|
||||
0x12, 0x2f, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x52, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50,
|
||||
0x4f, 0x22, 0x58, 0x0a, 0x12, 0x41, 0x53, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xaf, 0x02, 0x0a, 0x11,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52,
|
||||
0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d,
|
||||
0x61, 0x72, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x50, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x75, 0x6d,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x58, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x45, 0x58, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x65, 0x6c, 0x49, 0x64,
|
||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x65, 0x6c, 0x49, 0x64, 0x22, 0xdc, 0x01,
|
||||
0x0a, 0x12, 0x53, 0x41, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x43, 0x75, 0x72, 0x50, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x43, 0x75, 0x72, 0x50, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x4c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65,
|
||||
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xe8, 0x01, 0x0a,
|
||||
0x12, 0x41, 0x53, 0x55, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x47,
|
||||
0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f,
|
||||
0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x65, 0x65,
|
||||
0x64, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4e, 0x65, 0x65, 0x64,
|
||||
0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x4a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x4a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43,
|
||||
0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x61, 0x73, 0x68, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x44, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x44, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x41, 0x55, 0x70, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a,
|
||||
0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67,
|
||||
|
|
|
|||
|
|
@ -692,6 +692,7 @@ message ASCreateExchangeOrder {
|
|||
int32 TelCharge = 15; // 电话充值
|
||||
int32 VipLevel = 16; //VIP等级
|
||||
int32 TelId = 17; //运营商ID
|
||||
int32 DPrice = 18; //消耗娃娃积分
|
||||
}
|
||||
|
||||
message SACreateExchangeOrder {
|
||||
|
|
@ -737,6 +738,7 @@ message ASUpExchangeStatus {
|
|||
int32 NeedNum = 6; //消耗V卡
|
||||
int32 JPrice = 7;//消耗的金券数量
|
||||
int32 Cash = 8;//消耗的现金数量
|
||||
int32 DPrice = 9;//消耗的娃娃积分
|
||||
|
||||
}
|
||||
// 返回
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
|
|
@ -506,6 +507,92 @@ func CSPropExchange(s *netlib.Session, packetid int, data interface{}, sid int64
|
|||
return nil
|
||||
}
|
||||
|
||||
// 兑换娃娃
|
||||
func CSDollChange(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
msg, ok := data.(*bag.CSDollChange)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
pack := &bag.SCDollChange{}
|
||||
for _, item := range msg.Items {
|
||||
if item.ItemId == 0 {
|
||||
continue
|
||||
}
|
||||
info := srvdata.GameItemMgr.Get(p.Platform, item.ItemId)
|
||||
if info == nil {
|
||||
continue
|
||||
}
|
||||
if info.Type != common.ItemTypeDoll {
|
||||
continue
|
||||
}
|
||||
|
||||
bagInfo, rest, isF := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: []*model.Item{
|
||||
{
|
||||
ItemId: item.GetItemId(),
|
||||
ItemNum: 1,
|
||||
},
|
||||
},
|
||||
GainWay: common.GainWayItemBagChangeDoll,
|
||||
Operator: "system",
|
||||
Remark: "背包内使用兑换娃娃卡",
|
||||
NoLog: false,
|
||||
})
|
||||
logger.Logger.Trace("背包内使用兑换娃娃卡 bagInfo = ", bagInfo)
|
||||
pack.RetCode = rest
|
||||
if isF {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
dollLog := model.NewDbBagChangeDoll(p.Platform, p.SnId, item.ItemId, 1, 0, "", msg.Addr, msg.UserName, msg.UserTel)
|
||||
return model.InsertDbBagChangeDollLog(dollLog)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
if data != nil {
|
||||
logger.Logger.Errorf("CSDollChange err: %v", data)
|
||||
}
|
||||
}), "CSDollChange").Start()
|
||||
|
||||
}
|
||||
}
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_SC_DollChange), pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
// 兑换娃娃记录
|
||||
func CSDollChangeLog(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.GetDbBagChangeDollLog(p.Platform, p.SnId)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
pack := &bag.SCDillChangeLog{}
|
||||
if data != nil {
|
||||
for _, log := range data.([]*model.BagChangeDollLog) {
|
||||
info := &bag.DillChangeLogInfo{}
|
||||
info.ItemId = log.ItemId
|
||||
info.ItemNum = log.ItemNum
|
||||
info.State = log.State
|
||||
info.UserName = log.UserName
|
||||
info.UserTel = log.UserTel
|
||||
info.Addr = log.Addr
|
||||
info.CreateTs = strconv.FormatInt(log.CreateTs, 10)
|
||||
info.OpTs = strconv.FormatInt(log.OpTs, 10)
|
||||
info.Remark = log.Remark
|
||||
pack.Info = append(pack.Info, info)
|
||||
}
|
||||
}
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_SC_DollChangeLog), pack)
|
||||
|
||||
}), "CSDollChange").Start()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 查看背包
|
||||
common.Register(int(bag.SPacketID_PACKET_ALL_BAG_INFO), &bag.CSBagInfo{}, CSBagInfo)
|
||||
|
|
@ -515,4 +602,8 @@ func init() {
|
|||
common.Register(int(bag.SPacketID_PACKET_ExchangeList), &bag.CSExchangeList{}, CSExchangeList)
|
||||
// 道具兑换
|
||||
common.Register(int(bag.SPacketID_PACKET_PropExchange), &bag.CSPropExchange{}, CSPropExchange)
|
||||
//兑换娃娃
|
||||
common.Register(int(bag.SPacketID_PACKET_CS_DollChange), &bag.CSDollChange{}, CSDollChange)
|
||||
//兑换娃娃记录
|
||||
common.Register(int(bag.SPacketID_PACKET_CS_DollChangeLog), &bag.CSDollChangeLog{}, CSDollChangeLog)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2818,27 +2818,33 @@ func CSBillList(s *netlib.Session, packetId int, data interface{}, sid int64) er
|
|||
fromIndex := msg.GetPageNo() * msg.GetPageSize()
|
||||
toIndex := fromIndex + msg.GetPageSize()
|
||||
|
||||
logs, _, err := model.GetCoinLogGame(p.Platform, p.SnId, common.BillTypeCoin, startTs, endTs, int(fromIndex), int(toIndex))
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetCoinLogGame err:%v", err)
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCBillList), ret)
|
||||
return err
|
||||
}
|
||||
var err error
|
||||
var logs []model.CoinLog
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
logs, _, err = model.GetCoinLogGame(p.Platform, p.SnId, common.BillTypeCoin, startTs, endTs, int(fromIndex), int(toIndex))
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetCoinLogGame err:%v", err)
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCBillList), ret)
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range logs {
|
||||
ret.Items = append(ret.Items, &player_proto.BillItem{
|
||||
Ts: v.Ts,
|
||||
Id: v.LogId.Hex(),
|
||||
BillType: int64(v.LogType),
|
||||
Amount: v.Count,
|
||||
Balance: v.RestCount,
|
||||
GameID: int64(v.InGame),
|
||||
GameFreeID: v.GameFreeId,
|
||||
BaseCoin: v.BaseCoin,
|
||||
})
|
||||
}
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCBillList), ret)
|
||||
logger.Logger.Tracef("SCBillList pageNo:%d, pageSize:%d %v", msg.GetPageNo(), msg.GetPageSize(), ret)
|
||||
for _, v := range logs {
|
||||
ret.Items = append(ret.Items, &player_proto.BillItem{
|
||||
Ts: v.Ts,
|
||||
Id: v.LogId.Hex(),
|
||||
BillType: int64(v.LogType),
|
||||
Amount: v.Count,
|
||||
Balance: v.RestCount,
|
||||
GameID: int64(v.InGame),
|
||||
GameFreeID: v.GameFreeId,
|
||||
BaseCoin: v.BaseCoin,
|
||||
})
|
||||
}
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCBillList), ret)
|
||||
logger.Logger.Tracef("SCBillList pageNo:%d, pageSize:%d %v", msg.GetPageNo(), msg.GetPageSize(), ret)
|
||||
}), "GetCoinLogGame").Start()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3156,6 +3162,47 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
|
|||
return nil
|
||||
}
|
||||
|
||||
// 获取获奖记录
|
||||
func CSClawdollItemLog(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSClawdollItemLog Process %v", data)
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
msg, ok := data.(*player_proto.CSClawdollItemLog)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
ret := &player_proto.SCClawdollItemLog{}
|
||||
ret.TypeId = msg.TypeId
|
||||
|
||||
var err error
|
||||
var ItemUseLogs []model.ItemLog
|
||||
|
||||
//娃娃机道具使用日志
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
ItemUseLogs, err = model.GetClawdollItemLog(p.Platform, p.SnId)
|
||||
return err
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
for _, logInfo := range ItemUseLogs {
|
||||
infoData := &player_proto.ClawdollItemLogData{}
|
||||
|
||||
infoData.ItemId = logInfo.ItemId
|
||||
infoData.Time = logInfo.CreateTs
|
||||
infoData.Num = logInfo.Count
|
||||
infoData.ItemLogType = logInfo.LogType
|
||||
|
||||
ret.ItemLogs = append(ret.ItemLogs, infoData)
|
||||
}
|
||||
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCClawdollItemLog), ret)
|
||||
logger.Logger.Tracef("SCClawdollItemLog:%v", ret)
|
||||
}), "GetClawdollItemLog").Start()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 用户信息
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CS_PLAYERDATA), player_proto.CSPlayerData{}, CSPlayerData)
|
||||
|
|
@ -3189,4 +3236,6 @@ func init() {
|
|||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSPopUpWindowsConfig), player_proto.CSPopUpWindowsConfig{}, CSPopUpWindowsConfig)
|
||||
// 更新属性;新手引导阶段
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSUpdateAttribute), player_proto.CSUpdateAttribute{}, CSUpdateAttribute)
|
||||
//娃娃卡道具记录
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSClawdollItemLog), player_proto.CSClawdollItemLog{}, CSClawdollItemLog)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,142 +38,148 @@ func init() {
|
|||
return &serverproto.GWPlayerLeave{}
|
||||
}))
|
||||
netlib.RegisterHandler(int(serverproto.SSPacketID_PACKET_GW_PLAYERLEAVE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
if msg, ok := pack.(*serverproto.GWPlayerLeave); ok {
|
||||
logger.Logger.Trace("receive GWPlayerLeave:", msg.GetPlayerId())
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()))
|
||||
if scene != nil {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(msg.GetPlayerId())
|
||||
if p != nil {
|
||||
data := msg.GetPlayerData()
|
||||
if len(data) != 0 {
|
||||
logger.Logger.Trace("GWPlayerLeave p.UnmarshalData(data)")
|
||||
p.UnmarshalData(data, scene)
|
||||
}
|
||||
|
||||
switch {
|
||||
case scene.IsCoinScene():
|
||||
if !CoinSceneMgrSingleton.PlayerLeave(p, int(msg.GetReason())) {
|
||||
logger.Logger.Warnf("GWPlayerLeave snid:%v sceneid:%v gameid:%v modeid:%v [coinscene]",
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode)
|
||||
}
|
||||
case scene.IsHundredScene():
|
||||
if !HundredSceneMgrSingleton.PlayerLeave(p, int(msg.GetReason())) {
|
||||
logger.Logger.Warnf("GWPlayerLeave snid:%v sceneid:%v gameid:%v modeid:%v [hundredcene]",
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode)
|
||||
}
|
||||
default:
|
||||
scene.PlayerLeave(p, int(msg.GetReason()))
|
||||
}
|
||||
|
||||
if p.scene != nil {
|
||||
logger.Logger.Errorf("after GWPlayerLeave found snid:%v sceneid:%v gameid:%v modeid:%v",
|
||||
p.SnId, p.scene.sceneId, p.scene.gameId, p.scene.gameMode)
|
||||
}
|
||||
|
||||
if scene.IsMatchScene() {
|
||||
//结算积分
|
||||
if !p.IsRob {
|
||||
TournamentMgr.UpdateMatchInfo(p, msg.MatchId, int32(msg.GetReturnCoin()), int32(msg.GetCurIsWin()), msg.GetMatchRobotGrades())
|
||||
} else {
|
||||
p.matchCtx = nil
|
||||
}
|
||||
}
|
||||
|
||||
// 同步排位积分
|
||||
if scene.IsRankMatch() {
|
||||
if p.IsRob {
|
||||
RankMgrSingleton.UpdateRobotSeason(p.Platform, p.SnId, scene.dbGameFree.GetRankType(),
|
||||
msg.GetRankScore()[scene.dbGameFree.GetRankType()], p.Name, p.Sex, p.HeadUrl, p.Coin, p.PlayerData.GetRoleId())
|
||||
} else {
|
||||
if model.GameParamData.TestRankMatchAward {
|
||||
if RankMgrSingleton.playerSeasons[p.SnId] != nil {
|
||||
if RankMgrSingleton.playerSeasons[p.SnId].RankType == nil {
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType = make(map[int32]*model.PlayerRankInfo)
|
||||
}
|
||||
if RankMgrSingleton.playerSeasons[p.SnId].RankType[1] == nil {
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1] = &model.PlayerRankInfo{}
|
||||
}
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].LastScore = 7500
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].Score = 7500
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].Awards = nil
|
||||
}
|
||||
RankMgrSingleton.UpdatePlayerSeason(p.SnId, map[int32]int64{1: 10000})
|
||||
} else {
|
||||
RankMgrSingleton.UpdatePlayerSeason(p.SnId, msg.GetRankScore())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//更新玩家等级排行榜
|
||||
LogChannelSingleton.WriteLog(&model.PlayerLevelInfo{
|
||||
SnId: p.SnId,
|
||||
Name: p.Name,
|
||||
Level: p.Level,
|
||||
Exp: p.Exp,
|
||||
ModId: p.PlayerData.GetRoleId(),
|
||||
Platform: p.Platform,
|
||||
})
|
||||
//比赛场不处理下面的内容
|
||||
if !scene.IsMatchScene() && !scene.IsCustom() {
|
||||
// 破产检测
|
||||
sdata := srvdata.PBDB_GameSubsidyMgr.GetData(GameSubsidyid)
|
||||
if sdata != nil {
|
||||
if !p.IsRob && p.takeCoin > msg.GetReturnCoin() && p.takeCoin >= int64(sdata.LimitNum) && msg.GetReturnCoin() < int64(sdata.LimitNum) {
|
||||
CostCoin := p.takeCoin - msg.GetReturnCoin()
|
||||
|
||||
logger.Logger.Infof("NewBankruptLogEx: snid:%v GetReturnCoin:%v coin:%v CostCoin:%v", p.SnId, msg.GetReturnCoin(), p.takeCoin, CostCoin)
|
||||
log := model.NewBankruptLogEx(p.SnId, scene.dbGameFree.GetId(), p.CreateTime.Unix(), CostCoin, p.Platform, p.Channel, scene.gameId)
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 破产检测
|
||||
|
||||
oldCoin := p.Coin
|
||||
|
||||
//带回金币
|
||||
if p.Coin != msg.GetReturnCoin() {
|
||||
p.Coin = msg.GetReturnCoin()
|
||||
if p.Coin < 0 {
|
||||
p.Coin = 0
|
||||
}
|
||||
|
||||
p.dirty = true
|
||||
}
|
||||
|
||||
logger.Logger.Infof("SSPacketID_PACKET_GW_PLAYERLEAVE: snid:%v oldcoin:%v coin:%v", p.SnId, oldCoin, p.Coin)
|
||||
p.diffData.Coin = -1 //强制更新金币
|
||||
p.diffData.TotalConvertibleFlow = -1 //强制更新流水
|
||||
p.SendDiffData() //只是把差异发给前端
|
||||
|
||||
gameCoinTs := msg.GetGameCoinTs()
|
||||
if !p.IsRob && !scene.IsTestScene() {
|
||||
//对账点同步
|
||||
if p.GameCoinTs < gameCoinTs {
|
||||
p.GameCoinTs = gameCoinTs
|
||||
p.dirty = true
|
||||
}
|
||||
|
||||
//破产统计
|
||||
//if int(msg.GetReason()) == common.PlayerLeaveReason_Bekickout {
|
||||
// if len(scene.paramsEx) > 0 {
|
||||
// gameIdEx := scene.paramsEx[0]
|
||||
// gps := PlatformMgrSingleton.GetGameFree(scene.limitPlatform.IdStr, scene.paramsEx[0])
|
||||
// if gps != nil {
|
||||
// lowLimit := gps.DbGameFree.GetLowerThanKick()
|
||||
// if lowLimit != 0 && p.Coin+p.SafeBoxCoin < int64(lowLimit) {
|
||||
// p.ReportBankRuptcy(int32(scene.gameId), int32(scene.gameMode), gameIdEx)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
logger.Logger.Trace("receive GWPlayerLeave:", pack)
|
||||
msg, ok := pack.(*serverproto.GWPlayerLeave)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()), true)
|
||||
if scene == nil {
|
||||
logger.Logger.Warnf("玩家离开房间,房间没找到 %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetPlayerBySnId(msg.GetPlayerId())
|
||||
if p == nil {
|
||||
logger.Logger.Warnf("玩家离开房间,玩家信息没找到 %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
data := msg.GetPlayerData()
|
||||
if len(data) != 0 {
|
||||
logger.Logger.Trace("GWPlayerLeave p.UnmarshalData(data)")
|
||||
p.UnmarshalData(data, scene)
|
||||
}
|
||||
|
||||
switch {
|
||||
case scene.IsCoinScene():
|
||||
if !CoinSceneMgrSingleton.PlayerLeave(p, int(msg.GetReason())) {
|
||||
logger.Logger.Warnf("GWPlayerLeave snid:%v sceneid:%v gameid:%v modeid:%v [coinscene]",
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode)
|
||||
}
|
||||
case scene.IsHundredScene():
|
||||
if !HundredSceneMgrSingleton.PlayerLeave(p, int(msg.GetReason())) {
|
||||
logger.Logger.Warnf("GWPlayerLeave snid:%v sceneid:%v gameid:%v modeid:%v [hundredcene]",
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode)
|
||||
}
|
||||
default:
|
||||
scene.PlayerLeave(p, int(msg.GetReason()))
|
||||
}
|
||||
|
||||
if p.scene != nil {
|
||||
logger.Logger.Errorf("after GWPlayerLeave found snid:%v sceneid:%v gameid:%v modeid:%v",
|
||||
p.SnId, p.scene.sceneId, p.scene.gameId, p.scene.gameMode)
|
||||
}
|
||||
|
||||
if scene.IsMatchScene() {
|
||||
//结算积分
|
||||
if !p.IsRob {
|
||||
TournamentMgr.UpdateMatchInfo(p, msg.MatchId, int32(msg.GetReturnCoin()), int32(msg.GetCurIsWin()), msg.GetMatchRobotGrades())
|
||||
} else {
|
||||
p.matchCtx = nil
|
||||
}
|
||||
}
|
||||
|
||||
// 同步排位积分
|
||||
if scene.IsRankMatch() {
|
||||
if p.IsRob {
|
||||
RankMgrSingleton.UpdateRobotSeason(p.Platform, p.SnId, scene.dbGameFree.GetRankType(),
|
||||
msg.GetRankScore()[scene.dbGameFree.GetRankType()], p.Name, p.Sex, p.HeadUrl, p.Coin, p.PlayerData.GetRoleId())
|
||||
} else {
|
||||
if model.GameParamData.TestRankMatchAward {
|
||||
if RankMgrSingleton.playerSeasons[p.SnId] != nil {
|
||||
if RankMgrSingleton.playerSeasons[p.SnId].RankType == nil {
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType = make(map[int32]*model.PlayerRankInfo)
|
||||
}
|
||||
if RankMgrSingleton.playerSeasons[p.SnId].RankType[1] == nil {
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1] = &model.PlayerRankInfo{}
|
||||
}
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].LastScore = 7500
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].Score = 7500
|
||||
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].Awards = nil
|
||||
}
|
||||
RankMgrSingleton.UpdatePlayerSeason(p.SnId, map[int32]int64{1: 10000})
|
||||
} else {
|
||||
logger.Logger.Tracef("GWPlayerLeave LocalRobotIdMgrSington %v", msg.GetPlayerId())
|
||||
//LocalRobotIdMgrSington.FreeId(msg.GetPlayerId())
|
||||
RankMgrSingleton.UpdatePlayerSeason(p.SnId, msg.GetRankScore())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//更新玩家等级排行榜
|
||||
LogChannelSingleton.WriteLog(&model.PlayerLevelInfo{
|
||||
SnId: p.SnId,
|
||||
Name: p.Name,
|
||||
Level: p.Level,
|
||||
Exp: p.Exp,
|
||||
ModId: p.PlayerData.GetRoleId(),
|
||||
Platform: p.Platform,
|
||||
})
|
||||
//比赛场不处理下面的内容
|
||||
if !scene.IsMatchScene() && !scene.IsCustom() {
|
||||
// 破产检测
|
||||
sdata := srvdata.PBDB_GameSubsidyMgr.GetData(GameSubsidyid)
|
||||
if sdata != nil {
|
||||
if !p.IsRob && p.takeCoin > msg.GetReturnCoin() && p.takeCoin >= int64(sdata.LimitNum) && msg.GetReturnCoin() < int64(sdata.LimitNum) {
|
||||
CostCoin := p.takeCoin - msg.GetReturnCoin()
|
||||
|
||||
logger.Logger.Infof("NewBankruptLogEx: snid:%v GetReturnCoin:%v coin:%v CostCoin:%v", p.SnId, msg.GetReturnCoin(), p.takeCoin, CostCoin)
|
||||
log := model.NewBankruptLogEx(p.SnId, scene.dbGameFree.GetId(), p.CreateTime.Unix(), CostCoin, p.Platform, p.Channel, scene.gameId)
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 破产检测
|
||||
|
||||
oldCoin := p.Coin
|
||||
|
||||
//带回金币
|
||||
if p.Coin != msg.GetReturnCoin() {
|
||||
p.Coin = msg.GetReturnCoin()
|
||||
if p.Coin < 0 {
|
||||
p.Coin = 0
|
||||
}
|
||||
|
||||
p.dirty = true
|
||||
}
|
||||
|
||||
logger.Logger.Infof("SSPacketID_PACKET_GW_PLAYERLEAVE: snid:%v oldcoin:%v coin:%v", p.SnId, oldCoin, p.Coin)
|
||||
p.diffData.Coin = -1 //强制更新金币
|
||||
p.diffData.TotalConvertibleFlow = -1 //强制更新流水
|
||||
p.SendDiffData() //只是把差异发给前端
|
||||
|
||||
gameCoinTs := msg.GetGameCoinTs()
|
||||
if !p.IsRob && !scene.IsTestScene() {
|
||||
//对账点同步
|
||||
if p.GameCoinTs < gameCoinTs {
|
||||
p.GameCoinTs = gameCoinTs
|
||||
p.dirty = true
|
||||
}
|
||||
|
||||
//破产统计
|
||||
//if int(msg.GetReason()) == common.PlayerLeaveReason_Bekickout {
|
||||
// if len(scene.paramsEx) > 0 {
|
||||
// gameIdEx := scene.paramsEx[0]
|
||||
// gps := PlatformMgrSingleton.GetGameFree(scene.limitPlatform.IdStr, scene.paramsEx[0])
|
||||
// if gps != nil {
|
||||
// lowLimit := gps.DbGameFree.GetLowerThanKick()
|
||||
// if lowLimit != 0 && p.Coin+p.SafeBoxCoin < int64(lowLimit) {
|
||||
// p.ReportBankRuptcy(int32(scene.gameId), int32(scene.gameMode), gameIdEx)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -1963,7 +1963,7 @@ func (this *Player) AddCoin(num, add int64, gainWay int32, oper, remark string)
|
|||
//this.TotalData(num, gainWay)
|
||||
|
||||
async := false
|
||||
if num > 0 && this.scene != nil && !this.scene.IsTestScene() && !this.scene.IsMatchScene() && this.scene.sceneMode != common.SceneModeThr { //游戏场中加币,需要同步到gamesrv上
|
||||
if num > 0 && this.scene != nil && !this.scene.IsTestScene() && !this.scene.IsMatchScene() && !this.scene.IsCustom() && this.scene.sceneMode != common.SceneModeThr { //游戏场中加币,需要同步到gamesrv上
|
||||
if StartAsyncAddCoinTransact(this, num, gainWay, oper, remark, true, 0, true) {
|
||||
async = true
|
||||
}
|
||||
|
|
@ -3006,6 +3006,7 @@ func (this *Player) SendPlayerInfo() {
|
|||
if item := BagMgrSingleton.GetItem(this.SnId, common.ItemIDVCard); item != nil {
|
||||
scPlayerData.Data.VCoin = item.ItemNum //V卡
|
||||
}
|
||||
|
||||
// 排位积分
|
||||
scPlayerData.Data.RankScore = RankMgrSingleton.GetPlayerRankScore(this.SnId)
|
||||
|
||||
|
|
|
|||
|
|
@ -102,8 +102,14 @@ func (m *SceneMgr) GetPlatformBySceneId(sceneId int) string {
|
|||
}
|
||||
|
||||
// GetScene 获取房间对象
|
||||
func (m *SceneMgr) GetScene(sceneId int) *Scene {
|
||||
if s, exist := m.scenes[sceneId]; exist && !s.deleting {
|
||||
// 默认是不包含删除中的房间
|
||||
// hasDeleting true 包含删除中的房间
|
||||
func (m *SceneMgr) GetScene(sceneId int, hasDeleting ...bool) *Scene {
|
||||
has := false
|
||||
if len(hasDeleting) > 0 {
|
||||
has = hasDeleting[0]
|
||||
}
|
||||
if s, exist := m.scenes[sceneId]; exist && (has || !s.deleting) {
|
||||
return s
|
||||
}
|
||||
return nil
|
||||
|
|
@ -199,6 +205,7 @@ func (m *SceneMgr) MarshalAllRoom(platform string, groupId, gameId int, gameMode
|
|||
Password: s.GetPassword(),
|
||||
CostType: s.GetCostType(),
|
||||
Voice: s.GetVoice(),
|
||||
PlayerNum: int32(s.playerNum),
|
||||
}
|
||||
if s.starting {
|
||||
si.Start = 1
|
||||
|
|
|
|||
|
|
@ -886,7 +886,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
ItemId: common.ItemDollCard,
|
||||
ItemNum: int64(info.JPrice * num),
|
||||
}
|
||||
_, _, isF := BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWayItemChangeDoll,
|
||||
_, _, isF := BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWayItemShopChangeDoll,
|
||||
"sys", fmt.Sprintf("兑换娃娃扣除%v", item.ItemId), 0, 0, false)
|
||||
if !isF { // 扣掉金券
|
||||
pack.RetCode = shop.OpResultCode_OPRC_DCoinNotEnough
|
||||
|
|
@ -914,6 +914,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
TelCharge: cdata.TelCharge,
|
||||
VipLevel: p.VIP,
|
||||
TelId: telId,
|
||||
DPrice: info.DPrice * num,
|
||||
}
|
||||
buff, err := webapi.API_CreateExchange(common.GetAppId(), pack)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -3375,6 +3375,7 @@ func init() {
|
|||
}
|
||||
addvcoin := msg.NeedNum
|
||||
jPrice := msg.JPrice
|
||||
dPrice := msg.DPrice
|
||||
var items []*model.Item
|
||||
//V卡
|
||||
if addvcoin > 0 {
|
||||
|
|
@ -3384,6 +3385,10 @@ func init() {
|
|||
if jPrice > 0 {
|
||||
items = append(items, &model.Item{ItemId: common.ItemIDJCard, ItemNum: int64(jPrice)})
|
||||
}
|
||||
//娃娃积分
|
||||
if dPrice > 0 {
|
||||
items = append(items, &model.Item{ItemId: common.ItemDollCard, ItemNum: int64(dPrice)})
|
||||
}
|
||||
remark := fmt.Sprintf("兑换撤单 %v-%v", msg.GoodsId, msg.Name)
|
||||
if player != nil {
|
||||
// 在线
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue