miduo_client/Assets/ManagedResources/~Lua/Message/ChatProto.proto

79 lines
3.2 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package rpc.protocols;
option optimize_for = SPEED;
message ChatInfo{
optional int32 senderId = 1;//发送用户id
optional string senderName = 2; //发送用户名字
optional int32 senderlevel = 3;//发送者等级
optional int32 sendervip = 5;//发送者vip等级
optional uint64 times = 6;//接受到的时间戳
optional string msg = 7;//消息内容,消息体
optional int32 head = 8; // 头像
optional int32 frame = 9; // 头像框
optional int32 soulVal = 10; // 战斗力
optional uint64 messageId = 11; // 消息号
//跑马灯用
optional int32 messageType = 13; // 消息类型 1:吉运,2:勤勉
//optional int32 itemId =14; // 查看道具id
optional string itemId = 14; // 物品信息,用#分割
optional int32 type = 15; //0:系统 1:其他
optional int32 startTime = 16 ; // 开始时间
optional int32 endTime = 17; //结束时间
optional int32 PriorityLevel =18 ;// 优先级
optional int32 Frequency = 19; //频率(s)
optional int32 speed = 20;
optional int32 multiple = 21; //显示次数
optional int32 userTitle = 22;
optional int32 practiceLevel = 23;//修行等级
optional string serverName = 24;//服务器名字
}
message GetChatMessageInfoRequest {
optional int32 chatType = 1; // 类型 0:系统 1:世界 2:公会 3 好友
optional uint64 messageId = 2; //消息号
}
message GetChatMessageInfoResponse {
repeated ChatInfo chatInfo = 1;
}
message SendChatInfoReqest {
optional int32 chatType = 1; // 类型1:世界 2:公会 3 好友
optional string message = 2; //聊天内容
optional int32 friendId = 3; // 接受聊天的好友id
}
message SendChatInfoResponse {
optional ChatInfo chatInfo = 1;
}
message SendChatInfoIndication {
optional ChatInfo chatInfo = 1;
optional int32 type = 2 ;// 类型 1 私聊 2 公会
}
message ChatUserV3 {
optional string playerId = 1; // 游戏角色ID 必要
optional string userId = 2; // 用户ID, 必要
optional string nickname = 3; // 角色昵称 必要
optional int32 level = 4; // 角色等级,必要
optional int32 vipLevel = 5; // 角色VIP等级为了减少误封需要此字段
optional int64 power = 6; // 角色战力值 非必要
optional string zoneId = 7; // 区服ID 这里是指游戏里面选择的区服,必要
optional string zoneName = 8; //区服名字 必要
optional string extra = 10; // JSON字符串其它信息
optional string serverId = 11; // 发行渠道ID比如代表的意义发行商1、发行商2、小米专服一定要看下文解释一定。
}
//主类您将此类序列化二进制就是上文提到的「正文Content」
message ChatV3 {
optional string id = 10; // ID 每条消息的ID每条消息都不一样。必要
optional string channel = 1; //消息频道比如私聊、世界所对应的ID 必要
optional ChatUserV3 from = 2; // 发言人
optional ChatUserV3 to = 3; // 发送给谁私聊时必要其它为null
optional string content = 4; //内容 必要
optional string ip = 5; // 当前发言人的IP 必要
optional string extra = 7; // JSON字符串其它信息
optional int32 status = 8; // 禁言状态由我方回传
}