public override void OnWriteProperties(PacketWriter stream) { base.OnWriteProperties(stream); stream.Write((byte)this.ItemType); stream.Write(this.name); stream.Write(this.visualChange); stream.Write((byte)this.Material); if (Range != 0) { stream.Write(true); stream.Write((ushort)Range); } else { stream.Write(false); } if (Damage != 0) { stream.Write(true); stream.Write((ushort)Damage); } else { stream.Write(false); } if (stream.Write(Protection != 0)) { stream.Write((ushort)Protection); } if (stream.Write(!InvOffset.IsExactNull())) { stream.Write(InvOffset); } if (stream.Write(!InvRotation.IsExactNull())) { stream.WriteCompressedAngles(InvRotation); } }