Exemplo n.º 1
0
            private static void ServerInstance_IncomingPacketEvent(int clientID, byte[] data)
            {
                int clientIndex = GetClient(clientID);

                IncomingPacketParser.ProcessPacket(clientIndex, data);
                LowLevel.OnIncomingPacket(clientIndex, data);
            }
Exemplo n.º 2
0
            private static void ServerInstance_OutgoingPacketEvent(int clientID, byte[] data)
            {
                int           clientIndex = GetClient(clientID);
                PacketHandler handler     = OutgoingPacketHandlers.GetHandler(data[0]);

                if (handler != null)
                {
                    handler.OnReceive(clientIndex, new PacketReader(data, data.Length, handler.Length != 0));
                }
                LowLevel.OnOutgoingPacket(clientIndex, data);
            }
Exemplo n.º 3
0
            private static void ServerInstance_KeyUpEvent(int clientID, System.Windows.Forms.Keys key)
            {
                int        clientIndex = GetClient(clientID);
                ClientInfo ci;

                if (ClientInfoCollection.GetClient(clientIndex, out ci))
                {
                    ci.HotKeyList.KeyUp(key);
                }
                LowLevel.OnKeyUp(clientIndex, key);
            }
Exemplo n.º 4
0
            private static void ServerInstance_MouseMoveEvent(int clientID, int x, int y)
            {
                int        clientIndex = GetClient(clientID);
                ClientInfo ci;

                if (ClientInfoCollection.GetClient(clientIndex, out ci))
                {
                    ci.OnMouseMove(x, y);
                }
                LowLevel.OnMouseMove(clientIndex, x, y);
            }
Exemplo n.º 5
0
            private static void ServerInstance_KeyDownEvent(int clientID, System.Windows.Forms.Keys key)
            {
                int        x           = (int)key;
                string     s           = key.ToString();
                int        clientIndex = GetClient(clientID);
                ClientInfo ci;

                if (ClientInfoCollection.GetClient(clientIndex, out ci))
                {
                    ci.HotKeyList.KeyDown(key);
                    ci.OnKeyDown(key);
                }
                LowLevel.OnKeyDown(clientIndex, key);
            }
Exemplo n.º 6
0
            private static void ServerInstance_MouseUpEvent(int clientID, int x, int y, System.Windows.Forms.MouseButtons button)
            {
                int clientIndex = GetClient(clientID);

                LowLevel.OnMouseUp(clientIndex, x, y, button);
            }
Exemplo n.º 7
0
            private static void ServerInstance_MouseWheelEvent(int clientID, int x, int y, sbyte delta)
            {
                int clientIndex = GetClient(clientID);

                LowLevel.OnMouseWheel(clientIndex, x, y, delta);
            }