示例#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);
     }
 }