public void ToBytes(BinaryWriter writer) { writer.Write((ushort)Type); FreshHours.ToBytes(writer); TransitionHours.ToBytes(writer); TransitionedStack.ToBytes(writer); writer.Write(TransitionRatio); }
/// <summary> /// The save data writer. /// </summary> /// <param name="writer">The writer to write blocks to.</param> public virtual void ToBytes(BinaryWriter writer) { writer.Write((short)Type); writer.Write(Code.ToShortString()); Quantity.ToBytes(writer); ResolvedItemstack.ToBytes(writer); writer.Write(LastDrop); writer.Write(DropModbyStat != null); if (DropModbyStat != null) { writer.Write(DropModbyStat); } }