local FuwenLogic = require("fuwen.FuwenLogic")
local BingshuLogic = require("fuwen.BingshuLogic")
local BattleWillLogic = require("fuwen.BattleWillLogic")

function CG_FUWEN_PUTON(human,msg)
    FuwenLogic.putOn(human, msg.heroID, msg.heroIndex, msg.fuwenIndex,msg.pos,nil)
end

function CG_FUWEN_PUTOFF(human,msg)
    FuwenLogic.putOff(human, msg.heroID, msg.heroIndex, msg.pos, nil)
end

function CG_FUWEN_SMELT_VAL_QUERY(human)
    FuwenLogic.fuwenSmeltValQuery(human)
end

function CG_FUWEN_HECHENG_QUERY(human,msg)
    FuwenLogic.fuwenHechengQuery(human,msg.fuwenID,msg.fuwenCnt)
end

function CG_FUWEN_HECHENG(human,msg)
    FuwenLogic.fuwenHechengDo(human,msg.fuwenIndexList)
end

function CG_FUWEN_FENJIE(human,msg)
    FuwenLogic.fuwenFenjieDo(human,msg.fuwenID,msg.fuwenIndex)
end

function CG_FUWEN_EXCHANGE(human)
    FuwenLogic.fuwenExhcange(human)
end

function CG_FUWEN_REFRESH_QUERY(human,msg)
    FuwenLogic.fuwenRefreshQuery(human,msg.fuwenID,msg.fuwenIndex,msg.pos,msg.heroID,msg.heroIndex)
end

function CG_FUWEN_REFRESH_DO(human,msg)
    FuwenLogic.fuwenRefreshDo(human,msg.fuwenID,msg.fuwenIndex,msg.heroID,msg.heroIndex,msg.pos)
end

function CG_FUWEN_RARE_SKILL_QUERY(human,msg)
    FuwenLogic.fuwenRareSkillQuery(human,msg.type)
end

function CG_FUWEN_REFRESH_SAVE(human,msg)
    FuwenLogic.fuwenRefreshSave(human,msg.fuwenID,msg.fuwenIndex,msg.pos,msg.heroID,msg.heroIndex)
end

function CG_FUWEN_EXCHANGE_QUERY(human)
    FuwenLogic.fuwenExchangeQuery(human)
end

function CG_FUWEN_UNLOCK_GRID(human,msg)
    --FuwenLogic.fuwenGridUnlock(human,msg.heroID,msg.heroIndex,msg.pos)
end

function CG_FUWEN_ATTR_QUERY(human, msg)
	FuwenLogic.CG_FUWEN_ATTR_QUERY(human,msg.fuwenID)
end

function CG_FUWEN_REFINE_QUERY(human,msg)
    FuwenLogic.fuwenRefineQuery(human,msg.fuwenID,msg.fuwenIndex,msg.pos,msg.heroID,msg.heroIndex)
end

function CG_FUWEN_REFINE_DO(human,msg)
    FuwenLogic.fuwenRefineDo(human,msg.fuwenID,msg.fuwenIndex,msg.pos,msg.heroID,msg.heroIndex)
end

function CG_FUWEN_HECHENG_ONECLICK(human, msg)
    FuwenLogic.fuwenHechengOneClickDo(human, msg.fuwenIndexList)
end

function CG_BINGSHU_QUERY(human, msg)
    BingshuLogic.sendQuery(human, msg.heroID, msg.heroIndex)
end

function CG_BINGSHU_LEARN_LIST(human, msg)
    BingshuLogic.sendLearnList(human, msg.heroID, msg.heroIndex, msg.index)
end

function CG_BINGSHU_LEARN(human, msg)
    BingshuLogic.learnSkill(human, msg.heroID, msg.heroIndex, msg.index, msg.skillID)
end

function CG_BINGSHU_LEVELUP_QUERY(human, msg)
    BingshuLogic.sendLevelUpQuery(human, msg.heroID, msg.heroIndex, msg.index)
end

function CG_BINGSHU_LEVELUP(human, msg)
    BingshuLogic.levelUp(human, msg.heroID, msg.heroIndex, msg.index)
end

function CG_BINGSHU_FORGET(human, msg)
    BingshuLogic.forget(human, msg.heroID, msg.heroIndex, msg.index)
end

function CG_FUWEN_REFINE_LIST_QUERY(human)
    FuwenLogic.sendFuwenRefineList(human)
end

function CG_FUWEN_REFINE_PREVIEW_QUERY(human)
    FuwenLogic.fuwenRefinePreview(human)
end

function CG_FUWEN_GET_WAY_QUERY(human)
    FuwenLogic.sendFuwenGetWay(human)
end

function CG_FUWEN_RESET_LOCK(human, msg)
    FuwenLogic.ResetLock(human, msg.fuwenID, msg.fuwenIndex, msg.heroID, msg.heroIndex, msg.pos, msg.opTarget, msg.opIdx, msg.opType)
end

-- 战意回退查询
function CG_BATTLE_WILL_ROLLBACK_QUERY(human, msg)
    BattleWillLogic.sendRollbackQuery(human, msg.heroID, msg.heroIndex, msg.index)
end

-- 战意回退执行
function CG_BATTLE_WILL_ROLLBACK_DO(human, msg)
    BattleWillLogic.rollback(human, msg.heroID, msg.heroIndex, msg.index)
end