using System;
using System.Collections.Generic;
using System.IO;

namespace PlayerStatus
{
	public class ScheduleData
	{
		public void Serialize(BinaryWriter binary)
		{
			binary.Write(this.maid_guid);
			binary.Write((int)this.noon_success_level);
			binary.Write((int)this.night_success_level);
			binary.Write(this.noon_communication);
			binary.Write(this.night_communication);
			int count = this.backup_status_dic.Count;
			binary.Write(count);
			foreach (KeyValuePair<string, int> keyValuePair in this.backup_status_dic)
			{
				binary.Write(keyValuePair.Key);
				binary.Write(keyValuePair.Value);
			}
		}

		public void Deserialize(BinaryReader binary, int version)
		{
			this.maid_guid = binary.ReadString();
			this.noon_success_level = (ScheduleData.WorkSuccessLv)binary.ReadInt32();
			this.night_success_level = (ScheduleData.WorkSuccessLv)binary.ReadInt32();
			this.noon_communication = binary.ReadBoolean();
			if (200 < version)
			{
				this.night_communication = binary.ReadBoolean();
			}
			int num = binary.ReadInt32();
			this.backup_status_dic.Clear();
			for (int i = 0; i < num; i++)
			{
				string key = binary.ReadString();
				this.backup_status_dic.Add(key, binary.ReadInt32());
			}
		}

		public string maid_guid = string.Empty;

		public ScheduleData.WorkSuccessLv noon_success_level;

		public ScheduleData.WorkSuccessLv night_success_level;

		public bool communication;

		public bool noon_communication;

		public bool night_communication;

		public Dictionary<string, int> backup_status_dic = new Dictionary<string, int>();

		public enum WorkSuccessLv
		{
			Miss,
			Success,
			Perfect,
			Unexecuted
		}
	}
}
