package fish_protocols;

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

//获取游戏信息
message packetc2l_get_room_info {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_room_info];
}

//房间信息
message msg_room_info{
	optional int32 roomid = 1;		
	optional int32 player_count = 2;
	optional int64 jackpot = 3;
	optional int32 leftSecond = 4;
}

//返回游戏信息
message packetl2c_get_room_info_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_room_info_result];
	repeated msg_room_info rooms = 2;
}

//进入游戏
message packetc2l_enter_table {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_enter_table];
	optional int32 roomid = 2 [default = 0];//roomid为0，如果在游戏中则直接进入
}

//返回进入游戏
message packetl2c_enter_table_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_enter_table_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];

	// 返回的房间id
	optional int32 roomid = 3;

	// 是否领取了钻石奖励(竞技场)
	optional bool isRecvGemReward = 4;
}

//切换桌子
message packetc2l_change_table {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_change_table];
}

//返回切换桌子
message packetl2c_change_table_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_change_table_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
}

//离开游戏
message packetc2l_leave_table {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_leave_table];
}

//返回离开游戏
message packetl2c_leave_table_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_leave_table_result];
	optional int64 sync_gold = 2;
	optional int32 syncDbChip = 3;
	optional int64 playerExp = 4;
} 

//检测状态
message packetc2l_check_state {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_check_state];
}

message skill_unit{
	optional int32 skillId = 1;
	optional int32 addTimes = 2;
}
message turret_unit{
	optional int32 turretId = 1;
	optional int32 additionLv = 2;
	optional int32 endTime = 3;
	repeated skill_unit addtionList = 4;
}
message wing_unit{
	optional int32 wingId = 1;
	optional int32 additionLv = 2;
	optional int32 endTime = 3;
	optional int32 randTimes = 4;
	optional int32 randId = 5;
	repeated skill_unit addtionList = 6;
}

//检测状态
message packetl2c_check_state_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_check_state_result];
	optional bool is_intable = 2 [default = false];//是否在桌子中
	repeated msg_item itemlist = 3;
	repeated turret_unit turretlist = 4;
	repeated wing_unit winglist = 5;
	optional int32 turret_id = 6;
	optional int32 wing_id = 7;
	optional int32 headId = 8;
	optional int32 frameId = 9;
	optional int32 playerlvl = 10;
	optional int32 turretlvl = 11;
	optional int64 gameexp = 12;
	optional int32 dimensity = 13;		// 魔石
	optional int32 roomId = 14;			// 房间id
	optional int32 kill_goldfish_count = 15;
	optional int32 goldfish_pool = 16;
	optional int32 goldfish_lottery_count = 17;
	optional int32 dailyAdTimes = 18;					// 播放广告次数
	repeated redEnvlopeInfo redEnvlopeInfos = 19;
	optional int32 autofirelefttime = 20;
	optional int32 canReceiveTommorrowBuffCount = 21;	//还可领取明日奖励次数
	optional bool canReceiveTommorrowBuffToday = 22;	//今日可否领取明日奖励
}                 

//购买物品
message packetc2l_buy_item {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_buy_item];
	optional bool isshop = 2;
	optional int32 shop_id = 3; //商品id
	optional int32 shop_count = 4 [default=1]; //商品数量
}

message packetl2c_buy_item_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_buy_item_result];
	optional int32 shop_id = 2;//商品id
	optional msg_type_def.e_msg_result_def result = 3 [default = e_rmt_fail];
	optional int32 shop_count = 4 [default=1]; 
}

//使用物品/道具/功能
message packetc2l_use_item {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_use_item];
	optional int32 item_id = 2;//物品id

	// 0-在场景内使用(默认)  1-在背包或活动界面使用
	optional int32 whereUse = 3;

	//optional int32 pos_x = 3;
	//optional int32 pos_y = 4;
}

message getItemsInfo
{
	optional int32 itemid  = 8;
	optional int32 itemcount  = 9;
}

// 道具信息
message ItemInfo
{
	optional int32 itemId = 1;
	optional int32 count = 2;
}

message packetl2c_use_item_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_use_item_result];
	optional int32 pid = 2;//物品id
	optional int32 item_id = 3;//物品id
	optional msg_type_def.e_msg_result_def result = 4 [default = e_rmt_fail];
	optional int32 item_count = 5 [default = 1]; 
	optional int32 whereUse = 6;
	// 背包内使用弹头时的分数
	optional int32 score = 7;
	repeated ItemInfo items = 8;
}

//换炮
message packetc2l_change_turret {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_change_turret];
	optional int32 turret_id = 2;	//炮套装id
	optional int32 wing_id = 3;		//翅膀id
}

//换炮
message packetl2c_change_turret_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_change_turret_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	optional int32 player_id = 3;	//
	optional int32 turret_id = 4;	//炮套装id
	optional int32 turret_lv = 5;	
	optional int32 wing_id = 6;		//翅膀id
	optional int32 wing_lv = 7;	
}

// 中级场积分排行信息
message PointsRankInfo
{
	optional int32 rank = 1;
	optional int32 playerId = 2;
	optional string nickName = 3;
	optional int64 points = 4;
	optional int32 singleMax = 5;
	optional int32 viplv = 6;
	optional int32 headid = 7;
	optional int32 frameid = 8;
}

//中级场获取积分排行
message packetc2l_get_points_rank {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_points_rank];
}

message packetl2c_get_points_rank_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_points_rank_result];
	optional int64 mypoint = 2;
	optional int32 mysinglepoint = 3;
	repeated PointsRankInfo PointRankList = 4;
	repeated PointsRankInfo LuckyRankList = 5;
	repeated int32 PointThresholdvalue = 6;			//牛人
	repeated int32 luckyThresholdvalue = 7;			//幸运
	optional int64 myPointRank = 8;
	optional int64 myLuckyRank = 9;
}

//中级场兑换
message exItemInfo
{
	optional int32 ex_item_id = 1;
	optional int32 ex_item_count = 2;
}

message packetc2l_medium_grade_exchange {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_medium_grade_exchange];
	optional int32 exchange_id = 2;
	optional int32 ex_reward_id = 3;
}

//中级场兑换
message pointsInfo
{
	optional int32 points = 1;
	optional int32 pointsEx = 2;
}

message packetl2c_medium_grade_exchange_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_medium_grade_exchange_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	repeated int32 exchange_id = 3;			//兑换id
	repeated exItemInfo ex_item = 4;		//额外奖励
	repeated pointsInfo points = 5;				//积分
}

//获取商品列表 
message packetc2l_get_shoplist {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_get_shoplist];
}

message msg_shopitem {
	optional int32 shop_id = 1;			//商品ID
	optional int32 item_id = 2;			//物品ID
	optional int32 item_count = 3;		//物品数量
	optional int32 consume_type = 4;	//消耗类型
	optional int32 consume_count = 5;	//消耗数量
	optional int32 show_type = 6;		//显示类型
	optional int32 need_vip = 7;		//需要vip
	optional int32 show_tab = 8;		//显示页
}

message packetl2c_get_shoplist_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_shoplist_result];
	repeated msg_shopitem shoplist = 2;
}

//玩家升级(经验)
// message packetc2l_player_levelup {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_player_levelup];
// }

//炮台升级(道具)
message packetc2l_turret_levelup {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_turret_levelup];
	optional bool uselucky  = 2 [default = false];	//使用幸运
}

// message packetl2c_player_levelup_result {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_player_levelup_result];
// 	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
// 	optional int32 cur_lv = 3 [default = 0];
// 	optional int32 cur_exp = 4 [default = 0];
// }

message packetl2c_turret_levelup_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_turret_levelup_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	optional bool usediamond = 3;	//使用钻石
	optional bool uselucky = 4;	//使用幸运
	optional int32 cur_lv = 5 [default = 0];
	optional int32 cur_lucky = 6 [default = 0];
}

//玩家使用礼券升级
// message packetc2l_usetick_levelup {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_usetick_levelup];
// 	optional int32 uplevel = 2 [default = 0]; //要升到的等级 默认按一级升级
// }

// message packetl2c_usetick_levelup_result {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_usetick_levelup_result];
// 	optional int32 uplevel  = 2;
// 	optional msg_type_def.e_msg_result_def result = 3 [default = e_rmt_fail];	
// }


//玩家使用物品升级
// message packetc2l_useitem_levelup {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_useitem_levelup];
// 	// optional bool uselucky  = 2 [default = false];	//使用幸运
// }

// message packetl2c_useitem_levelup_result {
// 	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_useitem_levelup_result];
// 	// optional bool uselucky  = 2;	//使用幸运
// 	optional msg_type_def.e_msg_result_def result = 3 [default = e_rmt_fail];	
// }

//玩家升级
message packetl2c_player_auto_levelup {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_player_auto_levelup];
	optional int32 uplevel = 2;
	optional int32 award_gold = 3;
	optional int32 award_ticket = 4;
	optional int32 unlock_rate = 5 [default = 0];
	repeated msg_item award_item = 6;
}

//获得物品
message packetl2c_give_item_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_give_item_result];
	optional int32 itemid  = 2;
	optional int32 itemcount  = 3 [default = 1];
	
}

////完成引导
//message packetl2c_complete_guide {
//	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_complete_guide];
//	optional int32 guide_index = 2;
//}

//购买功能道具 //急速 锁定 散弹
message packetc2l_buy_func_item {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_buy_func_item];
	optional int32 item_id = 2; //商品id
	optional int32 item_count = 3 [default=1]; //商品数量
}

message packetl2c_buy_func_item_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_buy_func_item_result];
	optional int32 item_id = 2;//商品id
	optional msg_type_def.e_msg_result_def result = 3 [default = e_rmt_fail];
	optional int32 item_count = 4 [default=1]; 
}

//炮台合成
message packetc2l_torpedo_exchange {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_torpedo_exchange];
	optional int32 type  = 2;
	optional int32 torpedo_id  = 3;
	optional int32 torpedo_count  = 4;
}

//炮台合成返回
message packetl2c_torpedo_exchange_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_torpedo_exchange_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	optional int32 type  = 3;
	optional int32 torpedo_id  = 4;
	optional int32 torpedo_count  = 5;
}

//鱼雷合成
message packetc2l_torpedo_compose {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_torpedo_compose];
	optional int32 type  = 2;
	optional int32 compose_id  = 3;
	optional int32 compose_count  = 4;
}

//鱼雷合成返回
message packetl2c_torpedo_compose_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_torpedo_compose_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	optional int32 compose_id  = 3;
	optional int32 compose_count  = 4;
}

message msg_airdropitem {
	optional int32 uuid = 1;			//空投ID
	optional int32 playerid = 2;		//空投玩家ID
	optional int32 itemid = 3;			//物品id
	optional int32 itemcount = 4;		//物品数量
	optional string nickname = 5;		//空投玩家昵称
	optional string headurl = 6;		//空投玩家头像
	optional string pwd = 7;			//空投密码
	optional int32 leftsecond = 8;		//空投剩余有效时间
	optional int32 receiveId = 9;		//领取人ID
}

//获取空投列表返回
message packetl2c_get_airdrop_list_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_get_airdrop_list_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	optional bool bplayerairdrop = 3;
	repeated msg_airdropitem items = 4;
	optional int32 errorcount = 5;
}

//黄金鱼抽奖
message packetc2l_goldfish_lottery {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_goldfish_lottery];
	optional int32 id = 2;
}

//黄金鱼抽奖返回
message packetl2c_goldfish_lottery_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_goldfish_lottery_result];
	optional msg_type_def.e_msg_result_def result = 2 [default = e_rmt_fail];
	optional int32 playerid = 3;
	optional int32 id = 4;
	optional int32 rewardID = 5;
}

// 散射兑换神灯
//message packetl2c_item2magiclamp_notify
//{
//	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_item2magiclamp_notify];
	
	// 兑换出的神灯个数
//	optional int32 magicLampCount = 2;	
//}

// 完成转盘鱼结算
message packetl2c_bc_table_finish_turntablefish_balance 
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_bc_table_finish_turntablefish_balance];
	
	optional int32 playerId = 2;	

	// 最终转盘鱼所得金币
	optional int32 addGold = 3;
}

// 魔晶兑换
message packetc2l_exchange_dimensity
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_exchange_dimensity]; 

	// 兑换ID
	optional int32 exchangeId = 2;
}
 
// 魔晶兑换结果
message packetl2c_exchange_dimensity_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_exchange_dimensity_result]; 

	optional int32 exchangeId = 2;
	
	optional int32 result = 3;
}

message packetc2l_lucky_lottery
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_lucky_lottery]; 
	optional bool all = 2;
}

message packetl2c_lucky_lottery_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_lucky_lottery_result]; 
	optional bool all = 2;
	optional int32 result = 3;
	repeated int32 rewardIndex = 4;
}

message recordInfo {
	optional int32 type = 1;			//统计类型
	optional int32 param = 2;			//统计参数
	optional int32 count = 3;			//统计数量
}

//同步统计信息
message packetc2l_syn_record_info {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_syn_record_info];
	repeated recordInfo recordList  = 2;
}

//使用(每日免费)自动开炮
message packetc2l_auto_fire {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_auto_fire];
	optional int32 type = 2;//1 开始 2 结束
}

// 头像更换
message packetc2l_change_headid
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_change_headid]; 
	optional int32 headId = 2;
	optional int32 frameid = 3;
}
 
// 头像更换
message packetl2c_change_headid_result
{
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_change_headid_result]; 
	optional int32 playerId = 2;
	optional int32 headId = 3;
	optional int32 frameid = 4;
	optional int32 result = 5;
}

message packetc2l_rand_turret_addition {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_rand_turret_addition];
	optional int32 type = 2;		//1 炮升级 2 翅膀升级
	optional int32 id = 3;			//炮/翅膀ID
}

message packetl2c_rand_turret_addition_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_rand_turret_addition_result];
	optional int32 type = 2;		//1 炮升级 2 翅膀升级
	optional int32 id = 3;			//炮/翅膀ID
	optional int32 result = 4;
	optional int32 leftTimes = 5;
	optional int32 addId = 6;
	optional int32 costItem = 7;
	optional int32 costCount = 8;
}

message packetc2l_turret_addition_confirm {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_turret_addition_confirm];
	optional int32 type = 2;		//1 炮升级 2 翅膀升级
	optional int32 id = 3;			//炮/翅膀ID
}

message packetl2c_turret_addition_confirm_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_turret_addition_confirm_result];
	optional int32 type = 2;		//1 炮升级 2 翅膀升级
	optional int32 id = 3;			//炮/翅膀ID
	optional int32 result = 4;
	optional wing_unit wingdata = 5;
	optional turret_unit turretdata = 6;
}

message packetc2l_turret_addition_reset {
	optional e_server_msg_type packet_id = 1 [default = e_mst_c2l_turret_addition_reset];
	optional int32 type = 2;		//1 炮 2 翅膀
	optional int32 id = 3;			//炮/翅膀ID
}

message packetl2c_turret_addition_reset_result {
	optional e_server_msg_type packet_id = 1 [default = e_mst_l2c_turret_addition_reset_result];
	optional int32 type = 2;		//1 炮 2 翅膀
	optional int32 id = 3;			//炮/翅膀ID
	optional int32 result = 4;
	optional int32 returnCount = 5;
}