NightWorkState.cs 618 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.IO;
  3. namespace PlayerStatus
  4. {
  5. public class NightWorkState
  6. {
  7. public void Serialize(BinaryWriter binary)
  8. {
  9. if (this.calledMaidGUID == null)
  10. {
  11. this.calledMaidGUID = string.Empty;
  12. }
  13. binary.Write(this.workId);
  14. binary.Write(this.calledMaidGUID);
  15. binary.Write(this.finish);
  16. }
  17. public void Deserialize(BinaryReader binary, int version)
  18. {
  19. this.workId = binary.ReadInt32();
  20. this.calledMaidGUID = binary.ReadString();
  21. this.finish = binary.ReadBoolean();
  22. }
  23. public int workId;
  24. public string calledMaidGUID = string.Empty;
  25. public bool finish;
  26. }
  27. }