123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using System;
- using System.IO;
- namespace PlayerStatus
- {
- public class ScheduleSlotBackup
- {
- public ScheduleSlotBackup()
- {
- this.slotDataArray = new ScheduleSlotBackup.Data[40];
- for (int i = 0; i < 40; i++)
- {
- this.slotDataArray[i] = new ScheduleSlotBackup.Data();
- }
- }
- public static int BackUpMax
- {
- get
- {
- return 2;
- }
- }
- public void Serialize(BinaryWriter binary)
- {
- foreach (ScheduleSlotBackup.Data data in this.slotDataArray)
- {
- data.Serialize(binary);
- }
- }
- public void Deserialize(BinaryReader binary, int version, int slotCnt)
- {
- for (int i = 0; i < slotCnt; i++)
- {
- this.slotDataArray[i].Deserialize(binary, version);
- }
- }
- public ScheduleSlotBackup.Data[] slotDataArray;
- public enum Type
- {
- CM3D2,
- COM3D,
- Max
- }
- public class Data
- {
- public void Serialize(BinaryWriter binary)
- {
- binary.Write(this.maid_guid);
- binary.Write(this.noonWorkId);
- binary.Write(this.nightWorkId);
- binary.Write(this.noonCommu);
- binary.Write(this.nightCommu);
- }
- public void Deserialize(BinaryReader binary, int version)
- {
- this.maid_guid = binary.ReadString();
- this.noonWorkId = binary.ReadInt32();
- this.nightWorkId = binary.ReadInt32();
- this.noonCommu = binary.ReadBoolean();
- this.nightCommu = binary.ReadBoolean();
- }
- public string maid_guid = string.Empty;
- public int noonWorkId;
- public int nightWorkId;
- public bool noonCommu;
- public bool nightCommu;
- }
- }
- }
|