325 lines
7.3 KiB
Protocol Buffer
325 lines
7.3 KiB
Protocol Buffer
syntax = "proto3";
|
||
package Fantasy.Network.Message;
|
||
|
||
////////////// ******** 私聊/邮件 *******/////////////
|
||
|
||
/// 会话信息
|
||
message ConversationInfo
|
||
{
|
||
RoleSimpleInfo RoleInfo = 1; //对方信息
|
||
repeated MailInfo List = 2;//对话列表
|
||
}
|
||
|
||
message MailInfo
|
||
{
|
||
int64 Id = 1; //邮件id
|
||
int64 Sender = 2; //发送者
|
||
string Content = 3; //内容
|
||
int64 CreateTime = 4; //发送时间
|
||
int32 MailType = 5; //邮件类型
|
||
int32 MailState = 6; //邮件状态
|
||
repeated AwardInfo Items = 7; //附件列表
|
||
}
|
||
|
||
|
||
///请求会话列表
|
||
message C2Game_GetConversationsRequest // ICustomRouteRequest,Game2C_GetConversationsResponse,GameRoute
|
||
{
|
||
|
||
}
|
||
|
||
///请求会话列表响应
|
||
message Game2C_GetConversationsResponse // ICustomRouteResponse
|
||
{
|
||
repeated ConversationInfo List = 1;
|
||
}
|
||
|
||
///发送邮件消息
|
||
message C2Game_SendMailRequest // ICustomRouteRequest,Game2C_SendMailResponse,GameRoute
|
||
{
|
||
int64 Target = 1; //目标id
|
||
string Content = 2; //内容
|
||
repeated AwardInfo Items = 3; //附件列表
|
||
}
|
||
|
||
///发送邮件消息响应
|
||
message Game2C_SendMailResponse // ICustomRouteResponse
|
||
{
|
||
|
||
}
|
||
|
||
///发送删除会话消息
|
||
message C2Game_DeleteMailRequest // ICustomRouteRequest,Game2C_DeleteMailResponse,GameRoute
|
||
{
|
||
int64 Id = 1; //会话id
|
||
}
|
||
|
||
///发送删除会话消息响应
|
||
message Game2C_DeleteMailResponse // ICustomRouteResponse
|
||
{
|
||
int64 Id = 1; //会话id
|
||
}
|
||
|
||
|
||
///新邮件推送
|
||
message Game2C_HaveMail // ICustomRouteMessage,GameRoute
|
||
{
|
||
MailInfo Mail = 1;
|
||
string Key = 2;
|
||
}
|
||
|
||
message Game2C_MailState // ICustomRouteMessage,GameRoute
|
||
{
|
||
int32 MailState = 1;
|
||
int64 MailId = 2;
|
||
}
|
||
|
||
////////////// ******** 频道聊天 *******/////////////
|
||
|
||
/// 发送一个聊天消息给Chat服务器,中间是经过Gate中转的
|
||
message C2Game_SendMessageRequest // ICustomRouteRequest,Game2C_SendMessageResponse,GameRoute
|
||
{
|
||
ChatInfoTree ChatInfoTree = 1;
|
||
}
|
||
message Game2C_SendMessageResponse // ICustomRouteResponse
|
||
{
|
||
|
||
}
|
||
|
||
// 该消息是Chat发送给Gate服务器,让Gate服务器自动转发到客户端
|
||
message Game2C_Message // ICustomRouteMessage,GameRoute
|
||
{
|
||
ChatInfoTree ChatInfoTree = 1;
|
||
}
|
||
|
||
/// 聊天消息树
|
||
message ChatInfoTree
|
||
{
|
||
int32 ChatChannelType = 1; // 频道的类型
|
||
int64 ChatChannelId = 2; // 频道的ID
|
||
int64 UnitId = 3; // 发送人的UnitId
|
||
string UserName = 4; // 发送人的名字
|
||
repeated int64 Target = 5; // 接收聊天信息的目标数组
|
||
repeated ChatInfoNode Node = 6; // 聊天节点
|
||
}
|
||
|
||
/// 聊天信息节点
|
||
message ChatInfoNode
|
||
{
|
||
int32 ChatNodeType = 1; // 节点类型(例如:超链接、普通的内容、表情...)
|
||
int32 ChatNodeEvent = 2; // 节点分发事件的类型(例如:点击某个字打开某个UI或者执行某些操作)
|
||
string Content = 3; // 信息内容
|
||
string Color = 4; // 表示这个内容的颜色
|
||
repeatedArray byte Data = 5; // 表示附加的一些数据
|
||
}
|
||
|
||
/// 聊天位置信息节点
|
||
message ChatPositionNode
|
||
{
|
||
string MapName = 1;
|
||
float PosX = 2;
|
||
float PosY = 3;
|
||
float PosZ = 4;
|
||
}
|
||
|
||
/// 聊天位置信息节点
|
||
message ChatOpenUINode
|
||
{
|
||
string UIName = 1;
|
||
}
|
||
|
||
/// 聊天连接信息节点
|
||
message ChatLinkNode
|
||
{
|
||
string Link = 1;
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
message ChatUserInfo
|
||
{
|
||
int64 Id = 1;//用户id
|
||
int64 Name = 2;//用户名
|
||
}
|
||
|
||
message ChatMessageInfo
|
||
{
|
||
int32 Type = 1; //消息类型
|
||
int64 Source = 2; //消息来源
|
||
ChatUserInfo Trigger = 3; //触发者
|
||
string Content = 4; //内容
|
||
int64 SendTime = 5; //发送时间
|
||
}
|
||
|
||
///创建频道
|
||
message C2Game_CreateChannelRequest // ICustomRouteRequest,Game2C_CreateChannelResponse,GameRoute
|
||
{
|
||
string Name = 1; //频道名称
|
||
}
|
||
|
||
///创建频道响应
|
||
message Game2C_CreateChannelResponse // ICustomRouteResponse
|
||
{
|
||
int64 ChannelId = 1; //创建的频道id
|
||
}
|
||
|
||
///请求进入频道
|
||
message C2Game_JoinChannelRequest // ICustomRouteRequest,Game2C_JoinChannelResponse,GameRoute
|
||
{
|
||
int64 Target = 1; // 频道id
|
||
}
|
||
|
||
///进入频道响应
|
||
message Game2C_JoinChannelResponse // ICustomRouteResponse
|
||
{
|
||
|
||
}
|
||
|
||
// ///发送消息
|
||
// message C2Game_SendMessageRequest // ICustomRouteRequest,Game2C_SendMessageResponse,GameRoute
|
||
// {
|
||
// string Message = 1;
|
||
// int64 Target = 2; //目标id
|
||
// }
|
||
|
||
// ///发送消息响应
|
||
// message Game2C_SendMessageResponse // ICustomRouteResponse
|
||
// {
|
||
|
||
// }
|
||
|
||
// ///推送消息
|
||
// message Game2C_Message // ICustomRouteMessage,GameRoute
|
||
// {
|
||
// ChatMessageInfo Msg = 1;
|
||
// }
|
||
|
||
|
||
////////////// ******** 工会 *******/////////////
|
||
|
||
message ClubInfo
|
||
{
|
||
int64 Id = 1; //工会ID
|
||
string Name = 2; //工会名称
|
||
int64 CreateTime = 3; //创建时间
|
||
int64 OwnerId = 4; //工会创建者ID
|
||
int32 MemberCount = 5; //成员数量
|
||
}
|
||
|
||
///请求创建工会
|
||
message C2Game_CreateClubRequest // ICustomRouteRequest,Game2C_CreateClubResponse,GameRoute
|
||
{
|
||
string Name = 1; //工会名称
|
||
}
|
||
|
||
///创建工会响应
|
||
message Game2C_CreateClubResponse // ICustomRouteResponse
|
||
{
|
||
ClubInfo Club = 1; //创建的工会信息
|
||
}
|
||
|
||
///请求工会信息
|
||
message C2Game_GetClubInfoRequest // ICustomRouteRequest,Game2C_GetClubInfoResponse,GameRoute
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
}
|
||
///响应工会信息
|
||
message Game2C_GetClubInfoResponse // ICustomRouteResponse
|
||
{
|
||
string Name = 1; //工会名称
|
||
}
|
||
|
||
/// 请求工会成员列表
|
||
message C2Game_GetMemberListRequest // ICustomRouteRequest,Game2C_GetMemberListResponse,GameRoute
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
}
|
||
|
||
/// 响应工会成员列表
|
||
message Game2C_GetMemberListResponse // ICustomRouteResponse
|
||
{
|
||
repeated RoleSimpleInfo Members = 1; //工会成员列表
|
||
}
|
||
|
||
///获取工会列表请求
|
||
message C2Game_GetClubListRequest // ICustomRouteRequest,Game2C_GetClubListResponse,GameRoute
|
||
{
|
||
|
||
}
|
||
///获取工会列表响应
|
||
message Game2C_GetClubListResponse // ICustomRouteResponse
|
||
{
|
||
repeated ClubInfo Clubs = 1; //工会列表
|
||
}
|
||
|
||
/// 请求加入工会
|
||
message C2Game_JoinClubRequest // ICustomRouteRequest,Game2C_JoinClubResponse,GameRoute
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
}
|
||
|
||
/// 响应加入工会
|
||
message Game2C_JoinClubResponse // ICustomRouteResponse
|
||
{
|
||
ClubInfo Club = 1; //加入的工会信息
|
||
}
|
||
|
||
/// 请求退出工会
|
||
message C2Game_LeaveClubRequest // ICustomRouteRequest,Game2C_LeaveClubResponse,GameRoute
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
}
|
||
|
||
/// 响应退出工会
|
||
message Game2C_LeaveClubResponse // ICustomRouteResponse
|
||
{
|
||
int64 ClubId = 1; //退出的工会ID
|
||
}
|
||
|
||
/// 请求解散工会
|
||
message C2Game_DissolveClubRequest // ICustomRouteRequest,Game2C_DissolveClubResponse,GameRoute
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
}
|
||
|
||
/// 响应解散工会
|
||
message Game2C_DissolveClubResponse // ICustomRouteResponse
|
||
{
|
||
int64 ClubId = 1; //解散的工会ID
|
||
}
|
||
|
||
/// 请求操作申请
|
||
message C2Game_DisposeJoinRequest // ICustomRouteRequest,Game2C_DisposeJoinResponse,GameRoute
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
int64 ApplicantId = 2; //申请人ID
|
||
int32 Agree = 3; //是否同意申请,1表示同意,0表示拒绝
|
||
}
|
||
|
||
/// 响应操作申请
|
||
message Game2C_DisposeJoinResponse // ICustomRouteResponse
|
||
{
|
||
int64 ClubId = 1; //工会ID
|
||
int64 ApplicantId = 2; //申请人ID
|
||
int32 Agree = 3; //是否同意申请,1表示同意,0表示拒绝
|
||
}
|
||
|
||
///推送消息
|
||
message Game2C_ClubChange // ICustomRouteMessage,GameRoute
|
||
{
|
||
ClubInfo Club = 1;
|
||
int32 ChangeType = 2; //变更类型 0.创建 1.解散 2.加入 3.退出 4.申请处理
|
||
}
|