From b291fbaa85e5787489ce5f174514f0b8be7303c5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 18 Apr 2024 17:53:27 +0800 Subject: [PATCH] 1 --- server/matchserver/cs/cs.auto_gen.go | 24 ++++++++++++++++++++++++ server/matchserver/proto/cs_msgid.proto | 2 ++ server/matchserver/proto/cs_proto.proto | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/server/matchserver/cs/cs.auto_gen.go b/server/matchserver/cs/cs.auto_gen.go index c37346b5..5f151da9 100644 --- a/server/matchserver/cs/cs.auto_gen.go +++ b/server/matchserver/cs/cs.auto_gen.go @@ -48,6 +48,7 @@ type MsgHandler interface { CMSetSpecSkill(*f5.MsgHdr, *CMSetSpecSkill) CMChooseHero(*f5.MsgHdr, *CMChooseHero) CMChooseMap(*f5.MsgHdr, *CMChooseMap) + CMRefreshUser(*f5.MsgHdr, *CMRefreshUser) CMGrantInvitePermission(*f5.MsgHdr, *CMGrantInvitePermission) } @@ -90,6 +91,9 @@ func (this *MsgHandlerImpl) CMChooseHero(hdr *f5.MsgHdr, msg *CMChooseHero) { func (this *MsgHandlerImpl) CMChooseMap(hdr *f5.MsgHdr, msg *CMChooseMap) { } +func (this *MsgHandlerImpl) CMRefreshUser(hdr *f5.MsgHdr, msg *CMRefreshUser) { +} + func (this *MsgHandlerImpl) CMGrantInvitePermission(hdr *f5.MsgHdr, msg *CMGrantInvitePermission) { } @@ -201,6 +205,14 @@ func (this *SMChooseMap) GetNetMsgId() uint16 { return uint16(SMMessageIdE__SMChooseMap) } +func (this *CMRefreshUser) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMRefreshUser) +} + +func (this *SMRefreshUser) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMRefreshUser) +} + func (this *CMGrantInvitePermission) GetNetMsgId() uint16 { return uint16(CMMessageIdE__CMGrantInvitePermission) } @@ -461,6 +473,18 @@ func init() { }, } + handlers[int(CMMessageIdE__CMRefreshUser)] = &CsNetMsgHandler{ + MsgId: int(CMMessageIdE__CMRefreshUser), + ParseCb: func (data []byte) interface{} { + msg := &CMRefreshUser{} + proto.Unmarshal(data, msg) + return msg + }, + Cb: func (hdr *f5.MsgHdr, handler MsgHandler) { + handler.CMRefreshUser(hdr, hdr.Msg.(*CMRefreshUser)) + }, + } + handlers[int(CMMessageIdE__CMGrantInvitePermission)] = &CsNetMsgHandler{ MsgId: int(CMMessageIdE__CMGrantInvitePermission), ParseCb: func (data []byte) interface{} { diff --git a/server/matchserver/proto/cs_msgid.proto b/server/matchserver/proto/cs_msgid.proto index 627aace3..076d9e08 100644 --- a/server/matchserver/proto/cs_msgid.proto +++ b/server/matchserver/proto/cs_msgid.proto @@ -20,6 +20,7 @@ enum CMMessageId_e _CMSetSpecSkill = 115; _CMChooseHero = 116; _CMChooseMap = 117; + _CMRefreshUser = 118; } enum SMMessageId_e @@ -39,6 +40,7 @@ enum SMMessageId_e _SMSetSpecSkill = 115; _SMChooseHero = 116; _SMChooseMap = 117; + _SMRefreshUser = 118; _SMTeamUpdateNotify = 1001; _SMTeamStateNotify = 1002; diff --git a/server/matchserver/proto/cs_proto.proto b/server/matchserver/proto/cs_proto.proto index b30d39d2..f4b6d89d 100644 --- a/server/matchserver/proto/cs_proto.proto +++ b/server/matchserver/proto/cs_proto.proto @@ -132,6 +132,10 @@ message MFTeamMember optional int32 permission = 8; //是否有邀请权限 optional int32 is_ready = 9; //是否已准备 optional int32 id = 10; //编号 + optional int32 wealth = 11; //财富值 + optional int64 total_lucky = 12; //英雄的 lucky 字段的总和 + optional int32 valid_lefttime = 13; //最大有效时间 + optional int32 admission_item_num = 14; //门票数 } //队伍信息 @@ -305,6 +309,15 @@ message SMChooseMap optional string errmsg = 2; //错误描述 } +//刷新用户信息一般是短连接修改了用户相关数据时调用 +message CMRefreshUser +{ +} + +message SMRefreshUser +{ +} + //授予邀请队友权限 message CMGrantInvitePermission {