local HechengLogic = require("hecheng.HechengLogic")
local FenjieLogic = require("hecheng.FenjieLogic")
local EquipHechengLogic = require("hecheng.EquipHechengLogic")

-- 英雄合成查询
function CG_HECHENG_QUERY(human, msg)
	HechengLogic.hechengQuery(human, msg.camp)
end

-- 英雄分解
function CG_FENJIE(human, msg)
	if msg.type ~= FenjieLogic.FENJIE_QUERY and 
		msg.type ~= FenjieLogic.FENJIE_DO then
		return
	end
	FenjieLogic.fenjie(human, msg.type, msg.heroIDList, msg.heroIndexList, true)
end

-- 英雄碎片分解
function CG_HERO_CHIP_FENJIE(human, msg)
	if msg.type ~= FenjieLogic.FENJIE_QUERY and 
		msg.type ~= FenjieLogic.FENJIE_DO then
		return
	end
	FenjieLogic.fenjieChip(human, msg.type, msg.itemIdList, msg.itemIdCntList, true)
end

-- 装备合成帮助查询
function CG_EQUIP_HECHENG_DETAIL_QUERY(human)
	EquipHechengLogic.equipDetailQuery(human)
end

-- 查询装备合成信息
function CG_EQUIP_HECHENG_QUERY(human, msg)
	EquipHechengLogic.equipHechengQuery(human, msg.pos)
end

-- 合成装备
function CG_EQUIP_HECHENG_DO(human, msg)
	EquipHechengLogic.equipHechengDo(human, msg.id, msg.indexList)
end

function CG_EQUIP_HECHENG_LOG_QUERY(human)
    EquipHechengLogic.equipLogsQuery(human)
end
