using System; using PlayerStatus; namespace Schedule { public class ScheduleTraining : ScheduleBase { public ScheduleTraining(ScheduleType workType, Slot slot, int workId) : base(workType, slot, workId) { this.simulateParams = ScheduleCalcAPI.SimulateMaidStatusResult(base.maid, base.id, ScheduleData.WorkSuccessLv.Success, false); this.simulateParams.study_rate /= 10; if (base.maid != null) { this.simulateParams.teach_rate += base.maid.status.teachRate / 1000; } this.simulateParams.teach_rate /= 10; this.simulateeMaidParams = new MaidParams(this); this.simulateeSalonMaidParams = new SalonParams(this); this.enabled = ScheduleAPI.EnableNoonWork(base.id, slot.maid); if (workType == ScheduleType.Training) { this.type = ScheduleCSVData.TrainingData[base.id].trainingType; ScheduleCSVData.TrainingType type = this.type; if (type == ScheduleCSVData.TrainingType.Trainer) { this.visible = false; } } this.visible &= this.enabled; if (this.legacyDisable) { this.visible = false; } } public int lv { get { return ScheduleAPI.NoonWorkPlayToLv(ScheduleAPI.NoonWorkPlayCount(base.maid, base.id)); } } public float expRatio { get { return ScheduleAPI.NoonWorkPlayExpRatio(ScheduleAPI.NoonWorkPlayCount(base.maid, base.id)); } } public int expRatioFrom0To10 { get { return (int)Math.Floor((double)(this.expRatio * 10f)); } } public int revision { get { return ScheduleAPI.NoonWorkLvToRevision(this.lv); } } public ScheduleCSVData.TrainingType type { get; private set; } public bool visible = true; public MaidParams simulateeMaidParams; public SalonParams simulateeSalonMaidParams; public ScheduleCalcAPI.ResultSimulateParam simulateParams; } }