--遗迹探宝--

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

YjHeroNet = {
	{"heroSimple",		1,		HeroSimple},
	{"isFight",			1,		"byte"}, -- 是否出战 英雄列表用到
}
YjGridDataNet = {
	{"type",			1,		"byte"}, --格子类型
	{"icon",			1,		"int"}, --展示图标
	{"item",			2,		ItemData}, --道具展示 [0] = 0不是道具
	{"monster",			2,		YjHeroNet}, --[0] = 0不是怪物或boss
}
YjGridNet = {
	{"index",			1,		"byte"}, --格子index 从左到右 从上到下 1-25
	{"gridData",		2,		YjGridDataNet}, --格子具体信息 未翻开则 [0] = 0
}
YjkillMonsterNet = {
	{"needCnt",			1,		"int"},     --需要击杀
	{"nowCnt",			1,		"int"},     --现在击杀
    {"state",           1,      "byte"},    --是否可领
}
YjYaojisNet = {
	{"yaojiType",		1,		"byte"}, --1/2 生命/死亡
	{"item",			1,		ItemData}, --药剂
	{"canUse",			1,		"int"}, --可使用
}

CG_YJTREASURE_QUERY = {}
GC_YJTREASURE_QUERY = {
	{"leftTime",		1,		"int"}, --离重置剩余时间
	{"nowLayer",		1,		"short"}, --x层
	{"heroList",		5,		YjHeroNet}, -- 出战英雄
    {"isQuick",         1,      "byte"},        -- 是否跳过
	{"gridList",		25,		YjGridNet}, --格子信息
	{"killMonster",		1,		YjkillMonsterNet}, --消灭守卫（达标奖励外部展示）
	{"yaojis",			2,		YjYaojisNet}, --药剂（生命+死亡）
	{"yjShoperCnt",		1,		"int"}, --遗迹商人可点次数
	{"saodangMax",		1,		"byte"}, --扫荡上限
	{"saodangNow",		1,		"byte"}, --已扫荡
	{"sangdangNeed",	1,		"double"}, --扫荡需要战斗力 =0 可扫荡 >0需要战斗力
    {"type",            1,      "byte"},    -- 返回路径  0 主动查询 1 被动更新
    {"layerMax",        1,      "byte"},    -- 历史最高层 大于10 显示跳过
}
GC_YJTREASURE_SAVE_QUERY = {} --弹出英雄保存界面

--点击格子
CG_YJTREASURE_TOUCH_GRID = {
	{"gridIndex",		1,		"byte"}, --1-25
}

--进入下一层
GC_YJTREASURE_GETITEMS = {
	{"getItems",		10,		ItemData}, --累计收益
}

--刷新格子
GC_YJTREASURE_GRIDS_CHANGE = {
	{"grid",			1,		YjGridNet}, --格子信息
}

--使用药剂 --怪物走GC_YJTREASURE_QUERY
CG_YJTREASURE_USE_YAOJI = {
	{"type",			1,		"byte"}, --1生命 2死亡
	{"index",			1,		"byte"}, --type = 1时英雄队伍中pos type = 2时格子index
}
GC_YJTREASURE_USE_YAOJI = {
	{"type",			1,		"byte"}, --1生命 2死亡
	{"obj",				1,		YjHeroNet}, --被使用药剂的英雄
	{"canUse",			1,		"int"}, --可使用
}

--灵魂拷问
GC_YJTREASURE_SOUL = {
	{"soulID",			1,		"short"}, --问题id
	{"soulquestion",	1,		"string"}, --问题
	{"select1",			1,		"string"}, --选项1
	{"select2",			1,		"string"}, --选项2
}

CG_YJTREASURE_SOUL_SELECT = {
	{"gridIndex",		1,		"byte"}, --1-25
	{"select",			1,		"byte"}, --1-2
}
GC_YJTREASURE_SOUL_SELECT = {
	{"tip",				1,		"string"}, --提示
	{"items",        	5,      ItemData},   -- 获得的道具
}

--博闻强识
YjQuestionNet = {
	{"questionID",		1,		"short"}, --题目ID
	{"question",		1,		"string"}, --题目
	{"select1",			1,		"string"}, --选项1
	{"select2",			1,		"string"}, --选项2
	{"select3",			1,		"string"}, --选项3
	{"select4",			1,		"string"}, --选项4
	{"rightSelect",		1,		"byte"}, --1-4
	{"answer",			1,		"byte"}, --1-4
}
GC_YJTREASURE_QUESTION = {
	{"yjQuestions",		3,		YjQuestionNet}, --博闻强识
	{"oneReward",		2,		ItemData}, --单题答对奖励
	{"rightCnt",		1,		"byte"}, --1-3
}

CG_YJTREASURE_QUESTION_SELECT = {
	{"gridIndex",		1,		"byte"}, --1-25
	{"questionID",		1,		"short"}, --题目ID
	{"select",			1,		"byte"}, --1-4
}
GC_YJTREASURE_QUESTION_SELECT = {
	{"gridIndex",		1,		"byte"}, --1-25
	{"questionID",		1,		"short"}, --题目ID
	{"rightCnt",		1,		"byte"}, --1-3
}

--好运骰子
GC_YJTREASURE_DICE_QUERY = {
	{"zuanshi",			1,		"int"}, --钻石数量
	{"jinbi",			1,		"int"}, --金币数量
}

CG_YJTREASURE_DICE_USE = {
	{"gridIndex",		1,		"byte"}, --1-25
	{"use",				1,		"byte"}, --1金币 2钻石
}
GC_YJTREASURE_DICE_USE = {
    {"content",1,"string"},
}

--神秘宝箱
GC_YJTREASURE_BOXREWARD = {
	{"yjBoxReward",		4,		ItemData},
	{"need",			1,		ItemData}, --需要钥匙
}

CG_YJTREASURE_BOXREWARD_OPEN = {
	{"gridIndex",		1,		"byte"}, --1-25
}
GC_YJTREASURE_BOXREWARD_OPEN = {}

YjShoperItemNet = {
	{"allShopID",		1,		"short"},
	{"item",			1,		ItemData}, --可购买
	{"needItem",		1,		ItemData}, --购买所需
	{"isBuy",			1,		"byte"}, --0,1 无有
	{"discount",		1,		"byte"}, --x折
}

--商店
GC_YJTREASURE_TREASURESHOP = {
	{"items",			3,		YjShoperItemNet},
}

CG_YJTREASURE_TREASURESHOP_BUY = {
	{"allShopID",		1,		"short"},
}
GC_YJTREASURE_TREASURESHOP_BUY = {
	{"allShopID",		1,		"short"},
}

--神秘商人
CG_YJTREASURE_YJSHOPER = {}
GC_YJTREASURE_YJSHOPER = {
	{"yjShoperItem",	1,		YjShoperItemNet},
	{"yjShoperCnt",		1,		"int"}, --遗迹商人可点次数
}

CG_YJTREASURE_YJSHOPER_BUY = {
	{"allShopID",		1,		"short"},
}
GC_YJTREASURE_YJSHOPER_BUY = {
	{"allShopID",		1,		"short"},
}

--探险商城（包含神秘商人和商店所出现的所有道具）
CG_YJTREASURE_ALLSHOP = {}
GC_YJTREASURE_ALLSHOP = {
	{"itemList",		50,		YjShoperItemNet},
	{"isEnd",			1,		"byte"}, --分包处理 1已发完
}
--探险商城 购买
CG_YJTREASURE_ALLSHOP_BUY = {
	{"allShopID",		1,		"short"},
}
GC_YJTREASURE_ALLSHOP_BUY = {
	{"allShopID",		1,		"short"},
}

--战斗 选择出战 真实站位
CG_YJTREASURE_UPDATE_FIGHT = {
	{"pos",				1,		"byte"},
}
GC_YJTREASURE_UPDATE_FIGHT = {
	{"pos",				1,		"byte"},
}

--buff 加成
CG_YJTREASURE_BUFF_QUERY = {}
YjBuffNet = {
	{"attr",			1,		Attr}, --属性加成
}
GC_YJTREASURE_BUFF_QUERY = {
	{"attrs",			6,		YjBuffNet},
}

--扫荡
CG_YJTREASURE_SAODANG = {}

--目标奖励
CG_YJTREASURE_DABIAOREWARD = {}
DabiaoNet = {
	{"desc",			1,		"string"},
	{"needCnt",			1,		"short"},
	{"isget",			1,		"byte"}, --01,前往/已领取
	{"items",			4,		ItemData},
}
--目标奖励 列表返回
GC_YJTREASURE_DABIAOREWARD_QUERY = {
	{"dabiaoList",		50,		DabiaoNet},
	{"nowCnt",			1,		"short"},
}
--目标奖励 领取奖励刷新消灭守卫信息
GC_YJTREASURE_DABIAOREWARD_CHANGE = {
	{"killMonster",		1,		YjkillMonsterNet}, --消灭守卫（达标奖励外部展示）
}

--排行榜
CG_YJTREASURE_BILLBOARD = {}
YjBoardNet = {
	{"rank",			1,		"short"},
	{"roleBase",        1,      RoleBase},
	{"layer",			1,		"int"}, --层数
	{"tansuo",			1,		"int"}, --探索度
}
GC_YJTREASURE_BILLBOARD = {
	{"yjBoard",			50,		YjBoardNet}, --key1层数 key2探索度
	{"myRank",			1,		YjBoardNet}, --我的排名
}

GC_YJTREASURE_OPENGRIDS = {
	{"list",			8,		YjGridNet}, --翻开格子的原始信息 客户端做飞动效果(仅返回翻开即获得的格子信息)
}

-- 获得药剂刷新数量
GC_YJTREASURE_YAOJI_ADD = {
	{"yaoji",			1,		YjYaojisNet},
}

GC_YJTREASURE_BUFF_GET = {
    {"buff",1,Attr},            -- 获得属性
}

GC_YJTREASURE_OUT = {}

GC_YJTREASURE_GET_ITEM = {
    {"item",5,ItemData}
}