// 如果使用此注释，则使用proto3; 否则使用proto2
syntax = "proto3";

// 生成包名（服务器用）
option java_package = "com.game.friend.proto";
// 生成类名（服务器用）
option java_outer_classname = "FriendProto";


// -------------------------------------Bean-------------------------------------

// 好友Bean
message FriendInfo{
	fixed64 playerId = 1;// 角色唯一id
	string playerName = 2;// 角色名
	int32 gender = 3;// 性别
	int32 lv = 4;// 等级
	int32 fashionBody = 5;// 身体时装
	int32 fashionHand = 6;// 手部时装
	int32 fashionBorder = 7;// 头像框
	int32 vipId = 8;// vipId
	int32 force = 9;// 战力
	int32 near = 10;// 亲密度
	fixed32 time = 11;// 0=在线，否则离线时间戳（秒）
	repeated FriendGiftInfo giftInfoList = 12;// 单个好友送礼信息列表（仅在好友列表使用）
}

// 好友详细信息Bean(后来改为查看对方角色信息Bean)
message FriendMoreInfo{
	fixed64 playerId = 1;// 角色唯一id
	string playerName = 2;// 角色名
	int32 gender = 3;// 性别
	int32 lv = 4;// 等级
	int32 fashionBody = 5;// 身体时装
	int32 fashionHand = 6;// 手部时装
	int32 fashionBorder = 7;// 头像框
	int32 force = 8;// 战力
	string clanName = 9;// 部落名
	repeated FriendPetInfo petlist = 10;// 上阵宠物列表
}

// 好友上阵宠物信息Bean
message FriendPetInfo{
	fixed32 configId = 1;//龙种配置id
	int32 lv = 2;//当前等级
	int32 force = 3;// 宠物战力
	int32 qualityId = 4;// 品质id
	int32 image = 5;// 外观形象参数
}

// 送礼信息Bean
message FriendGiftInfo{
	int32 configId = 1;// 送礼id
	int32 num = 2;// 送礼次数
}

// -------------------------------------请求消息-------------------------------------

// 请求好友推荐 msgId=112101		-----返回成功消息msgId=112201
message ReqFriendPush{
	
}

// 请求好友搜索 msgId=112102		-----返回成功消息msgId=112202
message ReqFriendSearch{
	fixed64 toPlayerId = 1;// 角色唯一id
}

// 请求好友申请 msgId=112103		-----返回成功消息msgId=112203
message ReqFriendApply{
	fixed64 toPlayerId = 1;// 角色唯一id
}

// 请求好友操作 msgId=112104		-----返回成功消息msgId=112204
message ReqFriendOperation{
	int32 type = 1;// 操作类型 1=同意，2=拒绝（当状态为拒绝时，角色id=0，表示一键拒绝），3=拉黑，4=取消拉黑，5=删除好友
	fixed64 toPlayerId = 2;// 角色唯一id
}

// 请求好友详细信息 msgId=112105		-----返回成功消息msgId=112205
message ReqFriendMoreInfo{
	int32 type = 1;// 查看类型（客户端自定义）
	fixed64 toPlayerId = 2;// 角色唯一id
}

// 请求好友送礼 msgId=112106		-----返回成功消息msgId=112206
message ReqFriendGift{
	int32 giftId = 1;// 送礼id
	fixed64 toPlayerId = 2;// 角色唯一id
	
}

// 请求好友所有信息 msgId=112107		-----返回成功消息msgId=112207
message ReqFriendAllInfo{
	
}

// 请求好友切磋 msgId=112108		-----返回成功消息msgId=108201
message ReqFriendFight{
	fixed64 toPlayerId = 1;// 角色唯一id
}

// 请求好友发送私聊 msgId=112109		-----成功返回消息 msgId=112209,如果因为好友不在线，返回msgId=112208更新好友不在线状态并提示好友不在线
message ReqFriendChat{
	fixed64 toPlayerId = 1;// 接受消息的角色唯一id
	string msg = 2;// 聊天消息字符串
}

// -------------------------------------返回消息-------------------------------------

// 返回好友推荐 msgId=112201
message ResFriendPush{
	repeated FriendInfo pushList = 1;// 推荐好友列表
}

// 返回好友搜索 msgId=112202
message ResFriendSearch{
	 FriendInfo info = 1;// 好友搜索信息
}

// 返回好友申请 msgId=112203
message ResFriendApply{
	fixed64 toPlayerId = 1;// 角色唯一id
}

// 返回好友操作 msgId=112204
message ResFriendOperation{
	int32 type = 1;// 操作类型 1=同意，2=拒绝（当状态为拒绝时，角色id=0，表示一键拒绝），3=拉黑，4=取消拉黑，5=删除好友
	fixed64 toPlayerId = 2;// 角色唯一id
}

// 返回好友详细信息 msgId=112205
message ResFriendMoreInfo{
	int32 type = 1;// 查看类型（客户端自定义）
	FriendMoreInfo moreInfo = 2;// 好友详细信息
}

// 返回好友送礼 msgId=112206
message ResFriendGift{
	FriendInfo friendInfo = 1;// 好友信息
	FriendGiftInfo giftInfo = 2;// 总计送礼信息
}

// 返回好友所有信息 msgId=112207
message ResFriendAllInfo{
	repeated FriendInfo friendList = 1;// 好友列表
	repeated FriendInfo applyList = 2;// 申请列表
	repeated FriendInfo blackList = 3;// 黑名单列表
	repeated FriendGiftInfo giftInfoList = 4;// 总计送礼信息列表
}

// 返回好友信息 msgId=112208
message ResFriendChatFail{
	fixed64 toPlayerId = 1;// 角色唯一id
	fixed32 time = 2;// 0=在线，否则离线时间戳（秒）
}

// 返回好友接受私聊 msgId=112209
message ResFriendChat{
	fixed64 sendPlayerId = 1;// 发送消息的角色唯一id
	fixed64 toPlayerId = 2;// 接受消息的角色唯一id（便于客户端存储聊天记录）
	string msg = 3;// 聊天消息字符串
}





















