Example #1
0
        public static void ProcessGameSpawn(Client client, PacketReader pPacket)
        {
            var uid = pPacket.ReadUInt64();
            var xpos = pPacket.ReadSingle();
            var ypos = pPacket.ReadSingle();
            var zpos = pPacket.ReadSingle();
            var xdir = pPacket.ReadSingle();
            var ydir = pPacket.ReadSingle();
            var zdir = pPacket.ReadSingle();

            PacketWriter packet = new PacketWriter(Operation.GameResponseSpawn, CryptFlags.Encrypt);
            packet.Write(client.mClientUID);
            packet.Write((UInt16)xpos);
            packet.Write((UInt16)ypos);
            packet.Write((UInt16)zpos);
            packet.Write((UInt16)xdir);
            packet.Write(new byte[] { 0xfc, 0xc7 }, 0, 2);
            packet.Write((UInt16)ydir);

            foreach (Client c in client.mStage.Clients)
                c.Send(packet);
        }