local this = {}

function this:req_CSProtoRogueLikeCreateRogue(strategyId, callback)
  local data = {
    strategy = strategyId,
    version = 1,
    difficulty = self:getLastDifficulty()
  }
  L_Net:sendMessage(MsgGenCode.CSProtoRogueLikeCreateRogue, data, function(rspData, errorCode)
    if errorCode == L_Const.errorCode.ErrCodeSucc and callback then
      callback()
    end
  end)
end

function this:req_CSProtoRogueLikeEnterRoom(passOrder, callback)
  local data = {pass_order = passOrder}
  L_Net:sendMessage(MsgGenCode.CSProtoRogueLikeEnterRoom, data, function(rspData, errorCode)
    if errorCode == L_Const.errorCode.ErrCodeSucc and callback then
      callback()
    end
  end)
end

function this:req_CSProtoRogueLikeEnterRogue(callback)
  L_Net:sendMessage(MsgGenCode.CSProtoRogueLikeEnterRogue, nil, function(rspData, errorCode)
    if errorCode == L_Const.errorCode.ErrCodeSucc and callback then
      callback()
    end
  end)
end

function this:req_CSProtoRogueLikeQuit()
  L_Net:sendMessage(MsgGenCode.CSProtoRogueLikeQuit)
end

function this:req_CSProtoRogueLikeStop(callback)
  L_Net:sendMessage(MsgGenCode.CSProtoRogueLikeStop, nil, function(rspData, errorCode)
    if errorCode == L_Const.errorCode.ErrCodeSucc and callback then
      callback()
    end
  end)
end

return this
