コード例 #1
0
        public TXDGatewayCfgData XDGatewayServerRunParamConver(string[] runParams, out string moniteorIP, out int moniteorPort)
        {
            TXDGatewayCfgData cfgData = new TXDGatewayCfgData();

            cfgData.gameID       = Convert.ToInt32(runParams[1]);
            cfgData.index        = Convert.ToInt32(runParams[2]);
            cfgData.machineName  = runParams[3];
            cfgData.insideIPAddr = runParams[4];
            cfgData.insidePort   = Convert.ToInt32(runParams[5]);
            cfgData.outsidePort  = Convert.ToInt32(runParams[6]);
            moniteorIP           = HTBaseFunc.DepartStr(runParams[7], ",", 0);
            moniteorPort         = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[7], ",", 1));
            return(cfgData);
        }
コード例 #2
0
        public TWorldBossServerCfgData WorldBossServerRunParamConver(string[] runParams, out string moniteorSvrAddr, out int moniteorSvrPort)
        {
            moniteorSvrAddr = "";
            moniteorSvrPort = 0;
            TWorldBossServerCfgData cfgData = new TWorldBossServerCfgData();

            cfgData.gameID             = Convert.ToInt32(runParams[1]);
            cfgData.serverID           = Convert.ToInt32(runParams[2]);
            cfgData.lanIPAddr          = runParams[3];
            cfgData.inPort             = Convert.ToInt32(runParams[4]);
            cfgData.centerServer       = new TStrKeyValue();
            cfgData.centerServer.key   = HTBaseFunc.DepartStr(runParams[5], ",", 0);
            cfgData.centerServer.value = HTBaseFunc.DepartStr(runParams[5], ",", 1);
            moniteorSvrAddr            = HTBaseFunc.DepartStr(runParams[6], ",", 0);
            moniteorSvrPort            = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[6], ",", 1));

            return(cfgData);
        }
コード例 #3
0
        public TPortalServerCfgData PortalServerRunParamConvert(string[] runParams, out string moniteorSvrAddr, out int moniteorSvrPort)
        {
            moniteorSvrAddr = "";
            moniteorSvrPort = 0;
            TPortalServerCfgData cfgData = new TPortalServerCfgData();

            cfgData.gameID                      = Convert.ToInt32(runParams[1]);
            cfgData.index                       = Convert.ToInt32(runParams[2]);
            cfgData.wanIPAddr                   = runParams[3];
            cfgData.outPort                     = Convert.ToInt32(runParams[4]);
            cfgData.inPort                      = Convert.ToInt32(runParams[5]);
            cfgData.platformDockingServer       = new TIDStrKeyValue();
            cfgData.platformDockingServer.Key   = HTBaseFunc.DepartStr(runParams[6], ",", 0);
            cfgData.platformDockingServer.Value = HTBaseFunc.DepartStr(runParams[6], ",", 1);
            cfgData.pushNotice                  = runParams[7];

            moniteorSvrAddr = HTBaseFunc.DepartStr(runParams[8], ",", 0);
            moniteorSvrPort = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[8], ",", 1));

            return(cfgData);
        }
コード例 #4
0
        public TGateWayCfgData GateWayServerRunParamConvert(string[] runParams, out string protalSvrAddr, out int protalSvrPort)
        {
            protalSvrAddr = "";
            protalSvrPort = 0;
            TGateWayCfgData cfgData = new TGateWayCfgData();

            cfgData.gameID    = Convert.ToInt32(runParams[1]);
            cfgData.serverID  = Convert.ToInt32(runParams[2]);
            cfgData.index     = Convert.ToInt32(runParams[3]);
            cfgData.wanIPAddr = runParams[4];
            cfgData.outShortConnectionPort = Convert.ToInt32(runParams[5]);
            cfgData.outLongConnectionPort  = Convert.ToInt32(runParams[6]);
            cfgData.inPort             = Convert.ToInt32(runParams[7]);
            cfgData.centerServer       = new TStrKeyValue();
            cfgData.centerServer.key   = HTBaseFunc.DepartStr(runParams[8], ",", 0);
            cfgData.centerServer.value = HTBaseFunc.DepartStr(runParams[8], ",", 1);
            protalSvrAddr = HTBaseFunc.DepartStr(runParams[9], ",", 0);
            protalSvrPort = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[9], ",", 1));

            return(cfgData);
        }
コード例 #5
0
        public TRankServerCfgData RankServerRunParamConvert(string[] runParams, out string protalSvrAddr, out int protalSvrPort)
        {
            protalSvrAddr = "";
            protalSvrPort = 0;
            TRankServerCfgData cfgData = new TRankServerCfgData();

            cfgData.gameID             = Convert.ToInt32(runParams[1]);
            cfgData.serverID           = Convert.ToInt32(runParams[2]);
            cfgData.lanIPAddr          = runParams[3];
            cfgData.inPort             = Convert.ToInt32(runParams[4]);
            cfgData.centerServer       = new TStrKeyValue();
            cfgData.centerServer.key   = HTBaseFunc.DepartStr(runParams[5], ",", 0);
            cfgData.centerServer.value = HTBaseFunc.DepartStr(runParams[5], ",", 1);

            cfgData.dbCfgList = new TDBCfgList();
            int    index  = 0;
            string curStr = HTBaseFunc.DepartStr(runParams[6], ";", index);

            while (curStr != "")
            {
                TDBCfg dbCfg = new TDBCfg();
                dbCfg.dbType         = Convert.ToInt32(HTBaseFunc.DepartStr(curStr, ",", 0));
                dbCfg.lanIPAddr      = HTBaseFunc.DepartStr(curStr, ",", 1);
                dbCfg.dbName         = HTBaseFunc.DepartStr(curStr, ",", 2);
                dbCfg.loginName      = HTBaseFunc.DepartStr(curStr, ",", 3);
                dbCfg.passworld      = HTBaseFunc.DepartStr(curStr, ",", 4);
                dbCfg.port           = Convert.ToInt32(HTBaseFunc.DepartStr(curStr, ",", 5));
                dbCfg.childConnCount = Convert.ToInt32(HTBaseFunc.DepartStr(curStr, ",", 6));

                cfgData.dbCfgList.Add(dbCfg);

                ++index;
                curStr = HTBaseFunc.DepartStr(runParams[6], ";", index);
            }

            protalSvrAddr = HTBaseFunc.DepartStr(runParams[7], ",", 0);
            protalSvrPort = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[7], ",", 1));

            return(cfgData);
        }
コード例 #6
0
        public TCenterServerCfgData CenterServerRunParamConvert(string[] runParams, out string moniteorSvrAddr, out int moniteorSvrPort)
        {
            moniteorSvrAddr = "";
            moniteorSvrPort = 0;

            TCenterServerCfgData cfgData = new TCenterServerCfgData();

            cfgData.serverGroupName = runParams[1];
            cfgData.gameID          = Convert.ToInt32(runParams[2]);
            cfgData.serverID        = Convert.ToInt32(runParams[3]);
            cfgData.lanIPAddr       = runParams[4];
            cfgData.inPort          = Convert.ToInt32(runParams[5]);

            TIDStrKeyValue idIPPort = new TIDStrKeyValue();

            idIPPort.Key   = HTBaseFunc.DepartStr(runParams[6], ",", 0);
            idIPPort.Value = HTBaseFunc.DepartStr(runParams[6], ",", 1);

            if (idIPPort.Value == "")
            {
                idIPPort.Value = "0";
            }
            cfgData.crossRealmServer = idIPPort;

            cfgData.protalServerList = new TIDStrKeyValueList();
            int    index  = 0;
            string curStr = HTBaseFunc.DepartStr(runParams[7], ";", index);

            while (curStr != "")
            {
                idIPPort       = new TIDStrKeyValue();
                idIPPort.Key   = HTBaseFunc.DepartStr(curStr, ",", 0);
                idIPPort.Value = HTBaseFunc.DepartStr(curStr, ",", 1);
                if (idIPPort.Value == "")
                {
                    idIPPort.Value = "0";
                }
                cfgData.protalServerList.Add(idIPPort);

                ++index;
                curStr = HTBaseFunc.DepartStr(runParams[7], ";", index);
            }

            idIPPort       = new TIDStrKeyValue();
            idIPPort.Key   = HTBaseFunc.DepartStr(runParams[8], ",", 0);
            idIPPort.Value = HTBaseFunc.DepartStr(runParams[8], ",", 1);
            if (idIPPort.Value == "")
            {
                idIPPort.Value = "0";
            }
            cfgData.gmServer = idIPPort;

            idIPPort       = new TIDStrKeyValue();
            idIPPort.Key   = HTBaseFunc.DepartStr(runParams[9], ",", 0);
            idIPPort.Value = HTBaseFunc.DepartStr(runParams[9], ",", 1);
            if (idIPPort.Value == "")
            {
                idIPPort.Value = "0";
            }
            cfgData.platformDockingServer = idIPPort;

            moniteorSvrAddr = HTBaseFunc.DepartStr(runParams[10], ",", 0);
            moniteorSvrPort = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[10], ",", 1));

            return(cfgData);
        }