Ejemplo n.º 1
0
 public PortalPacketHandler Register(byte id, ushort length, PortalContext context, PortalReceive onReceive)
 {
     lock (((ICollection)Handlers).SyncRoot)
     {
         return(Handlers[id] = new PortalPacketHandler(id, length, context, onReceive));
     }
 }
Ejemplo n.º 2
0
        public PortalPacketHandler Register(ushort id, PortalContext context, PortalReceive onReceive)
        {
            if (Handlers.ContainsKey(id))
            {
                ToConsole("Warning: Replacing Packet Handler for {0}", id);
            }

            return(Handlers[id] = new PortalPacketHandler(id, context, onReceive));
        }
Ejemplo n.º 3
0
        public PortalPacketHandler Register(ushort id, PortalContext context, PortalReceive onReceive)
        {
            lock (((ICollection)Handlers).SyncRoot)
            {
                if (Handlers.ContainsKey(id))
                {
                    ToConsole("Warning: Replacing Packet Handler for {0}", id);
                }

                return Handlers[id] = new PortalPacketHandler(id, context, onReceive);
            }
        }
Ejemplo n.º 4
0
 public PortalPacketHandler Register(byte id, ushort length, PortalContext context, PortalReceive onReceive)
 {
     lock (((ICollection)Handlers).SyncRoot)
     {
         return Handlers[id] = new PortalPacketHandler(id, length, context, onReceive);
     }
 }