local ItemData = require("bag.Proto").ItemData
local RoleBase = require("role.Proto").RoleBase
local HeroSimple = require("hero.Proto").HeroSimple

-- 界面查询
JjcLadderRankNet = {
	{"rank",		1,		"int"},			-- 名次
	{"uuid",		1,		"string"},		-- uuid
	{"name",		1,		"string"},		-- 名字
	{"svrName",		1,		"string"},		-- 服务器名
	{"body",		1,		"int"},			-- 形象
	{"head",        1,      "int"},
	{"headFrame",   1,      "int"},
	{"zhandouli",	1,		"int"},			-- 战力
	{"unionName",   1,      "string"},      -- 公会名字
	{"heroList",    6,      HeroSimple}, 
	{"svrIndex",	1,		"int"},			-- 服务器id
}
JjcLadderData = {
	{"state",		1,		"byte"},		-- 活动状态 1-进行阶段 2-准备阶段 3 赛季结束
	{"leftTime",	1,		"int"},			-- 剩余时间
	{"mobaiRed",	1,		"byte"},		-- 膜拜红点
	{"logRed",		1,		"byte"}, 		-- 日志红点
	{"list",		5,		JjcLadderRankNet},	-- 对手列表
	{"myRank",		1,		"int"},			-- 我的排名 0-表示未上榜
	{"leftCnt",		1,		"int"},			-- 剩余挑战次数
	{"leftBuyCnt",	1,		"int"},			-- 剩余购买次数
	{"buyCost",		1,		"int"},			-- 购买次数花费钻石
}
CG_JJC_LADDER_QUERY = {}
GC_JJC_LADDER_QUERY = {
	{"data",		1,		JjcLadderData},
}

-- 挑战 走统一战斗协议CG_COMBAT_BEGIN,param为rank|uuid

-- 一键挑战
CG_JJC_LADDER_COMBAT_ONEKEY = {}
GC_JJC_LADDER_COMBAT_ONEKEY = {
	{"leftCnt",		1,		"int"},			-- 剩余挑战次数	
}

-- 购买挑战次数
CG_JJC_LADDER_BUYCNT = {}
GC_JJC_LADDER_BUYCNT = {
	{"leftCnt",		1,		"int"},			-- 剩余挑战次数
	{"leftBuyCnt",	1,		"int"},			-- 剩余购买次数
	{"buyCost",		1,		"int"},			-- 购买次数花费钻石	
}

-- 刷新对手列表
CG_JJC_LADDER_REFRESH = {}

-- 膜拜查询
JjcLadderMobaiNet = {
	{"rank",		1,		"int"},			-- 名次
	{"uuid",		1,		"string"},		-- uuid
	{"name",		1,		"string"},		-- 名字
	{"svrName",		1,		"string"},		-- 服务器名
	{"body",		1,		"int"},			-- 形象
	{"head",        1,      "int"},
	{"headFrame",   1,      "int"},
	{"cnt",			1,		"int"},			-- 点赞次数	
	{"isMobai",		1,		"byte"},		-- 是否已膜拜
	{"svrIndex",	1,		"int"},			-- 服务器id
}
CG_JJC_LADDER_MOBAI_QUERY = {}
GC_JJC_LADDER_MOBAI_QUERY = {
	{"list",		3,		JjcLadderMobaiNet}
}

-- 膜拜点赞 成功返回 GC_JJC_LADDER_MOBAI_QUERY
CG_JJC_LADDER_MOBAI = {
	{"rank",		1,		"int"},			-- 名次	
}

-- 天梯排名

JjcLadderRoardNet = {
	{"unionName",    1,   "string"},
	{"rolebase",     1,   RoleBase},
}
CG_JJC_LADDER_BOARD = {}
GC_JJC_LADDER_BOARD = {
	{"list",		50,		JjcLadderRoardNet},
	{"myData",		1,		JjcLadderRoardNet},
	{"myRank",		1,		"int"},			-- 名次 0-未上榜
}

-- 奖励查看
JjcLadderRewardNet = {
	{"rankMin",		1,		"int"},
	{"rankMax",		1,		"int"},
	{"items",		5,		ItemData},
}
CG_JJC_LADDER_REWARD_QUERY = {}
GC_JJC_LADDER_REWARD_QUERY = {
	{"list",		20,		JjcLadderRewardNet},
	{"myRank",		1,		"int"},
	{"myReward",	5,		ItemData},
}

-- 日志查看
JjcLadderLogNet = {
	{"time",		1,		"int"},			-- 时间戳
	{"attacker",    1,     RoleBase},
	{"defender",    1,     RoleBase},
	{"isWin",		1,		"byte"},		-- 0-失败 1-胜利
	{"videoUuid",	1,		"string"},		-- 录像id
	{"atkSvr",      1,     "string"},
	{"defSvr",      1,     "string"},    
	{"atkRank",     1,     "int"},
	{"defRank",     1,     "int"},
	
}
CG_JJC_LADDER_LOG = {}
GC_JJC_LADDER_LOG = {
	{"list",		30,		JjcLadderLogNet},
	{"godList",     10,     JjcLadderLogNet},   -- 大神风采
}

-- 查看录像
CG_JJC_LADDER_REPEAT_VIDEO = {
	{"videoUuid",	1,		"string"},		-- 录像id	
}

-- 竞技场战斗后奖励
-- 竞技场战斗后数据
GC_JJC_LADDER_AFTER_FIGHT = {
	{"result",			1,		"byte"},        -- 胜负结果  1胜2负
	{"rank",			1,		"int"},       	-- 进攻方分数
	{"newRank",         1,     "int"},
	{"targetRank",      1,     "int"},
	{"targetNewRank",   1,     "int"},
	{"atkRole",		    1,		RoleBase},      -- 进攻方rolebase
	{"defRole",	        1,		RoleBase},      -- 进攻方rolebase
	{"items",			3,		ItemData},      -- 奖励道具
}	