local BattleLogic = require("battle.BattleLogic")
local BreakThroughTheme = require("battle.BreakThroughTheme")
local BattleGift = require("battle.BattleGift")

function CG_BATTLE_QUERY(human)
    --print("[CG_BATTLE_QUERY] 战役主界面查询开始")
	BattleLogic.query(human)
    --print("[CG_BATTLE_QUERY] 战役主界面查询结束")
end

function CG_BATTLE_HANG_GET(human)
	BattleLogic.hangGet(human)
end

function CG_BATTLE_HANG_FULL_TIME_QUERY(human)
	BattleLogic.sendHangFullTime(human)
end

function CG_BATTLE_NODE_SET(human, msg)
	BattleLogic.nodeSet(human, msg.battleID)
end

function CG_BATTLE_NODE_DETAIL_QUERY(human, msg)
	BattleLogic.nodeDetailQuery(human, msg.battleID)
end

function CG_BATTLE_HANG_FIGHT(human,msg)
	BattleLogic.hangFightQuery(human, msg.mapID)
end	

function CG_BATTLE_MOPUP_QUERY(human)
    BattleLogic.mopupQuery(human)
end

function CG_BATTLE_MOPUP_FIGHT(human)
    BattleLogic.mopupFight(human)
end

function CG_BATTLE_TONGGUAN_REWARD_GET(human,msg)
    BattleLogic.getTongGuanReward(human,msg.index)
end

function CG_BATTLE_SHARK_QUERY(human,msg)
    BattleLogic.battleSharkQuery(human,msg.battleID)
end

function CG_BATTLE_WORLD_MAP_ROLELIST_QUERY(human,msg)
    BattleLogic.worldMapRoleListQuery(human,msg.worldMapId)
end

function CG_BATTLE_HANG_QUERY(human)
    BattleLogic.onHookQuery(human)
end

function CG_BATTLE_NODE_QUERY(human,msg)
    BattleLogic.battleNodeQuery(human,msg.mapID)
end
function CG_BATTLE_WORLD_MAP_QUERY(human)
    BattleLogic.battleWorldMapQuery(human)
end

function CG_BATTLE_MAP_DROPITEMS_LIST(human)
    BattleLogic.sendMapDroItemsList(human)
end

function CG_BATTLE_MAP_DROPITEMS_DETAIL(human, msg)
    BattleLogic.sendMapDroItemsDetail(human, msg.mapID)
end

function CG_BATTLE_CHAPTER_REWARD(human, msg)
    BattleLogic.battleChapterReward(human, msg.mapID)
end

function CG_ELITE_SELECT(human,msg)
    --print("1:CG_ELITE_SELECT")
    BattleLogic.CG_ELITE_SELECT(human,msg.index)
    --print("2:CG_ELITE_SELECT")
end

function CG_ELITE_OPEN(human)
    --print("[CG_ELITE_OPEN] 开始查询当前难度")
    BattleLogic.CG_ELITE_OPEN(human)
    --print("2:CG_ELITE_OPEN")
end

function CG_BATTLE_QUERY_ALL(human,msg)
   -- print("1:CG_BATTLE_QUERY_ALL")
    BattleLogic.CG_BATTLE_QUERY_ALL(human,msg.index,msg.curIndex)
    --print("2:CG_BATTLE_QUERY_ALL")
end

function CG_BATTLE_TONGGUAN_REWARD_GET_COPY(human,msg)
    BattleLogic.CG_BATTLE_TONGGUAN_REWARD_GET_COPY(human,msg.index)
end

--获得小游戏奖励
function CG_BATTLE_GETGAMEREWARD(human,msg)
    BattleLogic.GetGameReward(human,msg.indexStr)
end

-- 每日通关信息查询
function CG_BATTLE_DAILY_PASSLVEL_INFO_QUERY(human,msg)
    BattleLogic.Battle_DailyPassLevelInfo_Query(human)
end

---------------------------------------------------肉鸽玩法---------------------------------------------------
function CG_ISNEEDSELECTATTR(human,msg)
    BattleLogic.QueryDiffBattleUnSelectAttr(human)
end

function CG_GETCHOOSEATTR_INFO(human,msg)
    BattleLogic.GetNowBattleModeUnSelectAttr(human)
end

function CG_GETALLATTR_INFO(human,msg)
    BattleLogic.GetNowBattleModeAllAttr(human)
end

function CG_CHOOSE_ATTR(human,msg)
    BattleLogic.ChooseAttr(human, msg.idx)
end

function CG_REFRESH_ATTR(human,msg)
    BattleLogic.RefreshAttr(human, msg.type, msg.id)
end


------------------------------------------多队伍战斗------------------------------------------
function CG_BATTLE_TEAM_COUNT(human,msg)
    BattleLogic.Battle_LevelTeamCnt_Query(human)
end




------------------------------闯关主题-----------------------------------------------------

function CG_BREATHROUGHTHEME_LINEUP_QUERY(human,msg)
    BreakThroughTheme.BreakThrough_Lineup_Query(human)
end


function CG_BREATHROUGHTHEME_BREAKTHROUGHREWARD_QUERY(human,msg)
    BreakThroughTheme.BreakThrough_BreakThroughReward_Query(human)
end

function CG_BREATHROUGHTHEME_ADVANCEDREWARD_QUERY(human,msg)
    BreakThroughTheme.BreakThrough_AdvancedReward_Query(human)
end


function CG_BREATHROUGHTHEME_GET_REWARD(human,msg)
    BreakThroughTheme.BreakThrough_GetReward(human, msg.rewardType)
end

function CG_BREATHROUGHTHEME_SHOW_TIPS(human,msg)
    BreakThroughTheme.BreakThrough_UpdateShowTipsState(human, msg.rewardType)
end



------------------------------闯关礼金-----------------------------------------------------

function CG_BATTLEGIFT_QUERY(human,msg)
    BattleGift.BattleGift_Query(human)
end

function CG_BATTLEGIFT_GET(human,msg)
    BattleGift.BattleGift_Get(human)
end
