package fish_protocols;

import "fish_def.proto"; 
import "msg_type_def.proto";

message matchRankInfo
{
	optional int32 playerId = 1;
	optional string nickName = 2;
	optional int32 vip = 3;
	optional int32 headid = 4;
	optional int32 frameid = 5;
	optional int32 rank = 6;
	optional int32 score = 7;
}

message questInfo
{
	optional int32 questId = 1;
	optional int32 count = 2;
}

message killFishInfo
{
	optional int32 fishId = 1;
	optional int32 count = 2;
}

// 获取竞技场当前信息
message packetc2l_get_arena_match_info 
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_arena_match_info ];
}

// 获取竞技场当前信息结果
message packetl2c_get_arena_match_info_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_arena_match_info_result];
	// 日排名列表
	repeated matchRankInfo dailyRankList = 2;
	// 周排名列表
	repeated matchRankInfo weeklyRankList = 3;
	// 任务记录
	repeated questInfo questList = 4;
	// 杀死鱼记录
	repeated killFishInfo killList = 5;
	//子弹数
	optional int32 bulletCount = 6;
	optional int32 curScore = 7;
	optional int32 joinCount = 8;
	optional int32 questGroup = 9;
	optional matchRankInfo selfDayRank = 10;
	optional matchRankInfo selfWeekRank = 11;
	optional int32 startTime = 12;
	optional int32 endTime = 13;
}

// 同步竞技场子弹
message packetc2l_syn_arena_match_bullet
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_syn_arena_match_bullet];
}

// 同步竞技场子弹结果
message packetl2c_syn_arena_match_bullet_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_syn_arena_match_bullet_result];
	optional int32 bulletCount = 2;
}

// 获取竞技场历史排行
message packetc2l_get_arena_match_history_rank
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_arena_match_history_rank ];
	optional int32 type = 2;	//1上周 2昨日 3前日
}

// 获取竞技场历史排行返回
message packetl2c_get_arena_match_history_rank_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_arena_match_history_rank_result];
	optional int32 type = 2;	//1上周 2昨日 3前日
	repeated matchRankInfo rankList = 3;
	optional matchRankInfo selfRank = 4;
}

// 参赛
message packetc2l_join_arena_match
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_join_arena_match ];
}

// 参赛结果
message packetl2c_join_arena_match_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_join_arena_match_result ];
	optional int32 result = 2;
	optional int32 playerId = 3;
	optional int32 bulletCount = 4;
	optional int32 curScore = 5;
	optional int32 joinCount = 6;
	optional int32 questGroup = 7;
}

// 参赛结果
message packetl2c_notify_arena_match_add_bullet
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_notify_arena_match_add_bullet ];
	optional int32 playerId = 2;
	optional int32 addCount = 3;
	optional int32 curCount = 4;
}

message buffInfo
{
	optional int32 buffId = 1;
	optional int32 buffRate = 2;
}

// 竞技场结算通知
message packetl2c_arena_match_end_notify
{
 	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_arena_match_end_notify];
 	// 结束原因  1 子弹用光了  2 比赛结束了
 	optional int32 reason = 2;
	// 最终结算buff列表
	repeated buffInfo buffList = 3;
 	// 排名
 	optional int32 rank = 4;
 	// 本轮基础成绩
 	optional int32 curBaseScore = 5;
	// 本轮加成成绩
	optional int32 curAddScore = 6;
	// 今日最佳成绩
	optional int32 topScore = 7;
}

// 获取自由赛当前信息
message packetc2l_get_freedom_match_info 
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_freedom_match_info ];
	optional int32 roomId = 2;	//房间号 12 13
}

// 获取自由赛当前信息结果
message packetl2c_get_freedom_match_info_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_freedom_match_info_result];
	optional int32 roomId = 2;	//房间号 12 13
	repeated matchRankInfo dailyRankList = 3;
	optional int32 bulletCount = 4;
	optional int32 curScore = 5;
	optional int32 joinCount = 6;
	optional int32 leftSecond = 7;
	optional matchRankInfo selfDayRank = 8;
	optional int32 startTime = 9;
	optional int32 endTime = 10;
}

// 同步自由赛子弹
message packetc2l_syn_freedom_match_bullet
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_syn_freedom_match_bullet];
	optional int32 roomId = 2;
}

// 同步自由赛子弹结果
message packetl2c_syn_freedom_match_bullet_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_syn_freedom_match_bullet_result];
	optional int32 roomId = 2;
	optional int32 bulletCount = 3;
}

// 参赛
message packetc2l_join_freedom_match
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_join_freedom_match ];

	optional int32 roomId = 2;	//房间号 12 13
}

// 参赛结果
message packetl2c_join_freedom_match_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_join_freedom_match_result ];
	optional int32 result = 2;
	optional int32 roomId = 3;	//房间号 12 13
	optional int32 playerId = 4;
	optional int32 bulletCount = 5;
	optional int32 curScore = 6;
	optional int32 joinCount = 7;
	optional int32 leftSecond = 8;
}

message packetc2l_freedom_match_do_balance
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_freedom_match_do_balance ];
	optional int32 roomId = 2;	//房间号 12 13
}

// 自由赛结束通知
message packetl2c_freedom_match_end_notify
{
 	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_freedom_match_end_notify];

	optional int32 roomId = 2;	//房间号 12 13
 	// 结束原因  1 子弹用光了  2 比赛结束了 3 主动结算
 	optional int32 reason = 3;
	// 最终结算buff列表
	repeated buffInfo buffList = 4;
 	// 排名
 	optional int32 rank = 5;
 	// 本轮成绩
 	optional int32 curBaseScore = 6;
	// 本轮成绩
 	optional int32 curAddScore = 7;
	// 今日最佳成绩
	optional int32 topScore = 8;
}
