package fish_protocols;

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

////////////////////////////追击蟹将活动/////////////////////////////////////////
// 请求蟹将信息
message packetc2l_get_crab_info
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_crab_info]; 
}

// 请求蟹将同步协议
message packetl2c_syn_crab_info
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_syn_crab_info]; 
	optional int32 startTime = 2;
	optional int32 endTime = 3;
	optional int32 curLifeId = 4;		// 当前生命ID
	optional int32 curLifeValue = 5;	// 当前生命值
}

// 请求攻击蟹将
message packetc2l_req_attack_crab
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_req_attack_crab]; 

	// 1-普通攻击  2-超级攻击
	optional int32 attackOp = 2;
}

// 请求攻击蟹将结果
message packetl2c_req_attack_crab_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_req_attack_crab_result]; 

	optional int32 attackOp = 2;

	// 本次伤害值
	optional int32 harmValue = 3;

	// 蟹将是否 die
	optional bool isDie = 4;

	// 当前的生命ID(若isDie 为true, 则通过此ID, 取表 Fish_ActivityKillCrabLifeValueCFG, 恢复蟹将血量)
	optional int32 curLifeId = 5;

	// 前一个生命ID(若 isDie为true, 则通过这个ID,取表 Fish_ActivityKillCrabLifeValueCFG, 获取到额外奖励)
	optional int32 preLifeId = 6;

	// 本次攻击的奖励道具ID
	optional int32 rewardId = 7;

	// 本次攻击的奖励道具数量
	optional int32 rewardCount = 8;

	optional int32 result = 9;

	optional int32 curLife = 10;

	repeated int32 killList = 11;
}

// 获取伤害排行榜
message packetc2l_req_crab_harm_rank
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_req_crab_harm_rank]; 
}

message CrabRankInfo
{
	optional string nickName = 1;
	optional int32 harmValue = 2;	// 总伤害值
	optional int32 playerId = 3;
	optional int32 rank = 4;
}

// 获取伤害排行榜结果
message packetl2c_req_crab_harm_rank_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_req_crab_harm_rank_result]; 
	repeated CrabRankInfo rankList = 2;
	repeated int32 thresholdvalue = 3;
	optional int32 selfHarmValue = 4;
	optional int32 selfRank = 5;
}


// 请求循环活动信息
message packetc2l_req_cur_loop_act
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_req_cur_loop_act]; 
}

// 请求循环活动信息结果
message packetl2c_req_cur_loop_act_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_req_cur_loop_act_result]; 

	// 0 表示没有循环活动开始 2-虎鲸活动 3-追击蟹将活动
	optional int32 curActId = 2;

	// 开始时间
	optional int32 startTime = 3;

	// 结束时间(显示时,客户端需要减掉1天的秒数)
	optional int32 endTime = 4;
}

////////////////////////////大奖赛活动数据/////////////////////////////////////////
message grand_prix_rank
{
	optional int32 playerId = 1;
	optional string nickName = 2;
	optional int64 points = 3;
	optional int32 rank = 4;
	optional int32 headid = 5;
	optional int32 frameid = 6;
}

message packetc2l_get_grand_prix_rank
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_grand_prix_rank];
}

message packetl2c_get_grand_prix_rank_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_grand_prix_rank_result];

	repeated grand_prix_rank dailyRankList = 2;

	repeated grand_prix_rank seasonRankList = 3;

	optional grand_prix_rank myDailyRank = 4;

	optional grand_prix_rank mySeasonRank = 5;

	repeated int64 dailyThresholdValue = 6;

	repeated int64 seasonThresholdValue = 7;

}

////////////////////////////请求活动游戏数据/////////////////////////////////////////
message packetc2l_req_activity_game_info
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_req_activity_game_info];

	optional int32 activityId = 2;
}

//////////////////////////// 排位赛 ////////////////////////////////////////
message qualifyingRankInfo
{
	optional int32 playerId = 1;
	optional string nickname = 2;
	optional int32 vip = 3;
	optional int32 headid = 4;
	optional int32 frameid = 5;
	optional int64 score = 6;
	optional int32 division = 7;
	optional int32 rank = 8;
}

// 请求排位赛信息
message packetc2l_get_qualifying_info
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_qualifying_info]; 
}

// 请求排位赛同步协议
message packetl2c_get_qualifying_info_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_qualifying_info_result]; 
	optional int32 startTime = 2;	//开始时间
	optional int32 endTime = 3;		//结束时间
	optional int64 score = 4;		//积分
	optional int32 season = 5;		//赛季标记
	repeated bool divisionNormReceived = 6;		//段位普通奖励领取标记
	repeated bool divisionAdvanReceived = 7;	//段位高级奖励领取标记
	optional qualifyingRankInfo myRankInfo = 8;
}

// 请求排位赛排行
message packetc2l_get_qualifying_rank
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_qualifying_rank];
}

// 请求排位赛排行返回
message packetl2c_get_qualifying_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_qualifying_result];
	repeated qualifyingRankInfo rankList = 2;
	optional qualifyingRankInfo myRankInfo = 3;
	repeated int64 thresholdValue = 4;
}

// 领取段位奖励
message packetc2l_receive_qualifying_reward
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_receive_qualifying_reward]; 
	optional int32 type = 2;	//奖励类型 1普通 2高级
	optional int32 index = 3;
}

// 领取段位奖励返回
message packetl2c_receive_qualifying_info_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_receive_qualifying_info_result]; 
	optional int32 result = 2;			//开始时间
	optional int32 index = 3;
	optional int32 type = 4;			//奖励类型 1普通 2高级
}