using System; using Schedule; public class TrainingTaskUnit : TaskUnit { public ScheduleCSVData.Training training { get; private set; } public void SetData(ScheduleTaskViewer viewer, ScheduleTaskViewer.ViewData viewData) { base.SetData(ScheduleTaskCtrl.TaskType.Training, viewer, viewData); this.training = (ScheduleCSVData.Training)viewData.schedule; ScheduleTaskCtrl.TrainingTaskButton trainingTaskButton = (ScheduleTaskCtrl.TrainingTaskButton)viewData.taskButton; base.SetTaskRank(base.gameObject, trainingTaskButton.rank); base.SetExpRatio(base.gameObject, trainingTaskButton.expRatio); } public static void AddFacility(Maid maid, ScheduleCSVData.Training training, ScheduleMgr.ScheduleTime time) { if (DailyMgr.IsLegacy) { return; } if (training.trainingType != ScheduleCSVData.TrainingType.Basic) { return; } Facility[] facilityArray = GameMain.Instance.FacilityMgr.GetFacilityArray(); foreach (Facility facility in facilityArray) { if (facility.defaultData.ID == training.facilityId) { facility.AllocationMaid(maid, time); return; } } } }