public WaypointInteract(uint uid, WaypointDestination destination) : base(Build(uid, destination)) { this.uid = uid; this.destination = destination; }
public static byte[] Build(uint uid, WaypointDestination destination) { byte[] buffer = new byte[9]; buffer[0] = 0x49; buffer[1] = (byte) uid; buffer[2] = (byte) (uid >> 8); buffer[3] = (byte) (uid >> 0x10); buffer[4] = (byte) (uid >> 0x18); buffer[5] = (byte) destination; return buffer; }
// Methods public WaypointInteract(byte[] data) : base(data) { this.uid = BitConverter.ToUInt32(data, 1); this.destination = (WaypointDestination) data[5]; }