Beispiel #1
0
        public CoCProxy()
        {
            ExceptionLog = new ExceptionLog("exceptions");
            PacketLog = new PacketLog("packets.log");
            PacketLog.AutoSave = true;
            PacketDumper = new PacketDumper();
            Clients = new List<CoCProxyClient>();
            PacketHandlers = new Dictionary<ushort, PacketHandler>();

            ProxyPacketHandlers.RegisterHandlers(this);
        }
Beispiel #2
0
        public CoCClient()
        {
            Fingerprint = new Fingerprint();
            Home = new Village();
            Avatar = new Avatar();
            Connection = new Socket(SocketType.Stream, ProtocolType.Tcp);
            DefaultPacketHandlers = new Dictionary<ushort, PacketHandler>();
            PacketHandlers = new Dictionary<ushort, PacketHandler>();
            KeepAliveManager = new KeepAliveManager(this);
            PacketLog = new PacketLog("packets.log")
            {
                AutoSave = true
            };
            PluginManager = new PluginManager(this);

            LoginPacketHandlers.RegisterLoginPacketHandlers(this);
            InGamePacketHandlers.RegisterInGamePacketHandler(this);
            PluginManager.LoadPlugins();
            PluginManager.EnablePlugins();
        }