This commit is contained in:
azw 2023-02-15 13:46:05 +00:00
parent 6a7d590967
commit 3045ed1a11
2 changed files with 990 additions and 0 deletions

View File

@ -0,0 +1,132 @@
package cs;
//id定义
enum CMMessageId_e
{
_CMPing = 101;
_CMLogin = 103;
_CMFriendInvite = 105;
_CMFriendAgree = 106;
_CMFriendDelete = 108;
_CMFriendApply = 109;
_CMFriendApplyList = 110;
_CMFriendBlackList = 111;
_CMFriendAddBlack = 112;
_CMFriendDeleteBlack = 113;
_CMFriendRefuse = 114;
_CMFriendList = 115;
_CMQueryUserStatus = 116;
_CMRecommandFriend = 117;
_CMFriendIdList = 118;
_CMSendChatMsg = 151;
_CMSendCustomMsg = 152;
_CMUpdateTempCustomData = 153;
_CMUpdateUserInfo = 154;
_CMDirtyWordCheck = 155;
_CMGetUserGuild = 156;
_CMReadMsgAndOpenChatNotify = 157;
_CMCloseChatNotify = 158;
_CMSetCurrPrivateChatTarget = 159;
_CMGuildMsgBegin = 230;
_CMGuildCreate = 231;
_CMGuildJoin = 232;
_CMGuildAgree = 233;
_CMGuildKick = 234;
_CMGuildQuit = 235;
_CMGuildDismiss = 236;
_CMGuildChange = 237;
_CMGuildInfo = 238;
_CMGuildSearch = 239;
_CMGuildRank = 240;
_CMGuildMemberList = 241;
_CMGuildApplyList = 242;
_CMGuildLog = 243;
_CMGuildMemberSetJob = 244;
_CMGuildRefuse = 245;
_CMGuildAgreeInvite = 246;
_CMGuildGainExp = 247;
_CMGuildSearchMember = 248;
_CMGuildMsgEnd = 270;
_CMTeamCreate = 301;
_CMTeamJoin = 302;
_CMTeamAgree = 303;
_CMTeamKick = 304;
_CMTeamQuit = 305;
_CMTeamDismiss = 306;
_CMTeamRename = 307;
}
enum SMMessageId_e
{
_SMPing = 101;
_SMRpcError = 102;
_SMLogin = 103;
_SMFriendInvite = 105;
_SMFriendAgree = 106;
_SMFriendDelete = 108;
_SMFriendApply = 109;
_SMFriendApplyList = 110;
_SMFriendBlackList = 111;
_SMFriendAddBlack = 112;
_SMFriendDeleteBlack = 113;
_SMFriendRefuse = 114;
_SMFriendList = 115;
_SMQueryUserStatus = 116;
_SMRecommandFriend = 117;
_SMFriendIdList = 118;
_SMDirtyWordCheck = 155;
_SMGetUserGuild = 156;
_SMGuildMsgBegin = 230;
_SMGuildCreate = 231;
_SMGuildJoin = 232;
_SMGuildAgree = 233;
_SMGuildKick = 234;
_SMGuildQuit = 235;
_SMGuildDismiss = 236;
_SMGuildChange = 237;
_SMGuildInfo = 238;
_SMGuildSearch = 239;
_SMGuildRank = 240;
_SMGuildMemberList = 241;
_SMGuildApplyList = 242;
_SMGuildLog = 243;
_SMGuildMemberSetJob = 244;
_SMGuildRefuse = 245;
_SMGuildAgreeInvite = 246;
_SMGuildGainExp = 247;
_SMGuildSearchMember = 248;
_SMGuildMsgEnd = 270;
_SMTeamCreate = 301;
_SMTeamJoin = 302;
_SMTeamAgree = 303;
_SMTeamKick = 304;
_SMTeamQuit = 305;
_SMTeamDismiss = 306;
_SMTeamRename = 307;
_SMUserStatusNotify = 501;
_SMUserInfoUpdate = 502;
_SMCustomMsgNotify = 503;
_SMUserTempCustomDataUpdate = 504;
_SMDeleteFriendNotify = 505;
_SMUpdateAccountInfo = 506;
_SMUpdateRedPointNotify = 507;
_SMShowErrorMsg = 508;
_SMAddBlackListNotify = 509;
_SMDeleteBlackListNotify = 510;
_SMUpdateChatRedPointNotify = 511;
_SMUpdateChatChannelLastId = 512;
_SMUpdatePrivateChatRedPointNotify = 513;
_SMChatMsgNotify = 514;
}

View File

@ -0,0 +1,858 @@
package cs;
//
enum Constant_e
{
ProtoVersion = 2020061101; //
}
//(60)
message CMPing
{
}
message SMPing
{
optional int32 param1 = 1;
}
//string元组
message MFStringTuple
{
repeated string values = 1; //values
}
//int32 pair
message MFPairInt32
{
optional int32 key = 1; //key
optional int32 val = 2; //val
}
//int64 pair
message MFPairInt64
{
optional int64 key = 1; //key
optional int64 val = 2; //val
}
//
message MFPaging
{
optional int32 curr_page = 1; //0
optional int32 page_size = 2; //
optional int32 _total_page = 3; //
optional int32 _total_count = 4; //
}
//(线db)
message MFBaseUserData
{
optional string account_id = 1; //id
optional string nickname = 2; //
optional string avatar_url = 3; //
optional int32 sex = 4; // 1 2 0
optional int32 last_login_time = 5; //
optional int64 guild_id = 6; //id(0)
optional int32 guild_job = 7; // 1: 2: 3 (0)
optional int32 vip_lv = 8 [default = 0]; //
optional int32 head = 9 [default = 0]; //
optional int32 contribute = 10 [default = 0]; //
optional int32 zid = 11 [default = 0]; //zid
optional int64 user_value1 = 50; //1
optional int64 user_value2 = 51; //2
optional int64 user_value3 = 52; //3
optional int64 base_data_version = 100; //
optional int32 _online = 101; //线
}
//(/线0)
message MFUserTempCustomData
{
optional int64 value1 = 1 [default = 0]; //1
optional int64 value2 = 2 [default = 0]; //2
optional int64 value3 = 3 [default = 0]; //3
}
//()
message MFAccountInfo
{
optional MFUserInfo user_info = 1; //
optional string user_sign = 2; //
}
//
message MFUserInfo
{
optional MFBaseUserData base_data = 1; //
optional MFUserTempCustomData temp_custom_data = 2; //
optional int32 is_sys_user = 3; //
}
//
message MFUserStatus
{
optional string account_id = 1; //id
optional int32 _online = 2; //线
optional MFUserTempCustomData temp_custom_data = 3; //
}
//
message MFFriendApply
{
optional int64 idx = 1; //id
optional int64 applyid = 2; //applyid
optional string target_id = 3; //target_id
optional MFBaseUserData base_data = 4; //
}
//
message MFGuildApply
{
optional int64 idx = 1; //id
optional int64 applyid = 2; //applyid
optional int64 guild_id = 3; //guild_id
optional MFBaseUserData base_data = 4; //
}
//
message MFGuildBasic
{
optional int64 guild_id = 1; //id
optional string guild_name = 2; //
optional int32 guild_lv = 3; //
optional double guild_exp = 4; //
optional int32 guild_badge = 5; //
optional int32 member_num = 6; //
optional string guild_declaration = 7; //
optional string owner_id = 8; //id
optional string owner_name = 9; //
optional string owner_avatar_url = 10; //
optional int32 owner_sex = 23; //
optional int32 owner_vip_lv = 12 [default = 0]; //vip等级
optional int32 owner_head = 13 [default = 0]; //
optional int32 join_unlimited = 11; //
optional int32 join_cond1 = 20; //1
optional int32 join_cond2 = 21; //2
optional int32 applyed = 22; //
optional int32 _gameid = 100; //gameid
optional int32 _channel = 101; //channel
optional int32 _createtime = 102; //createtime
optional int32 _modifytime = 103; //modifytime
optional int64 _name_ext1 = 104; //name_ext1
optional int64 _name_ext2 = 105; //name_ext2
optional int64 _guild_status = 106; //guild_status
}
//
message MFChatMsg
{
/*
id,chat_channel + msg_uuid作为主键
!!!msg_uuid可能重复
*/
optional int64 msg_uuid = 1;
optional MFUserInfo sender = 2; //
optional MFUserInfo receiver = 3; //
optional int32 chat_channel = 4; //
optional int32 msg_type = 5; // 0(json) 1 (json) 2:()
optional string msg_body = 6; //(json类型里的字段!)
optional int32 send_time = 7; //
}
//
message CMLoginCommonHead
{
optional int32 server_id = 1; //
}
message CMLoginOld
{
optional string account_id = 3; //id
optional string session_id = 20; //sessionid
optional string nickname = 4; //
optional string avatar_url = 5; //
optional int32 sex = 6; //
}
message CMLogin
{
optional int32 server_id = 1; //(1)
optional string reserved2 = 2; //
optional string account_id = 3; //id
optional string session_id = 20; //sessionid
optional string nickname = 4; //
optional int32 proto_version = 5; //Constant_e.ProtoVersion
optional int32 sex = 6; //
optional string avatar_url = 7; //
optional int32 vip_lv = 8; //
optional int32 head = 9; //
optional int32 zid = 10; //zid
}
//
message SMLogin
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFAccountInfo account_info = 3; //
}
//()
message CMUpdateUserInfo
{
optional string nickname = 2; //
optional string avatar_url = 3; //
optional int32 sex = 4; // 1 2 0
optional int32 vip_lv = 8; //
optional int32 head = 9; //
optional int32 contribute = 10; //
optional int64 user_value1 = 50; //1
optional int64 user_value2 = 51; //2
optional int64 user_value3 = 52; //3
optional int32 delay_time = 100; //()
optional int32 delay_flag = 101; //(1-16)flag定时器覆盖
}
//
message CMDirtyWordCheck
{
optional string text = 2; //
}
//
message SMDirtyWordCheck
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMGetUserGuild
{
optional string account_id = 1; //id
}
//
message SMGetUserGuild
{
optional int32 errcode = 1; //1:
optional string errmsg = 2; //
optional string account_id = 3; //id
optional int64 guild_id = 4; //id(0)
optional int32 guild_job = 5; // 1: 2: 3 (0)
}
//
message CMFriendList
{
}
//
message SMFriendList
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
repeated MFUserInfo friend_list = 3; //
}
//
message CMFriendApply
{
optional string friend_id = 1; //id
optional string msg = 2; //
}
//
message SMFriendApply
{
optional int32 errcode = 1; //1:
optional string errmsg = 2; //
}
//
message CMFriendApplyList
{
optional MFPaging paging = 1; //
}
//
message SMFriendApplyList
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFPaging paging = 3; //
repeated MFFriendApply apply_list = 4; //
}
//
message CMFriendAgree
{
optional MFFriendApply apply = 1; //
}
//
message SMFriendAgree
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMFriendRefuse
{
optional MFFriendApply apply = 1; //
}
//
message SMFriendRefuse
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMFriendDelete
{
optional string friend_id = 1; //id
}
//
message SMFriendDelete
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional string friend_id = 3; //id
}
//
message CMFriendBlackList
{
}
//
message SMFriendBlackList
{
repeated MFUserInfo black_list = 1; //
}
//
message CMFriendAddBlack
{
optional MFUserInfo user_info = 1; //
}
//
message SMFriendAddBlack
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMFriendDeleteBlack
{
optional string account_id = 1; //id
}
//
message SMFriendDeleteBlack
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
///id列表
message CMFriendIdList
{
}
///id列表回复
message SMFriendIdList
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
repeated string friends = 3; //
repeated string blacklist = 4; //
}
//
message CMTeamCreate
{
optional string team_name = 1; //
}
//
message SMTeamCreate
{
optional int32 errcode = 1; //1: 2:
optional string errmsg = 2; //
}
//
message CMTeamJoin
{
optional int64 team_id = 1; //id
}
//
message SMTeamJoin
{
optional int32 errcode = 1; //1:id不存在 2:
optional string errmsg = 2; //
}
//
message CMTeamAgree
{
}
message SMTeamAgree
{
optional int32 errcode = 1;
optional string errmsg = 2;
}
//
message CMTeamKick
{
optional string account_id = 1;
}
//
message SMTeamKick
{
optional int32 errcode = 1; //1:id错误
optional string errmsg = 2; //
}
//退
message CMTeamQuit
{
}
message SMTeamQuit
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMTeamDismiss
{
}
message SMTeamDismiss
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMTeamRename
{
optional string new_team_name = 1; //
}
message SMTeamRename
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMGuildInfo
{
optional int64 guild_id = 1; //id
}
//
message SMGuildInfo
{
optional int32 errcode = 1; //1:
optional string errmsg = 2; //
optional MFGuildBasic info = 3; //
}
//
message CMGuildCreate
{
optional string guild_name = 1; //
optional int32 guild_badge = 2; //
optional string guild_declaration = 3; //
optional int32 join_unlimited = 4; //
optional int32 join_cond1 = 5; //1
optional int32 join_cond2 = 6; //2
}
//
message SMGuildCreate
{
optional int32 errcode = 1; //1: 2:
optional string errmsg = 2; //
optional int64 guild_id = 3; //id
}
//
message CMGuildJoin
{
optional int64 guild_id = 1; //id
}
//
message SMGuildJoin
{
optional int32 errcode = 1; //1:id不存在 2:
optional string errmsg = 2; //
}
//
message CMGuildAgree
{
optional MFGuildApply apply = 1; //
optional int32 batchid = 2; //id相同建议用时间戳
}
message SMGuildAgree
{
optional int32 errcode = 1;
optional string errmsg = 2;
}
//
message CMGuildRefuse
{
optional MFGuildApply apply = 1; //
optional int32 batchid = 2; //id相同建议用时间戳
}
message SMGuildRefuse
{
optional int32 errcode = 1;
optional string errmsg = 2;
}
//
message CMGuildKick
{
optional string account_id = 1;
}
//
message SMGuildKick
{
optional int32 errcode = 1; //1:id错误
optional string errmsg = 2; //
}
//退
message CMGuildQuit
{
}
message SMGuildQuit
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMGuildDismiss
{
}
message SMGuildDismiss
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//()
message CMGuildChange
{
optional string guild_name = 1; //
optional int32 guild_badge = 2; //
optional string guild_declaration = 3; //
optional int32 join_unlimited = 4; //
optional int32 join_cond1 = 5; //1
optional int32 join_cond2 = 6; //2
}
message SMGuildChange
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFGuildBasic info = 3; //
}
//
message CMGuildSearch
{
optional MFPaging paging = 1; //
optional string guild_name = 2; //
}
message SMGuildSearch
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFPaging paging = 3; //
repeated MFGuildBasic guild_list = 4; //
}
//
message CMGuildRank
{
optional MFPaging paging = 1; //
}
message SMGuildRank
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFPaging paging = 3; //
repeated MFGuildBasic guild_list = 4; //
}
//
message CMGuildMemberList
{
optional MFPaging paging = 1; //
optional string member_name = 2; //
}
message SMGuildMemberList
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFPaging paging = 3; //
repeated MFUserInfo member_list = 4; //
optional int32 guild_lv = 5; //
}
//
message CMGuildApplyList
{
optional MFPaging paging = 1; //
}
//
message SMGuildApplyList
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFPaging paging = 3; //
repeated MFGuildApply apply_list = 4; //
optional int32 guild_lv = 5; //
}
//()
message CMGuildLog
{
optional MFPaging paging = 1; //
}
message SMGuildLog
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFPaging paging = 3; //
/*
values[0]: account_id
values[1]:
values[2]: 1: 2: 3: (0):
values[3]: (unix时间戳)
values[4]:
*/
repeated MFStringTuple logs = 4;
}
//
message CMGuildMemberSetJob
{
optional string member_id = 1; //id
optional int32 job = 2; //
}
message SMGuildMemberSetJob
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMGuildAgreeInvite
{
optional int64 guild_id = 1; //id
optional string user_sign = 2; //
}
message SMGuildAgreeInvite
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMGuildGainExp
{
optional int32 exp = 1; //
}
message SMGuildGainExp
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
//
message CMGuildSearchMember
{
optional string target_id = 1; //id
}
message SMGuildSearchMember
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
optional MFGuildBasic guild_basic = 3; //
optional MFUserInfo user_info = 4; //
}
//
message CMSendChatMsg
{
optional int32 chat_channel = 1; // 1: 2 3 4:target表示队伍Id 5 6
optional string target = 2; //
optional int32 msg_type = 3; //// 0(json) 1 (json) 2:()
optional string msg_body = 4; //
repeated string members = 5; //()
}
//
message CMReadMsgAndOpenChatNotify
{
optional int32 curr_channel = 1; //
repeated MFPairInt64 last_ids = 2; // key valid
}
//
message CMSetCurrPrivateChatTarget
{
optional string private_target = 1; //id,
optional int64 last_id = 2; //id
}
//
message CMCloseChatNotify
{
}
//
message CMSendCustomMsg
{
repeated string target_list = 1; //
optional string msg = 2; //
optional int64 param1 = 3; //1
optional int64 param2 = 4; //2
optional int64 param3 = 5; //3
}
//
message CMUpdateTempCustomData
{
/*
0:
1:
2:
!!!
MFUserRaltimeData走的是增量更新如果不需要处理的字段不传就行
*/
optional int32 update_type = 1; //
optional MFUserTempCustomData temp_custom_data = 2; //
optional int32 delay_time = 100; //()
optional int32 delay_flag = 101; //(1-16)flag定时器覆盖
}
//
message CMQueryUserStatus
{
repeated string user_list = 1; //
}
//
message SMQueryUserStatus
{
repeated MFUserStatus status_list = 1; //
}
//
message CMRecommandFriend
{
}
//
message SMRecommandFriend
{
repeated MFUserInfo friend_list = 1; //
}
///线
message SMUserStatusNotify
{
repeated string online_users = 1; //线
repeated string offline_users = 2; //线
}
//
message SMChatMsgNotify
{
repeated MFChatMsg msg_list = 1; //chat_channel和msg_uuid更新本地的last_ids
}
//
message SMCustomMsgNotify
{
optional string sender = 1; //
optional string msg = 2; //
optional int64 param1 = 3; //1
optional int64 param2 = 4; //2
optional int64 param3 = 5; //3
}
//
message SMUserInfoUpdate
{
repeated MFUserInfo user_infos = 1; //
}
//a
message SMDeleteFriendNotify
{
repeated string user_list = 1; //
}
//
message SMAddBlackListNotify
{
repeated MFUserInfo user_infos = 1; //
}
//
message SMDeleteBlackListNotify
{
repeated string user_list = 1; //
}
//
message SMUserTempCustomDataUpdate
{
optional string account_id = 1; //id
optional MFUserTempCustomData temp_custom_data = 2; //
}
//
message SMUpdateAccountInfo
{
}
//
message SMUpdateRedPointNotify
{
optional int32 red_point_flags = 1; // 1<<0: 1<<1: 1<<2
}
//
message SMUpdateChatRedPointNotify
{
repeated int32 has_unread_msg_channels = 1; //id列表
}
//
message SMUpdatePrivateChatRedPointNotify
{
repeated string has_unread_msg_accounts = 1; //more不含有
}
//id
message SMUpdateChatChannelLastId
{
repeated MFPairInt64 last_ids = 1; // key valid
}
//
message SMShowErrorMsg
{
optional string msg = 1; //
}