local HeroLogic = require("hero.HeroLogic")
local HeroBook = require("hero.HeroBook")
local HeroEquip = require("hero.HeroEquip")
local HeroTenZhiHuan = require("hero.HeroTenZhiHuan")
local BagLogic = require("bag.BagLogic")
local HeroStrategyLogic = require("hero.HeroStrategyLogic")
local HeroGem = require("hero.HeroGem")
local HeroExclusiveWeapon = require("hero.HeroExclusiveWeapon")
local HeroPubLogic = require("hero.HeroPubLogic")
local HeroSeed = require("hero.HeroSeed")
local HeroTianYuan = require("hero.HeroTianYuan")
local HeroArtifacts = require("hero.HeroArtifacts")


-- 请求英雄详细信息:静态
function CG_HERO_BAG_STATIC(human,msg)
	HeroLogic.sendHeroBagStatic(human,msg.id, msg.tuJian)
end

-- 请求英雄详细信息:动态
function CG_HERO_BAG_DYNAMIC(human,msg)
	HeroLogic.sendHeroBagDynamic(human, msg.id, msg.index, true)
end

-- 请求英雄详细信息:动态
function CG_HERO_BAG_DYNAMIC_BY_ID(human,msg)
	HeroLogic.sendHeroBagDynamicByID(human, msg.heroID,msg.star)
end

-- 请求预览觉醒信息
function CG_HERO_JUEXING_QUERY(human,msg)
	HeroLogic.heroJueXingQuery(human,msg.id,msg.index)
end

-- 请求觉醒升星
function CG_HERO_JUEXING_DO(human,msg)
	HeroLogic.heroJueXingDo(human,msg.id,msg.index,msg.inputIDList, msg.inputIndexList)	
end

-- 请求能否一键合成升星
function CG_HERO_JUEXIN_ONECLICK_QUERY(human, msg)
	HeroLogic.heroJueXingOneClickQuery(human)
end

function CG_HERO_JUEXING_ONECLICK_DO(human, msg)
	HeroLogic.heroJueXingOneClickDo(human, msg.tHeroData)
end

-- 购买容量
function CG_HERO_CAP_BUY(human)
	HeroLogic.buyHeroCap(human)
end

-- 锁定英雄
function CG_HERO_BAG_LOCK(human, msg)
	HeroLogic.lockHero(human, msg.type, msg.heroID, msg.heroIndex)
end

-- 英雄升级
function CG_HERO_LEVEL_UP(human, msg)
	HeroLogic.heroLvUp(human, msg.id, msg.index)
end

-- 英雄升阶查询
function CG_HERO_UPGRADE_QUERY(human, msg)
	HeroLogic.heroUpgradeQuery(human, msg.id, msg.index)
end

-- 英雄升阶
function CG_HERO_UPGRADE_DO(human, msg)
	HeroLogic.heroUpgradeDo(human, msg.id, msg.index)
end

-- 英雄图鉴查询
function CG_HERO_BOOK_QUERY_CS(human, msg)
    HeroBook.querySimple_CS(human, msg.camp)
end

-- 查询所有激活的英雄图鉴
function CG_ALL_HERO_BOOK_QUERY(human, msg)
    HeroBook.HeroBook_AllHeroTujian_Query(human)
end


-- 英雄图鉴列传
function CG_HERO_BOOK_LIEZHUAN_QUERY(human, msg)
	HeroBook.CG_HERO_BOOK_LIEZHUAN_QUERY(human,msg.id)
end

-- 英雄图鉴列传奖励
function CG_HERO_BOOK_LIEZHUAN_GET(human, msg)
	HeroBook.CG_HERO_BOOK_LIEZHUAN_GET(human, msg.id)
end

-- 一键领取 英雄图鉴列传奖励
function CG_HERO_BOOK_ONECLIEK_GET(human, msg)
	HeroBook.CG_HERO_BOOK_ONECLIEK_GET(human)
end

-- 请求英雄装备信息
function CG_HERO_EQUIP_QUERY(human, msg)
	HeroEquip.query(human, msg.id, msg.index)
end

-- 穿装备
function CG_HERO_EQUIP_PUTON(human, msg)
	HeroEquip.putOn(human, msg.heroID, msg.heroIndex, msg.bagIndex, nil)
end

-- 穿装备 一个英雄到另一个英雄
function CG_HERO_EQUIP_PUTON_ON_PUT(human, msg)
	HeroEquip.putOnHero(human, msg.heroID, msg.heroIndex, msg.putHeroID, msg.putHeroIndex, msg.putHeroPos)
end

-- 脱装备
function CG_HERO_EQUIP_PUTOFF(human, msg)
	HeroEquip.putOff(human, msg.heroID, msg.heroIndex, msg.pos, nil)
end

-- 一键穿装
function CG_HERO_EQUIP_PUTON_QUICK(human, msg)
	HeroEquip.putOnQuick(human, msg.heroID, msg.heroIndex, msg.equipID1, msg.equipID2, msg.equipID3, msg.equipID4, msg.equipID5, msg.equipID6)
end

-- 一键脱装
function CG_HERO_EQUIP_PUTOFF_QUICK(human, msg)
	HeroEquip.putOffQuick(human, msg.heroID, msg.heroIndex)
end

-- 激活水晶
function CG_SHUIJING_JIHUO(human, msg) 
    HeroEquip.jihuoShuijing(human, msg.heroID, msg.heroIndex)
end

-- 查询水晶转换信息
function CG_SHUIJING_TRANS_QUERY(human, msg)
    HeroEquip.shuijingTransQuery(human, msg.heroID, msg.heroIndex)
end

-- 水晶转换
function CG_SHUIJING_TRANS_DO(human, msg)
	HeroEquip.shuijingTransDo(human, msg.heroID, msg.heroIndex)
end

-- 水晶保存
function CG_SHUIJING_TRANS_SAVE(human, msg)
	HeroEquip.shuijingTransSave(human, msg.heroID, msg.heroIndex)
end

-- 水晶升级信息查询
function CG_SHUIJING_UPLV_QUERY(human, msg)
	HeroEquip.shuijingUpLvQuery(human, msg.type, msg.heroID, msg.heroIndex)
end

-- 水晶升级
function CG_SHUIJING_UPLV_DO (human, msg)
	HeroEquip.shuijingUpLvDo(human, msg.type, msg.heroID, msg.heroIndex)
end

-- 神器升级查询
function CG_SHENQI_UPLV_QUERY(human, msg)
	HeroEquip.shenqiUpLvQuery(human, msg.heroID, msg.heroIndex)
end

-- 神器升级
function CG_SHENQI_UPLV_DO(human, msg)
	HeroEquip.shenqiUpLvDo(human, msg.heroID, msg.heroIndex, msg.equipIDList, msg.equipCntList)
end

-- 查看分享英雄的信息
function CG_HERO_SHARE_DATA(human, msg)
	HeroLogic.shareData(human, msg.uuid, msg.heroIndex, msg.nChatType, msg.nServerIndex)
end


-- 重生查询
function CG_HERO_CHONGSHENG_QUERY(human,msg)
	HeroLogic.heroChongShengQuery(human,msg.id,msg.index)
end

-- 重生操作
function CG_HERO_CHONGSHENG_DO(human,msg)
	HeroLogic.heroChongShengDo(human,msg.id,msg.index)	
end

-- 回退查询
function CG_HERO_HUITUI_QUERY(human, msg)
	HeroLogic.sendHuituiQuery(human, msg.heroID, msg.heroIndex)
end

-- 回退操作
function CG_HERO_HUITUI(human, msg)
	HeroLogic.huituiHero(human, msg.heroID, msg.heroIndex)
end

function CG_HERO_LIKE(human)
    
end

function CG_HERO_STRATEGY_QUERY(human,msg)
    HeroStrategyLogic.StrategyQueryByHeroID(human,msg.heroID)
end

function CG_HERO_DETAIL_MSG_QUERY(human,msg)
    HeroStrategyLogic.heroDetailMsgQuery(human,msg.uuid,msg.heroIndex,msg.heroID)
end

function CG_HERO_GL_DOT_QUERY(human)
    HeroStrategyLogic.heroGlDot(human)
end

function CG_HERO_BAG_DOTS(human)
	HeroLogic.sendBagDots(human)
end

function CG_HERO_RESET_QUERY(human, msg)
	HeroLogic.resetHeroQuery(human, msg.heroID, msg.heroIndex)
end

function CG_HERO_RESET(human, msg)
	HeroLogic.resetHero(human, msg.heroID, msg.heroIndex)
end
-- 英雄置换查询
function CG_HERO_TEN_ZHIHUAN_QUERY(human)
	HeroTenZhiHuan.query(human)
end
-- 英雄置换
function CG_HERO_TEN_ZHIHUAN(human, msg)
	HeroTenZhiHuan.zhihuan(human, msg.fiveId, msg.heroIndexList)
end

function CG_HERO_BOOK_SINGLE_QUERY(human,msg)
    HeroBook.queryHeroBookById(human,msg.heroID,msg.star)
end


----------------------------------------------宝石——--------------------------------------
function CG_HERO_GEM_LEVELUP_QUERY(human,msg)
    HeroGem.getGemData(human, msg.heroID, msg.heroIndex, msg.pos)
end


function CG_HERO_GEM_UPGRADEGEM(human,msg)
    HeroGem.upgradeGem(human, msg.heroID, msg.heroIndex, msg.pos)
end


---------------------------------------专属武器------------------------------------------------
function CG_HERO_EXCLUSIVE_WEAPON_QUERY(human,msg)
    HeroExclusiveWeapon.Query(human, msg.heroID, msg.heroIndex)
end

function CG_HERO_EXCLUSIVE_WEAPON_UPGRADE(human,msg)
    HeroExclusiveWeapon.UpgradeWeapon(human, msg.heroID, msg.heroIndex)
end

function CG_HERO_EXCLUSIVE_WEAPON_BOOK_QUERY(human,msg)
    HeroExclusiveWeapon.BookQuery(human, msg.heroID)
end



---------------------------------------英雄酒馆------------------------------------------------

function CG_HEROPUB_QUERY(human,msg)
    HeroPubLogic.PubQuery(human)
end

function CG_HEROPUB_ACTIVATE(human,msg)
    HeroPubLogic.ActivatePubAtrr(human, msg.index)
end

function CG_HEROPUB_REWARD_QUERY(human,msg)
    HeroPubLogic.RewardQuery(human)
end

function CG_HEROPUB_REWARD_GET(human,msg)
    HeroPubLogic.RewardGet(human)
end



---------------------------------------英雄种子-----------------------------------------------
function CG_HEROSEED_QUERY_ALL(human, msg)
    HeroSeed.HeroSeed_Query_All(human, msg.heroID, msg.heroIndex)
end

function CG_HEROSEED_QUERY_SINGLE(human, msg)
    HeroSeed.HeroSeed_Query_Single(human, msg.heroID, msg.heroIndex, msg.seedIdx)
end

function CG_HEROSEED_UPGRADE(human, msg)
    HeroSeed.HeroSeed_UpGrade(human, msg.heroID, msg.heroIndex, msg.seedIdx, msg.opType)
end

---------------------------------------------------------------------------------------------

---------------------------------------英雄天元系统-----------------------------------------------
function CG_HEROTY_QUERY(human, msg)
    HeroTianYuan.HeroTianYuan_Query(human, msg.heroID, msg.heroIndex)
end

function CG_HEROTY_POINT_UPGRADE(human, msg)
    HeroTianYuan.HeroTianYuan_PointUpGrade(human, msg.heroID, msg.heroIndex)
end

function CG_HEROTY_STAGE_UPGRADE(human, msg)
    HeroTianYuan.HeroTianYuan_StageUpGrade(human, msg.heroID, msg.heroIndex)
end

---------------------------------------------------------------------------------------------



---------------------------------------英雄神威灵装系统-----------------------------------------------
function CG_HEROARTIFACTS_BASE_QUERY(human, msg)
    HeroArtifacts.HeroArtifacts_Base_Query(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_ACTIVATE(human, msg)
    HeroArtifacts.HeroArtifacts_Activate(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_LV_QUERY(human, msg)
    HeroArtifacts.HeroArtifacts_Lv_Query(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_UPGRADE_LV(human, msg)
    HeroArtifacts.HeroArtifacts_UpGrade_Level(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_STAR_QUERY(human, msg)
    HeroArtifacts.HeroArtifacts_Star_Query(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_UPGRADE_STAR(human, msg)
    HeroArtifacts.HeroArtifacts_UpGrade_Star(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_EFFECT_REFINE_QUERY(human, msg)
    HeroArtifacts.HeroArtifacts_EffectRefine_Query(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_EFFECT_LOCK(human, msg)
    HeroArtifacts.HeroArtifacts_Effect_Lock(human, msg.heroID, msg.heroIndex, msg.effectIdxArr)
end

function CG_HEROARTIFACTS_EFFECT_REFINE_DO(human, msg)
    HeroArtifacts.HeroArtifacts_EffectRefine_Do(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_EFFECTREFINE_UPDATE(human, msg)
    HeroArtifacts.HeroArtifacts_EffectRefine_Handle(human, msg.heroID, msg.heroIndex, msg.opType)
end

function CG_HEROARTIFACTS_BESKILL_REFINE_QUERY(human, msg)
    HeroArtifacts.HeroArtifacts_BeSkillRefine_Query(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_BESKILL_LOCK(human, msg)
    HeroArtifacts.HeroArtifacts_BeSkill_Lock(human, msg.heroID, msg.heroIndex, msg.beSkillIdxArr)
end

function CG_HEROARTIFACTS_BESKILL_REFINE_DO(human, msg)
    HeroArtifacts.HeroArtifacts_BeSkillRefine_Do(human, msg.heroID, msg.heroIndex)
end

function CG_HEROARTIFACTS_BESKILLREFINE_UPDATE(human, msg)
    HeroArtifacts.HeroArtifacts_BeSkillRefine_Handle(human, msg.heroID, msg.heroIndex, msg.opType)
end

---------------------------------------------------------------------------------------------