Пример #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));
     }
 }
Пример #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));
        }
Пример #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);
            }
        }
Пример #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);
     }
 }