搜索

[LEG/BLUE引擎视频教程] 【天心数据新BLUE引擎SQLite版数据库架设教程】第六讲 Json格式列表服务启动

[复制链接]
发表于 2022-11-5 13:17 | 显示全部楼层 |阅读模式
一.JSON列表格式介绍
  1. // json不允许这样注释,所以另起此文件进行说明,json建议使用vscode查看编辑
  2. // 登录器配置dat中的更新列表链接,会解析到此远程配置服务器并连接,格式:IP:端口 或 域名:端口,兼容原格式
  3. // 修改Config.json实时生效,并自动下发新的配置,Patch补丁字段不会实时生效,因为登录器启动才会用到此信息

  4. {
  5.   "DebugLog": false,                // 调试日志,默认false不开启
  6.   "KeepAlive": true,                // 保持登录器一直连接服务器,方便推送,默认开启(某些机房会踢掉无活动连接,其实就算断开,客户端也会自动尝试连接配置服务器)
  7.   "PushUpdates": true,                // 服务器配置变更自动推送给登录器
  8.   "ListenPort": 9200,                // 服务器监听端口
  9.   "WriteBlockSize": 32768,            // 下发块大小,默认32768,保持默认即可
  10.   "Password": "设置一个非空密码",    // 通讯密码,登录器配置要配置与此相同的密码才能获取到配置

  11.   "Launcher": [                        // 定义各个版本的登录器配置
  12.     {
  13.       "Version": 1,                    // 登录器请求配置的版本,登录器配置器生成与此对应的版本,可以获取到下列配置信息
  14.       "Desc": "某登录器版本1用...",                // 描述,识别用
  15.       "PayUrl": "https://pay.xxxxx.com",        // 支付链接
  16.       "MainUrl": "https://www.xxxxx.com",        // 主页链接
  17.       "LinkUrl": "http://127.0.0.1/link.htm",    // 登录器上的快捷Link页面
  18.       "HelpUrl": "https://help.xxxxx.com",        // 客服链接
  19.       "ForumUrl": "https://bbs.xxxxx.com",        // 论坛链接
  20.       "NewIDUrl": "https://reg.xxxxx.com",            // 注册新账号链接
  21.       "ChgPwdUrl": "https://password.xxxxx.com",    // 修改密码链接

  22.       "ServerList": [        // 服务器列表
  23.         {
  24.           "ItemFilterID": 1,                    // 物品过滤ID,1时是lsDefaultItemFilter.txt,>1时是lsDefaultItemFilterX.txt
  25.           "VersionStr": "合击版本",                // 版本分类
  26.           "FontSize": 10,                        // 字体大小,默认10,多个条目最好保持一致(可选)
  27.           "FontName": "宋体",                    // 使用的字体,默认宋体,多个条目最好保持一致(可选)
  28.           "FontColor": "clLime",                // 文字颜色,默认#004BBBF1,格式:clXXXX或者#蓝绿红(可选)
  29.           "ImageIndex": 0,                        // 条目常态下的图标,会读取游戏目录下\Images\0.ico,-1不使用图标,支持0~99,即会读取\Images\0~99.ico,可利用自动更新(可选)
  30.           "SelectedIndex": 0,                    // 条目选择时的图标,会读取游戏目录下\Images\0.ico,-1不使用图标(可选)
  31.           "GameAreas": [            // 上述版本下的各个游戏区
  32.             {
  33.               "Caption": "热血传奇1",            // 游戏服务器名称
  34.               "FontSize": 10,                    // 同上(可选)
  35.               "FontName": "宋体",                // 同上(可选)
  36.               "FontColor": "#0AFF7F",            // 同上(可选)
  37.               "ImageIndex": 0,                    // 同上(可选)
  38.               "SelectedIndex": 0,                // 同上(可选)
  39.               "Host": "127.0.0.1",                // 登录网关地址,支持域名格式,比如:www.website.com
  40.               "Port": 7000,                        // 登录网关端口
  41.               "Client": "bluem2_client.dat",    // 开始游戏执行的客户端
  42.               "UIConfigFile": "cui.cfg",        // 指定自定UI配置文件名
  43.               "PatchServerAddr": "127.0.0.1:8201"    // 微端配置,支持域名格式,比如:www.website.com:8201
  44.             },
  45.             {                        // 另一个区的定义,同上
  46.               "Caption": "热血传奇1-副本",
  47.               "FontSize": 10,
  48.               "FontName": "宋体",
  49.               "FontColor": "#0AFF7F",
  50.               "ImageIndex": 0,
  51.               "SelectedIndex": 0,
  52.               "Host": "127.0.0.1",
  53.               "Port": 7000,
  54.               "Client": "bluem2_client.dat",
  55.               "UIConfigFile": "cui.cfg",
  56.               "PatchServerAddr": "127.0.0.1:8201"
  57.             }
  58.           ]
  59.         },
  60.         {
  61.           "ItemFilterID": 2,
  62.           "VersionStr": "连击版本",
  63.           "FontSize": 10,
  64.           "FontName": "宋体",
  65.           "FontColor": "#FFFF00",
  66.           "ImageIndex": 1,
  67.           "SelectedIndex": 1,
  68.           "GameAreas": [
  69.             {
  70.               "Caption": "热血传奇2",
  71.               "FontSize": 10,
  72.               "FontName": "宋体",
  73.               "FontColor": "#7FFF7F",
  74.               "ImageIndex": 1,
  75.               "SelectedIndex": 1,
  76.               "Host": "127.0.0.1",
  77.               "Port": 7000,
  78.               "Client": "bluem2_client2.dat",
  79.               "UIConfigFile": "cui2.cfg",
  80.               "PatchServerAddr": "127.0.0.1:8202"
  81.             },
  82.             {
  83.               "Caption": "热血传奇2-副本",
  84.               "FontSize": 10,
  85.               "FontName": "宋体",
  86.               "FontColor": "#7FFF7F",
  87.               "ImageIndex": 1,
  88.               "SelectedIndex": 1,
  89.               "Host": "127.0.0.1",
  90.               "Port": 7000,
  91.               "Client": "bluem2_client2.dat",
  92.               "UIConfigFile": "cui2.cfg",
  93.               "PatchServerAddr": "127.0.0.1:8202"
  94.             }
  95.           ]
  96.         },
  97.         {
  98.           "ItemFilterID": 3,
  99.           "VersionStr": "复古版本",
  100.           "FontSize": 10,
  101.           "FontName": "宋体",
  102.           "FontColor": "clSkyBlue",
  103.           "ImageIndex": 2,
  104.           "SelectedIndex": 2,
  105.           "GameAreas": [
  106.             {
  107.               "Caption": "热血传奇3",
  108.               "FontSize": 10,
  109.               "FontName": "宋体",
  110.               "FontColor": "#FF00FF",
  111.               "ImageIndex": 2,
  112.               "SelectedIndex": 2,
  113.               "Host": "127.0.0.1",
  114.               "Port": 7000,
  115.               "Client": "bluem2_client3.dat",
  116.               "UIConfigFile": "cui3.cfg",
  117.               "PatchServerAddr": "127.0.0.1:8203"
  118.             },
  119.             {
  120.               "Caption": "热血传奇3-副本",
  121.               "FontSize": 10,
  122.               "FontName": "宋体",
  123.               "FontColor": "#FF00FF",
  124.               "ImageIndex": 2,
  125.               "SelectedIndex": 2,
  126.               "Host": "127.0.0.1",
  127.               "Port": 7000,
  128.               "Client": "bluem2_client3.dat",
  129.               "UIConfigFile": "cui3.cfg",
  130.               "PatchServerAddr": "127.0.0.1:8203"
  131.             }
  132.           ]
  133.         }
  134.       ],
  135.       "Patch": [        // 补丁配置
  136.         {
  137.           "valid": false,                    // 生效true,不生效false
  138.           "launcher": true,                    // 该条目是登录器本身
  139.           "relaunch": true,                    // 更新完是否自动重启登录器,是true,否false
  140.           "file": "logintool.exe",            // 更新文件名,launcher=true时忽略此参数
  141.           "hash": "6658C3316069B621C595BCF426D50F03",        // MD5值
  142.           "link": "http://127.0.0.1/launcher/upgrade/BlueM2.exe"        // 下载链接
  143.         },
  144.         {
  145.           "valid": false,
  146.           "file": "datalui.pkg",
  147.           "hash": "1EAD642FEE0C6FD80FBC303D4E449645",
  148.           "link": "http://127.0.0.1/launcher/upgrade/lui.pkg"
  149.         },
  150.         {
  151.           "valid": false,
  152.           "file": "bluem2_client.dat",
  153.           "hash": "34DA14BC2EB078500184F98D31A00D2A",
  154.           "link": "http://127.0.0.1/launcher/upgrade/bluem2_client.dat"
  155.         },
  156.         {
  157.           "valid": false,
  158.           "file": "bluem2_client2.dat",
  159.           "hash": "5C3007CCCC92663B606BEE6BDC960501",
  160.           "link": "http://127.0.0.1/launcher/upgrade/bluem2_client2.dat"
  161.         },
  162.         {
  163.           "valid": false,
  164.           "file": "bluem2_client3.dat",
  165.           "hash": "832F8BDAAEB172E41F8B3A65BCFA627C",
  166.           "link": "http://127.0.0.1/launcher/upgrade/bluem2_client3.dat"
  167.         },
  168.         {
  169.           "valid": false,
  170.           "file": "speedtest_x64.msi",
  171.           "hash": "B5AEE03A783665B9799E9C6A7B7D0D8C",
  172.           "link": "https://install.speedtest.net/app/windows/latest/speedtestbyookla_x64.msi"        // 支持https下载链接
  173.         },
  174.         {
  175.           "valid": true,
  176.           "file": ".\\images\\0.ico",
  177.           "hash": "CC7305FEB222B604DFF882FBFC755417",
  178.           "link": "http://127.0.0.1/launcher/upgrade/0.ico"
  179.         },
  180.         {
  181.           "valid": true,
  182.           "file": ".\\images\\1.ico",
  183.           "hash": "D3700F4244669024DD7A77520A6C4CA5",
  184.           "link": "http://127.0.0.1/launcher/upgrade/1.ico"
  185.         },
  186.         {
  187.           "valid": true,
  188.           "file": ".\\images\\2.ico",
  189.           "hash": "ACE1AE57C4EAEFA6DBFCAB6B11F2DC75",
  190.           "link": "http://127.0.0.1/launcher/upgrade/2.ico"
  191.         }
  192.       ]
  193.     },
  194.     {        // 另外一个登录器版本2,登录器配置器生成与此对应的版本,可以获取到此{}中的配置信息
  195.       "Version": 2,
  196.       "Desc": "某登录器版本2用...",
  197.       "PayUrl": "https://pay.xxxxx.com",
  198.       "MainUrl": "https://www.xxxxx.com",
  199.       "LinkUrl": "http://127.0.0.1/link.htm",
  200.       "HelpUrl": "https://help.xxxxx.com",
  201.       "ForumUrl": "https://bbs.xxxxx.com",
  202.       "NewIDUrl": "https://reg.xxxxx.com",
  203.       "ChgPwdUrl": "https://password.xxxxx.com",

  204.       "ServerList": [
  205.         {
  206.           "ItemFilterID": 1,
  207.           "VersionStr": "合击版本",
  208.           "FontSize": 10,
  209.           "FontName": "宋体",
  210.           "FontColor": "clLime",
  211.           "ImageIndex": 0,
  212.           "SelectedIndex": 0,
  213.           "GameAreas": [
  214.             {
  215.               "Caption": "热血传奇1",
  216.               "FontSize": 10,
  217.               "FontName": "宋体",
  218.               "FontColor": "#0AFF7F",
  219.               "ImageIndex": 0,
  220.               "SelectedIndex": 0,
  221.               "Host": "127.0.0.1",
  222.               "Port": 7000,
  223.               "Client": "bluem2_client.dat",
  224.               "UIConfigFile": "cui.cfg",
  225.               "PatchServerAddr": "127.0.0.1:8201"
  226.             },
  227.             {
  228.               "Caption": "热血传奇1-副本",
  229.               "FontSize": 10,
  230.               "FontName": "宋体",
  231.               "FontColor": "#0AFF7F",
  232.               "ImageIndex": 0,
  233.               "SelectedIndex": 0,
  234.               "Host": "127.0.0.1",
  235.               "Port": 7000,
  236.               "Client": "bluem2_client.dat",
  237.               "UIConfigFile": "cui.cfg",
  238.               "PatchServerAddr": "127.0.0.1:8201"
  239.             }
  240.           ]
  241.         },
  242.         {
  243.           "ItemFilterID": 2,
  244.           "VersionStr": "连击版本",
  245.           "FontSize": 10,
  246.           "FontName": "宋体",
  247.           "FontColor": "#FFFF00",
  248.           "ImageIndex": 1,
  249.           "SelectedIndex": 1,
  250.           "GameAreas": [
  251.             {
  252.               "Caption": "热血传奇2",
  253.               "FontSize": 10,
  254.               "FontName": "宋体",
  255.               "FontColor": "#7FFF7F",
  256.               "ImageIndex": 1,
  257.               "SelectedIndex": 1,
  258.               "Host": "127.0.0.1",
  259.               "Port": 7000,
  260.               "Client": "bluem2_client2.dat",
  261.               "UIConfigFile": "cui2.cfg",
  262.               "PatchServerAddr": "127.0.0.1:8202"
  263.             },
  264.             {
  265.               "Caption": "热血传奇2-副本",
  266.               "FontSize": 10,
  267.               "FontName": "宋体",
  268.               "FontColor": "#7FFF7F",
  269.               "ImageIndex": 1,
  270.               "SelectedIndex": 1,
  271.               "Host": "127.0.0.1",
  272.               "Port": 7000,
  273.               "Client": "bluem2_client2.dat",
  274.               "UIConfigFile": "cui2.cfg",
  275.               "PatchServerAddr": "127.0.0.1:8202"
  276.             }
  277.           ]
  278.         },
  279.         {
  280.           "ItemFilterID": 3,
  281.           "VersionStr": "复古版本",
  282.           "FontSize": 10,
  283.           "FontName": "宋体",
  284.           "FontColor": "clSkyBlue",
  285.           "ImageIndex": 2,
  286.           "SelectedIndex": 2,
  287.           "GameAreas": [
  288.             {
  289.               "Caption": "热血传奇3",
  290.               "FontSize": 10,
  291.               "FontName": "宋体",
  292.               "FontColor": "#FF00FF",
  293.               "ImageIndex": 2,
  294.               "SelectedIndex": 2,
  295.               "Host": "127.0.0.1",
  296.               "Port": 7000,
  297.               "Client": "bluem2_client3.dat",
  298.               "UIConfigFile": "cui3.cfg",
  299.               "PatchServerAddr": "127.0.0.1:8203"
  300.             },
  301.             {
  302.               "Caption": "热血传奇3-副本",
  303.               "FontSize": 10,
  304.               "FontName": "宋体",
  305.               "FontColor": "#FF00FF",
  306.               "ImageIndex": 2,
  307.               "SelectedIndex": 2,
  308.               "Host": "127.0.0.1",
  309.               "Port": 7000,
  310.               "Client": "bluem2_client3.dat",
  311.               "UIConfigFile": "cui3.cfg",
  312.               "PatchServerAddr": "127.0.0.1:8203"
  313.             }
  314.           ]
  315.         }
  316.       ],
  317.       "Patch": [
  318.         {
  319.           "valid": false,
  320.           "launcher": true,
  321.           "relaunch": true,
  322.           "file": "logintool.exe",
  323.           "hash": "6658C3316069B621C595BCF426D50F03",
  324.           "link": "http://127.0.0.1/logintool/upgrade/BlueM2.exe"
  325.         },
  326.         {
  327.           "valid": false,
  328.           "file": "datalui.pkg",
  329.           "hash": "1EAD642FEE0C6FD80FBC303D4E449645",
  330.           "link": "http://127.0.0.1/logintool/upgrade/lui.pkg"
  331.         },
  332.         {
  333.           "valid": false,
  334.           "file": "bluem2_client.dat",
  335.           "hash": "34DA14BC2EB078500184F98D31A00D2A",
  336.           "link": "http://127.0.0.1/logintool/upgrade/bluem2_client.dat"
  337.         },
  338.         {
  339.           "valid": false,
  340.           "file": "bluem2_client2.dat",
  341.           "hash": "5C3007CCCC92663B606BEE6BDC960501",
  342.           "link": "http://127.0.0.1/logintool/upgrade/bluem2_client2.dat"
  343.         },
  344.         {
  345.           "valid": false,
  346.           "file": "bluem2_client3.dat",
  347.           "hash": "832F8BDAAEB172E41F8B3A65BCFA627C",
  348.           "link": "http://127.0.0.1/logintool/upgrade/bluem2_client3.dat"
  349.         },
  350.         {
  351.           "valid": false,
  352.           "file": "speedtest_x64.msi",
  353.           "hash": "B5AEE03A783665B9799E9C6A7B7D0D8C",
  354.           "link": "https://install.speedtest.net/app/windows/latest/speedtestbyookla_x64.msi"
  355.         },
  356.         {
  357.           "valid": true,
  358.           "file": ".\\images\\0.ico",
  359.           "hash": "CC7305FEB222B604DFF882FBFC755417",
  360.           "link": "http://127.0.0.1/logintool/upgrade/0.ico"
  361.         },
  362.         {
  363.           "valid": true,
  364.           "file": ".\\images\\1.ico",
  365.           "hash": "D3700F4244669024DD7A77520A6C4CA5",
  366.           "link": "http://127.0.0.1/logintool/upgrade/1.ico"
  367.         },
  368.         {
  369.           "valid": true,
  370.           "file": ".\\images\\2.ico",
  371.           "hash": "ACE1AE57C4EAEFA6DBFCAB6B11F2DC75",
  372.           "link": "http://127.0.0.1/logintool/upgrade/2.ico"
  373.         }
  374.       ]
  375.     }
  376.   ]
  377. }
复制代码
6.png

游客,如果您要查看本帖隐藏内容请回复

回复

使用道具 举报

发表于 2022-12-6 20:49 | 显示全部楼层
精品资源 你我共享 支九版本库传奇论坛!
回复 支持 反对

使用道具 举报

发表于 2023-1-31 22:05 | 显示全部楼层
精品资源 你我共享 支九版本库传奇论坛!
回复 支持 反对

使用道具 举报

发表于 2023-2-21 20:14 | 显示全部楼层
精品资源 你我共享 支九版本库传奇论坛!
回复 支持 反对

使用道具 举报

发表于 2023-2-28 09:39 | 显示全部楼层
RE: 【天心数据新BLUE引擎SQLite版数据库架设教程】第六讲 Json格式列表服务启动 [修改]
回复 支持 反对

使用道具 举报

发表于 2023-3-6 02:12 | 显示全部楼层
激动人心,无法言表!支持九版本库传奇论坛!
回复 支持 反对

使用道具 举报

发表于 2023-11-21 18:24 | 显示全部楼层
精品资源 你我共享 支九版本库传奇论坛!
回复 支持 反对

使用道具 举报

0关注

0粉丝

3300帖子

发布主题
一周下载排行最近7x24小时热帖
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|关于我们|手机版|小黑屋|gm版本库|gm基地|传奇一条龙|帮助中心|( 苏ICP备2021017278号-4 )|网站地图 

GMT+8, 2024-3-28 20:55 , Processed in 0.689912 second(s), 60 queries . 九版本库