From 36a7a61178a6c0da157e8950f2a91997e64323eb Mon Sep 17 00:00:00 2001 From: kxdd Date: Wed, 25 Sep 2024 09:22:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8A=93=E5=8F=96=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbproxy/svc/l_itemlog.go | 79 +++++- gamesrv/clawdoll/action_clawdoll.go | 79 +++++- model/itemdatalog.go | 50 +++- protocol/clawdoll/clawdoll.pb.go | 380 +++++++++++++++++++++++----- protocol/clawdoll/clawdoll.proto | 23 +- worldsrv/action_player.go | 18 -- 6 files changed, 532 insertions(+), 97 deletions(-) diff --git a/dbproxy/svc/l_itemlog.go b/dbproxy/svc/l_itemlog.go index fe41bee..13dc618 100644 --- a/dbproxy/svc/l_itemlog.go +++ b/dbproxy/svc/l_itemlog.go @@ -116,7 +116,7 @@ func (svc *ItemLogSvc) UpdateState(req *model.UpdateParam, res *model.UpdateRes) } func (svc *ItemLogSvc) GetClawdollItemLog(args *model.ClawdollItemLogReq, ret *model.GetClawdollItemLogRet) (err error) { - itemTypeIds := []int32{common.GainWayClawdollCostItem, common.GainWayItemShopChangeDoll, common.GainWayItemBagChangeDoll, common.GainWayClawdollCatch} + itemTypeIds := []int32{common.GainWayClawdollCostItem, common.GainWayItemShopChangeDoll} cond := bson.M{"snid": args.Snid, "typeid": bson.M{"$in": itemTypeIds}} c := ItemLogsCollection(args.Platform) @@ -128,6 +128,83 @@ func (svc *ItemLogSvc) GetClawdollItemLog(args *model.ClawdollItemLogReq, ret *m return } +func (svc *ItemLogSvc) GetClawdollSuccessItemLog(args *model.ClawdollSuccessItemLogReq, ret *model.GetClawdollSuccessItemLogRet) (err error) { + itemTypeIds := []int32{common.GainWayClawdollCatch} + cond := bson.M{"typeid": bson.M{"$in": itemTypeIds}} + + c := ItemLogsCollection(args.Platform) + if c == nil { + return + } + + var datas []*model.ItemLog + err = c.Find(cond).All(datas) + if err != nil { + logger.Logger.Error("GetClawdollSuccessItemLog error: ", err) + return err + } + + if datas == nil { + logger.Logger.Error("GetClawdollSuccessItemLog datas == nil error") + return nil + } + + if len(datas) > 0 { + type PInfo struct { + SnId int32 + Name string // 昵称 + Roles *model.ModInfo + } + + var retPlayerList []PInfo + cplayerdata := PlayerDataCollection(args.Platform) + if cplayerdata == nil { + return err + } + + var conds []int32 + tempMap := map[int32]byte{} // 存放不重复主键 + for i := 0; i < len(datas); i++ { + l := len(tempMap) + tempMap[datas[i].SnId] = 0 + if len(tempMap) != l { // 加入map后,map长度变化,则元素不重复 + conds = append(conds, datas[i].SnId) + } + } + + selecter := bson.M{"snid": bson.M{"$in": conds}} + err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList) + if err != nil { + logger.Logger.Error("GetClawdollSuccessItemLog find player is error", err) + return err + } + + for _, data := range datas { + log := model.ClawdollSuccessItemLog{ + SnId: data.SnId, + Time: data.CreateTs, + } + + for _, playerData := range retPlayerList { + if playerData.SnId == data.SnId { + log.Name = playerData.Name + // 头像模型ID + roleId := common.DefaultRoleId + if playerData.Roles != nil { + roleId = int(playerData.Roles.ModId) + } + log.ModId = int32(roleId) + + ret.Logs = append(ret.Logs, log) + break + } + } + } + } + + return +} + func (svc *ItemLogSvc) GetItemLog(req *model.GetItemLogParam, res *model.GetItemLogRes) error { c := ItemLogsCollection(req.Plt) if c == nil { diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index d0c3a66..3b5ae25 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -5,10 +5,13 @@ import ( "mongo.games.com/game/common" rule "mongo.games.com/game/gamerule/clawdoll" "mongo.games.com/game/gamesrv/base" + "mongo.games.com/game/model" "mongo.games.com/game/protocol/clawdoll" "mongo.games.com/game/protocol/machine" + "mongo.games.com/goserver/core/basic" "mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/netlib" + "mongo.games.com/goserver/core/task" "mongo.games.com/goserver/core/timer" "strconv" ) @@ -169,7 +172,7 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf return nil } - logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v, streamId = %v,snid = %d", machineInfo.AppId, machineInfo.ServerSecret, machineInfo.StreamId, p.SnId) + logger.Logger.Tracef("CSGetTokenHandler appId = %v, serverSecret = %v, streamId = %v,snid = %d", machineInfo.AppId, machineInfo.ServerSecret, machineInfo.StreamId, p.SnId) //生成token token, err := token04.GenerateToken04(uint32(machineInfo.AppId), strconv.Itoa(int(p.SnId)), machineInfo.ServerSecret, 3600, "") @@ -189,6 +192,76 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf } return nil } + +type CSGetPlayerLogPacketFactory struct { +} + +type CSGetPlayerLogHandler struct { +} + +func (f *CSGetPlayerLogPacketFactory) CreatePacket() interface{} { + pack := &clawdoll.CSCLAWDOLLGetPlayerLog{} + return pack +} + +func (h *CSGetPlayerLogHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error { + //转发到娃娃机主机 + logger.Logger.Tracef("CSGetPlayerLogHandler") + if msg, ok := data.(*clawdoll.CSCLAWDOLLGetPlayerLog); ok { + p := base.PlayerMgrSington.GetPlayer(sid) + if p == nil { + logger.Logger.Warn("CSGetPlayerLogHandler 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("CSGetPlayerLogHandler machineId = %v not found", machineId) + return nil + } + + logger.Logger.Tracef("CSGetPlayerLogHandler appId = %v, serverSecret = %v, streamId = %v,snid = %d", machineInfo.AppId, machineInfo.ServerSecret, machineInfo.StreamId, p.SnId) + + ret := &clawdoll.SCCLAWDOLLSendPlayerLog{} + ret.Type = msg.GetType() + + var err error + var ItemLogs []model.ClawdollSuccessItemLog + + //娃娃机道具使用日志 + task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { + ItemLogs, err = model.GetClawdollSuccessItemLog(p.Platform, p.SnId) + return err + }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) { + for _, logData := range ItemLogs { + infoData := &clawdoll.ClawdollSuccessItemLog{} + + infoData.SnId = logData.SnId + infoData.Name = logData.Name + infoData.ModId = logData.ModId + infoData.Time = logData.Time + + ret.ItemLogs = append(ret.ItemLogs, infoData) + } + + p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_SENDPLAYERLOG), ret) + logger.Logger.Tracef("CSGetPlayerLogHandler:%v", ret) + }), "GetPlayerLogHandler").Start() + } + + return nil +} + func init() { common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{}) netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{}) @@ -196,4 +269,8 @@ 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_GETPLAYERLOG), &CSGetPlayerLogHandler{}) + netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETPLAYERLOG), &CSGetPlayerLogPacketFactory{}) + } diff --git a/model/itemdatalog.go b/model/itemdatalog.go index 838c5b8..9b1e6ae 100644 --- a/model/itemdatalog.go +++ b/model/itemdatalog.go @@ -2,11 +2,10 @@ package model import ( "errors" - "mongo.games.com/game/protocol/server" - "time" - "github.com/globalsign/mgo/bson" + "mongo.games.com/game/protocol/server" "mongo.games.com/goserver/core/logger" + "time" ) var ( @@ -129,8 +128,7 @@ func UpdateItemState(param *UpdateParam) error { type ClawdollItemLogReq struct { Platform string - Snid int32 // 玩家id - ItemIds []int32 // 道具id + Snid int32 // 玩家id } type GetClawdollItemLogRet struct { @@ -149,8 +147,6 @@ func GetClawdollItemLog(plt string, snid int32) (logs []ItemLog, err error) { Snid: snid, } - args.ItemIds = append(args.ItemIds, ClawDollItemIds...) - var ret GetClawdollItemLogRet //var ret ClawdollItemLogRet @@ -165,6 +161,46 @@ func GetClawdollItemLog(plt string, snid int32) (logs []ItemLog, err error) { return } +type ClawdollSuccessItemLogReq struct { + Platform string +} + +type ClawdollSuccessItemLog struct { + SnId int32 // 玩家id + Name string //玩家名字 + ModId int32 // 头像ID + Time int64 //时间 +} + +type GetClawdollSuccessItemLogRet struct { + Logs []ClawdollSuccessItemLog +} + +func GetClawdollSuccessItemLog(plt string, snid int32) (logs []ClawdollSuccessItemLog, err error) { + + if rpcCli == nil { + logger.Logger.Error("model.GetClawdollSuccessItemLog rpcCli == nil") + return + } + + args := &ClawdollSuccessItemLogReq{ + Platform: plt, + } + + var ret GetClawdollSuccessItemLogRet + + //var ret GetClawdollItemLogRet + err = rpcCli.CallWithTimeout("ItemLogSvc.GetClawdollSuccessItemLog", args, &ret, time.Second*30) + if err != nil { + logger.Logger.Warnf("GetClawdollSuccessItemLog err:%v", err) + return + } + + logs = ret.Logs + + return +} + type GetItemLogParam struct { Plt string SnId int32 diff --git a/protocol/clawdoll/clawdoll.pb.go b/protocol/clawdoll/clawdoll.pb.go index 7f6bfba..04b2abf 100644 --- a/protocol/clawdoll/clawdoll.pb.go +++ b/protocol/clawdoll/clawdoll.pb.go @@ -24,20 +24,22 @@ const ( type CLAWDOLLPacketID int32 const ( - CLAWDOLLPacketID_PACKET_ZERO CLAWDOLLPacketID = 0 //弃用消息号 - CLAWDOLLPacketID_PACKET_SC_ROOMINFO CLAWDOLLPacketID = 5601 //房间信息 - CLAWDOLLPacketID_PACKET_CS_PLAYEROP CLAWDOLLPacketID = 5602 //玩家操作(客户->服务) - CLAWDOLLPacketID_PACKET_SC_PLAYEROP CLAWDOLLPacketID = 5603 //玩家操作(服务->客户) - CLAWDOLLPacketID_PACKET_SC_ROOMSTATE CLAWDOLLPacketID = 5604 //房间状态 - CLAWDOLLPacketID_PACKET_SC_GAMEBILLED CLAWDOLLPacketID = 5605 //游戏结算 - CLAWDOLLPacketID_PACKET_SC_PlayerEnter CLAWDOLLPacketID = 5606 // 玩家进入 - CLAWDOLLPacketID_PACKET_SC_PlayerLeave CLAWDOLLPacketID = 5607 // 玩家离开 - CLAWDOLLPacketID_PACKET_SC_PLAYERINFO CLAWDOLLPacketID = 5608 // 玩家状态信息变化 - CLAWDOLLPacketID_PACKET_CS_GETTOKEN CLAWDOLLPacketID = 5609 // 获取token - CLAWDOLLPacketID_PACKET_SC_SENDTOKEN CLAWDOLLPacketID = 5610 // 获取token - CLAWDOLLPacketID_PACKET_CS_WAITPLAYERS CLAWDOLLPacketID = 5611 // 获取等待玩家信息 (客户->服务) - CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS CLAWDOLLPacketID = 5612 // 获取等待玩家信息 (服务->客户) - CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO CLAWDOLLPacketID = 5613 // 正在控制娃娃机的玩家信息 (服务->客户) + CLAWDOLLPacketID_PACKET_ZERO CLAWDOLLPacketID = 0 //弃用消息号 + CLAWDOLLPacketID_PACKET_SC_ROOMINFO CLAWDOLLPacketID = 5601 //房间信息 + CLAWDOLLPacketID_PACKET_CS_PLAYEROP CLAWDOLLPacketID = 5602 //玩家操作(客户->服务) + CLAWDOLLPacketID_PACKET_SC_PLAYEROP CLAWDOLLPacketID = 5603 //玩家操作(服务->客户) + CLAWDOLLPacketID_PACKET_SC_ROOMSTATE CLAWDOLLPacketID = 5604 //房间状态 + CLAWDOLLPacketID_PACKET_SC_GAMEBILLED CLAWDOLLPacketID = 5605 //游戏结算 + CLAWDOLLPacketID_PACKET_SC_PlayerEnter CLAWDOLLPacketID = 5606 // 玩家进入 + CLAWDOLLPacketID_PACKET_SC_PlayerLeave CLAWDOLLPacketID = 5607 // 玩家离开 + CLAWDOLLPacketID_PACKET_SC_PLAYERINFO CLAWDOLLPacketID = 5608 // 玩家状态信息变化 + CLAWDOLLPacketID_PACKET_CS_GETTOKEN CLAWDOLLPacketID = 5609 // 获取token + CLAWDOLLPacketID_PACKET_SC_SENDTOKEN CLAWDOLLPacketID = 5610 // 获取token + CLAWDOLLPacketID_PACKET_CS_WAITPLAYERS CLAWDOLLPacketID = 5611 // 获取等待玩家信息 (客户->服务) + CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS CLAWDOLLPacketID = 5612 // 获取等待玩家信息 (服务->客户) + CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO CLAWDOLLPacketID = 5613 // 正在控制娃娃机的玩家信息 (服务->客户) + CLAWDOLLPacketID_PACKET_CS_GETPLAYERLOG CLAWDOLLPacketID = 5614 // 获取玩家操作日志 + CLAWDOLLPacketID_PACKET_SC_SENDPLAYERLOG CLAWDOLLPacketID = 5615 // 发送玩家操作日志 ) // Enum value maps for CLAWDOLLPacketID. @@ -57,22 +59,26 @@ var ( 5611: "PACKET_CS_WAITPLAYERS", 5612: "PACKET_SC_WAITPLAYERS", 5613: "PACKET_SC_PLAYINGINFO", + 5614: "PACKET_CS_GETPLAYERLOG", + 5615: "PACKET_SC_SENDPLAYERLOG", } CLAWDOLLPacketID_value = map[string]int32{ - "PACKET_ZERO": 0, - "PACKET_SC_ROOMINFO": 5601, - "PACKET_CS_PLAYEROP": 5602, - "PACKET_SC_PLAYEROP": 5603, - "PACKET_SC_ROOMSTATE": 5604, - "PACKET_SC_GAMEBILLED": 5605, - "PACKET_SC_PlayerEnter": 5606, - "PACKET_SC_PlayerLeave": 5607, - "PACKET_SC_PLAYERINFO": 5608, - "PACKET_CS_GETTOKEN": 5609, - "PACKET_SC_SENDTOKEN": 5610, - "PACKET_CS_WAITPLAYERS": 5611, - "PACKET_SC_WAITPLAYERS": 5612, - "PACKET_SC_PLAYINGINFO": 5613, + "PACKET_ZERO": 0, + "PACKET_SC_ROOMINFO": 5601, + "PACKET_CS_PLAYEROP": 5602, + "PACKET_SC_PLAYEROP": 5603, + "PACKET_SC_ROOMSTATE": 5604, + "PACKET_SC_GAMEBILLED": 5605, + "PACKET_SC_PlayerEnter": 5606, + "PACKET_SC_PlayerLeave": 5607, + "PACKET_SC_PLAYERINFO": 5608, + "PACKET_CS_GETTOKEN": 5609, + "PACKET_SC_SENDTOKEN": 5610, + "PACKET_CS_WAITPLAYERS": 5611, + "PACKET_SC_WAITPLAYERS": 5612, + "PACKET_SC_PLAYINGINFO": 5613, + "PACKET_CS_GETPLAYERLOG": 5614, + "PACKET_SC_SENDPLAYERLOG": 5615, } ) @@ -1074,6 +1080,181 @@ func (x *CLAWDOLLPlayerDigestInfo) GetStat() int32 { return 0 } +//PACKET_CS_GETPLAYERLOG = 5614; // 获取玩家操作日志 +type CSCLAWDOLLGetPlayerLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type int32 `protobuf:"varint,1,opt,name=Type,proto3" json:"Type,omitempty"` // 请求类型 +} + +func (x *CSCLAWDOLLGetPlayerLog) Reset() { + *x = CSCLAWDOLLGetPlayerLog{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSCLAWDOLLGetPlayerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSCLAWDOLLGetPlayerLog) ProtoMessage() {} + +func (x *CSCLAWDOLLGetPlayerLog) 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 CSCLAWDOLLGetPlayerLog.ProtoReflect.Descriptor instead. +func (*CSCLAWDOLLGetPlayerLog) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{13} +} + +func (x *CSCLAWDOLLGetPlayerLog) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +type ClawdollSuccessItemLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` //玩家名字 + ModId int32 `protobuf:"varint,3,opt,name=ModId,proto3" json:"ModId,omitempty"` // 头像ID + Time int64 `protobuf:"varint,4,opt,name=Time,proto3" json:"Time,omitempty"` //时间 +} + +func (x *ClawdollSuccessItemLog) Reset() { + *x = ClawdollSuccessItemLog{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClawdollSuccessItemLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClawdollSuccessItemLog) ProtoMessage() {} + +func (x *ClawdollSuccessItemLog) 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 ClawdollSuccessItemLog.ProtoReflect.Descriptor instead. +func (*ClawdollSuccessItemLog) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{14} +} + +func (x *ClawdollSuccessItemLog) GetSnId() int32 { + if x != nil { + return x.SnId + } + return 0 +} + +func (x *ClawdollSuccessItemLog) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ClawdollSuccessItemLog) GetModId() int32 { + if x != nil { + return x.ModId + } + return 0 +} + +func (x *ClawdollSuccessItemLog) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +//PACKET_SC_SENDPLAYERLOG = 5615; // 发送玩家操作日志 +type SCCLAWDOLLSendPlayerLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type int32 `protobuf:"varint,1,opt,name=Type,proto3" json:"Type,omitempty"` // 请求类型 + ItemLogs []*ClawdollSuccessItemLog `protobuf:"bytes,2,rep,name=ItemLogs,proto3" json:"ItemLogs,omitempty"` +} + +func (x *SCCLAWDOLLSendPlayerLog) Reset() { + *x = SCCLAWDOLLSendPlayerLog{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLSendPlayerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLSendPlayerLog) ProtoMessage() {} + +func (x *SCCLAWDOLLSendPlayerLog) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_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 SCCLAWDOLLSendPlayerLog.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLSendPlayerLog) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{15} +} + +func (x *SCCLAWDOLLSendPlayerLog) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *SCCLAWDOLLSendPlayerLog) GetItemLogs() []*ClawdollSuccessItemLog { + if x != nil { + return x.ItemLogs + } + return nil +} + var File_clawdoll_proto protoreflect.FileDescriptor var file_clawdoll_proto_rawDesc = []byte{ @@ -1183,40 +1364,61 @@ 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, 0x2c, 0x0a, 0x16, 0x43, 0x53, 0x43, 0x4c, + 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6a, 0x0a, 0x16, 0x43, 0x6c, 0x61, 0x77, 0x64, 0x6f, + 0x6c, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x4c, 0x6f, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x53, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x49, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4d, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x6b, 0x0a, 0x17, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, + 0x53, 0x65, 0x6e, 0x64, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x43, + 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x74, + 0x65, 0x6d, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x4c, 0x6f, 0x67, 0x73, 0x2a, + 0xb8, 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, + 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x47, 0x45, 0x54, + 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4c, 0x4f, 0x47, 0x10, 0xee, 0x2b, 0x12, 0x1c, 0x0a, 0x17, + 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x50, 0x4c, + 0x41, 0x59, 0x45, 0x52, 0x4c, 0x4f, 0x47, 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 +1434,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, 16) var file_clawdoll_proto_goTypes = []interface{}{ (CLAWDOLLPacketID)(0), // 0: clawdoll.CLAWDOLLPacketID (OpResultCode)(0), // 1: clawdoll.OpResultCode @@ -1249,17 +1451,21 @@ var file_clawdoll_proto_goTypes = []interface{}{ (*SCCLAWDOLLSendToken)(nil), // 12: clawdoll.SCCLAWDOLLSendToken (*CLAWDOLLWaitPlayers)(nil), // 13: clawdoll.CLAWDOLLWaitPlayers (*CLAWDOLLPlayerDigestInfo)(nil), // 14: clawdoll.CLAWDOLLPlayerDigestInfo + (*CSCLAWDOLLGetPlayerLog)(nil), // 15: clawdoll.CSCLAWDOLLGetPlayerLog + (*ClawdollSuccessItemLog)(nil), // 16: clawdoll.ClawdollSuccessItemLog + (*SCCLAWDOLLSendPlayerLog)(nil), // 17: clawdoll.SCCLAWDOLLSendPlayerLog } var file_clawdoll_proto_depIdxs = []int32{ 2, // 0: clawdoll.SCCLAWDOLLRoomInfo.Players:type_name -> clawdoll.CLAWDOLLPlayerData 1, // 1: clawdoll.SCCLAWDOLLOp.OpRetCode:type_name -> clawdoll.OpResultCode 14, // 2: clawdoll.SCCLAWDOLLPlayerEnter.Data:type_name -> clawdoll.CLAWDOLLPlayerDigestInfo 14, // 3: clawdoll.CLAWDOLLWaitPlayers.WaitPlayersInfo:type_name -> clawdoll.CLAWDOLLPlayerDigestInfo - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 16, // 4: clawdoll.SCCLAWDOLLSendPlayerLog.ItemLogs:type_name -> clawdoll.ClawdollSuccessItemLog + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_clawdoll_proto_init() } @@ -1424,6 +1630,42 @@ func file_clawdoll_proto_init() { return nil } } + file_clawdoll_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSCLAWDOLLGetPlayerLog); 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.(*ClawdollSuccessItemLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLSendPlayerLog); 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 +1673,7 @@ func file_clawdoll_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_clawdoll_proto_rawDesc, NumEnums: 2, - NumMessages: 13, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/clawdoll/clawdoll.proto b/protocol/clawdoll/clawdoll.proto index 3c57c6d..673b2e5 100644 --- a/protocol/clawdoll/clawdoll.proto +++ b/protocol/clawdoll/clawdoll.proto @@ -18,6 +18,8 @@ enum CLAWDOLLPacketID { PACKET_CS_WAITPLAYERS = 5611; // 获取等待玩家信息 (客户->服务) PACKET_SC_WAITPLAYERS = 5612; // 获取等待玩家信息 (服务->客户) PACKET_SC_PLAYINGINFO = 5613; // 正在控制娃娃机的玩家信息 (服务->客户) + PACKET_CS_GETPLAYERLOG = 5614; // 获取玩家操作日志 + PACKET_SC_SENDPLAYERLOG = 5615; // 发送玩家操作日志 } //操作结果 @@ -131,4 +133,23 @@ message CLAWDOLLPlayerDigestInfo { string HeadUrl = 3; //头像 string Name = 4; //名字 int32 Stat = 5; //玩家状态 0:排队状态 5:大厅观众状态 -} \ No newline at end of file +} + + +//PACKET_CS_GETPLAYERLOG = 5614; // 获取玩家操作日志 +message CSCLAWDOLLGetPlayerLog { + int32 Type = 1; // 请求类型 +} + +message ClawdollSuccessItemLog { + int32 SnId = 1; // 玩家id + string Name = 2; //玩家名字 + int32 ModId = 3; // 头像ID + int64 Time = 4; //时间 +} + +//PACKET_SC_SENDPLAYERLOG = 5615; // 发送玩家操作日志 +message SCCLAWDOLLSendPlayerLog { + int32 Type = 1; // 请求类型 + repeated ClawdollSuccessItemLog ItemLogs = 2; +} diff --git a/worldsrv/action_player.go b/worldsrv/action_player.go index b09a0be..c84e5d2 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -3171,24 +3171,6 @@ func CSClawdollItemLog(s *netlib.Session, packetId int, data interface{}, sid in return nil } - var change []*model.Item - change = append(change, &model.Item{ - ItemId: common.ItemIDClawdoll, - ItemNum: 3, - }) - - BagMgrSingleton.AddItems(&model.AddItemParam{ - Platform: p.Platform, - SnId: p.SnId, - Change: change, - Add: 0, - GainWay: common.GainWayItemShopChangeDoll, - Operator: "system", - Remark: "商城兑换娃娃", - GameId: 0, - GameFreeId: 0, - }) - msg, ok := data.(*player_proto.CSClawdollItemLog) if !ok { return nil