Esempio n. 1
0
        public static void Initialize()
        {
            GetHostByNameHook.Install();
            ConnectHook.Install();
            SendHook.InstallSend();
            SendHook.InstallRecv();
            PortPatch.Apply();
            DisableEncryptionPatch.Apply();
            GameProtocolHook.Install2((msgid, msg) =>
            {
                Debugging.Debug.Log("msg: " + msgid.ToString());
            });

            GameProtocolHook.Install((gameProtocol, type) =>
            {
                Debugging.Debug.Log(gameProtocol.ToString() + ", " + type.ToString());
                if (type == 0)
                {
                    GameServer.Protocol = new Protocol.Protocol(gameProtocol);
                }
                else if (type == 3)
                {
                    AuthServer.Protocol = new Protocol.Protocol(gameProtocol);
                }
                else
                {
                    Debugging.Debug.Log("Unknown protocol type: " + gameProtocol.ToString() + ", " + type.ToString());
                }
            });

            _fileServer.Start();
            AuthServer.Start();
            GameServer.Start();
        }
Esempio n. 2
0
        public static void Initialize()
        {
            ConnectHook.Install();
            PortPatch.Apply();
            DisableEncryptionPatch.Apply();
            GetHostByNameHook.Install();

            GameProtocolHook.Install(gameProtocol =>
            {
                GameServer.Protocol = new Protocol.Protocol(gameProtocol);
                AuthServer.Protocol = GameServer.Protocol.Next;
            });

            _fileServer.Start();
            AuthServer.Start();
            GameServer.Start();
        }