using WowPacketParser.Misc; //reading packed Vector3 coordinates from packet file byte[] packetData = File.ReadAllBytes("examplePacket.dat"); using (var packet = new Packet(packetData)) { Vector3 packedCoordinates = packet.ReadPackedVector3(); Console.WriteLine("Packed Coordinates: {0},{1},{2}", packedCoordinates.X, packedCoordinates.Y, packedCoordinates.Z); }
using WowPacketParser.Misc; //sending packed Vector3 data across the network Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); s.Connect("localhost", 1234); //create network packet and pack Vector3 data byte[] packetData; using (var packet = new Packet()) { Vector3 packedCoordinates = new Vector3(1.23f, 4.56f, 7.89f); packet.WritePackedVector3(packedCoordinates); //packing Vector3 coordinates packetData = packet.ToArray(); } //send packed data over network s.Send(packetData); s.Close();In this example, the WritePackedVector3() method is used to pack Vector3 coordinates and write them to a network packet which is then sent across the network. Therefore, based on the examples and method mentioned, it can be determined that the package library used is C# WoWPacketParser.Misc.