Exemplo n.º 1
0
        private ConnAppProc CreateConnApp(eServerType server_type)
        {
            ConnAppProc app_server = null;

            switch (server_type)
            {
            case eServerType.WORLD:
                app_server = new WorldMsgProc();
                break;

            case eServerType.GATE:
                app_server = new GateMsgProc();
                break;

            case eServerType.FIGHT:
                app_server = new FightMsgProc();
                break;

            case eServerType.GLOBAL:
                app_server = new GlobalMsgProc();
                break;

            default:
                Log.Warning("错误的服务器类型:" + server_type);
                return(null);
            }
            app_server.Setup();
            return(app_server);
        }
        private ConnAppProc CreateConnApp(eServerType server_type)
        {
            ConnAppProc app_server = null;

            switch (server_type)
            {
            case eServerType.SERVER:
                app_server = new ServerMsgProc();
                break;

            case eServerType.FIGHT:
                app_server = new FightMsgProc();
                break;

            default:
                Log.Warning("错误的服务器类型:" + server_type);
                return(null);
            }
            app_server.Setup();
            return(app_server);
        }