Esempio n. 1
0
        public LobbyMainWin()
        {
            InitializeComponent();

            server           = new SocketWrapper();
            server.OnAccept += new SocketWrapper.dlgAccept(server_OnAccept);
            server.OnClose  += new SocketWrapper.dlgClose(server_OnClose);
            server.OnRead   += new SocketWrapper.dlgRead(PacketProcessor);

            Logger l = new Logger(tLog);

            //listClients.ItemsSource = clients;

            MapDB.Load("Data\\MapList.bin");
            DigimonDB.Load("Data\\DigimonList.bin");

            Opt = Settings.Deserialize();

            Console.WriteLine("This server is configured to route players to the game server at {0}:{1}",
                              Opt.GameServer.Host, Opt.GameServer.Port);
            if (Opt.LobbyServer.AutoStart)
            {
                server.Listen(new ServerInfo(Opt.LobbyServer.Port, Opt.LobbyServer.IP));
                sbInfo1.Content = "Starting Lobby Server...";
            }
        }
Esempio n. 2
0
        public Yggdrasil()
        {
            Opt = Settings.Deserialize();

            server           = new SocketWrapper();
            server.OnAccept += new SocketWrapper.dlgAccept(server_OnAccept);
            server.OnClose  += new SocketWrapper.dlgClose(server_OnClose);
            server.OnRead   += new SocketWrapper.dlgRead(server_OnRead);

            //TODO: Load mob/map/item/etc databases
            EvolutionDB.Load("Data\\DigimonEvolve.bin");
            MapDB.Load("Data\\MapList.bin");
            PortalDB.Load("Data\\MapPortal.bin");
            DigimonDB.Load("Data\\DigimonList.bin");
            ItemDB.Load("Data\\ItemList.bin");
            MonsterDB.Load("Data\\MonsterList.bin");
            TacticsDB.Load("Data\\Tactics.bin");

            World();

            Initialize();
        }