public static void Call(Maid maid, ScheduleMgr.ScheduleTime scheduleTime, Dictionary <ScheduleTaskCtrl.TaskType, List <ScheduleTaskViewer.ViewData> > viewDic, Dictionary <ScheduleMgr.ScheduleTime, ScheduleCSVData.ScheduleBase> currentSetWorkDic, ScheduleTaskViewer __instance) { MyLog.LogMessage( "ScheduleTaskViewer.Call" , maid.status.fullNameEnStyle , scheduleTime ); foreach (var item in viewDic) { MyLog.LogMessage( "ScheduleTaskViewer.Call.viewDic" , item.Key ); foreach (var item2 in item.Value) { MyLog.LogMessage( "ScheduleTaskViewer.Call.viewDic" , item2.is_enabled , item2.schedule.id , item2.schedule.type , item2.schedule.name ); } } foreach (var item in currentSetWorkDic) { MyLog.LogMessage( "ScheduleTaskViewer.Call.currentSetWorkDic" , item.Key , item.Value.id , item.Value.type , item.Value.name ); } }
public static void SetWorkId(ScheduleTaskCtrl __instance , ScheduleMgr.ScheduleTime workTime , int taskId , ScheduleCtrl ___m_scheduleCtrl ) { if (workTime == ScheduleMgr.ScheduleTime.DayTime) { MyLog.LogMessage( "ScheduleTaskCtrl.SetWorkId" , workTime , taskId , ___m_scheduleCtrl.SelectedMaid.status.noonWorkId ); } else if (workTime == ScheduleMgr.ScheduleTime.Night) { MyLog.LogMessage( "ScheduleTaskCtrl.SetWorkId" , workTime , taskId , ___m_scheduleCtrl.SelectedMaid.status.nightWorkId ); } }
public static void SetWorkId(ScheduleMgr.ScheduleTime workTime, int taskId, int slotId) { if (ScheduleCSVData.AllData.ContainsKey(taskId)) { ScheduleCSVData.ScheduleBase scheduleBase = ScheduleCSVData.AllData[taskId]; //int slotId = 0; //for (int i = 0; i < 40; i++) //{ // Maid scheduleSlot = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(i); // if (scheduleSlot != null && scheduleSlot == this.m_scheduleCtrl.SelectedMaid) // { // slotId = i; // } //} ScheduleTaskCtrl.TaskType type = scheduleBase.type; if (type != ScheduleTaskCtrl.TaskType.Training && type != ScheduleTaskCtrl.TaskType.Work) { if (type == ScheduleTaskCtrl.TaskType.Yotogi) { ScheduleMgrPatch.m_scheduleApi.SetNightWorkSlot_Safe(workTime, slotId, taskId); } } else { ScheduleMgrPatch.m_scheduleApi.SetNoonWorkSlot_Safe(workTime, slotId, taskId); } } if (!DailyMgr.IsLegacy) { GameMain.Instance.FacilityMgr.UpdateFacilityAssignedMaidData(); } ScheduleAPI.MaidWorkIdErrorCheck(true); }
internal static void SetYotogiAllMaid(ScheduleMgr.ScheduleTime scheduleTime) { if (ScheduleMgrPatch.m_scheduleApi == null) { MyLog.LogMessage("SetSlotAllDel" , "스케줄 관리 접속 한번 필요" ); return; } if (DailyMgrPatch.IsLegacy && scheduleTime == ScheduleMgr.ScheduleTime.DayTime) { MyLog.LogMessage("SetSlotAllDel" , "DayTime & Legacy 에선 사용 불가" ); return; } ScheduleData[] scheduleDatas = GameMain.Instance.CharacterMgr.status.scheduleSlot; // Maid maid; // 사용 가능한 메이드 슬롯 목록 List <int> slots = new(); SetSlots(scheduleDatas, slots); SetYotogi(scheduleTime, slots); }
private static void WorkIdReset(MaidStatus.Status maidStatus, ScheduleMgr.ScheduleTime time) { if (time == ScheduleMgr.ScheduleTime.DayTime) { maidStatus.noonWorkId = 0; } else if (time == ScheduleMgr.ScheduleTime.Night) { maidStatus.nightWorkId = 0; } }
public static void SetScheduleAllMaid(ScheduleMgr.ScheduleTime scheduleTime, bool isYotogi = true, bool isTraining = true, bool isSetFacility = true) { if (ScheduleMgrPatch.m_scheduleApi == null) { MyLog.LogMessage("SetYotogiAllMaid" , "스케줄 관리 접속 한번 필요" ); return; } // 사용 가능한 메이드 슬롯 목록 List <int> slots = new(); List <int> slotsn = new(); ScheduleData[] scheduleDatas = GameMain.Instance.CharacterMgr.status.scheduleSlot; SetSlots(scheduleDatas, slots); int c1 = 40, c2 = 40, c3, c4; if (isYotogi && isTraining && isSetFacility) { c3 = UnityEngine.Random.Range(0, 40); c4 = UnityEngine.Random.Range(0, 40); if (c3 < c4) { c1 = c3; c2 -= c4; } else { c1 -= c3; c2 = c4; } } if (isYotogi) { SetSchedule(scheduleTime, ScheduleType.Yotogi, slots, slotsn, c1); } if (isTraining) { SetSchedule(scheduleTime, ScheduleType.Training, slots, slotsn, c2); } if (isSetFacility) { SetWorkFacility(scheduleTime, slots, slotsn); } SetFinal(); }
// public void SetNightWorkSlot_Safe(ScheduleMgr.ScheduleTime workTime, int slotId, int workId) public static void SetNightWorkSlot_Safe( ScheduleScene __instance , ScheduleMgr.ScheduleTime workTime, int slotId, int workId) { if (configEntryUtill["SetNightWorkSlot_Safe", false]) { MyLog.LogMessage( "SetNightWorkSlot_Safe" , workTime , slotId , workId ); } }
// public void SetCommuSlot_Safe(ScheduleMgr.ScheduleTime workTime, int slotId, bool value) public static void SetCommuSlot_Safe( ScheduleScene __instance , ScheduleMgr.ScheduleTime workTime, int slotId, bool value ) { if (configEntryUtill["SetCommuSlot_Safe", false]) { MyLog.LogMessage( "SetCommuSlot_Safe" , workTime , slotId , value ); } }
/// <summary> /// 분석용 /// </summary> /// <param name="maid"></param> /// <param name="taskId"></param> /// <param name="time"></param> /// <returns>true 일경우 사용 불가</returns> public static bool CheckYotogi(Maid maid, int taskId, ScheduleMgr.ScheduleTime time) { bool flag = false; if (ScheduleCSVData.YotogiData.ContainsKey(taskId)) { ScheduleCSVData.Yotogi yotogi = ScheduleCSVData.YotogiData[taskId]; if (!flag && (yotogi.yotogiType == ScheduleCSVData.YotogiType.Vip || yotogi.yotogiType == ScheduleCSVData.YotogiType.VipCall)) { if (maid != null) { if (!ScheduleAPI.VisibleNightWork(taskId, maid, true)) { flag = true; } } else if (!ScheduleAPI.VisibleNightWork(taskId, null, true)) { flag = true; } } if (!flag && (yotogi.yotogiType == ScheduleCSVData.YotogiType.Vip || yotogi.yotogiType == ScheduleCSVData.YotogiType.VipCall)) { for (int i = 0; i < 40; i++) { Maid scheduleSlot = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(i); if (scheduleSlot != null && scheduleSlot != maid && (taskId == scheduleSlot.status.noonWorkId || taskId == scheduleSlot.status.nightWorkId)) { flag = true; break; } } } if (!flag && (yotogi.yotogiType == ScheduleCSVData.YotogiType.Vip || yotogi.yotogiType == ScheduleCSVData.YotogiType.VipCall || yotogi.yotogiType == ScheduleCSVData.YotogiType.Entertain || yotogi.yotogiType == ScheduleCSVData.YotogiType.Travel) && !ScheduleAPI.EnableNightWork(taskId, maid, true, true)) { flag = true; } if (flag) { WorkIdReset(maid.status, time); } } else { WorkIdReset(maid.status, time); } return(flag); }
public static void FacilitySlotActive( string maidGuid, Facility facility, ScheduleMgr.ScheduleTime time) { if (configEntryUtill["FacilitySlotActive", false]) { MyLog.LogMessage("ScheduleAPI.FacilitySlotActive" , maidGuid , facility.facilityName , time ); } Maid maid = IsSlotInMaid(maidGuid); if (maid == null) { return; } int key = 0; if (time == ScheduleMgr.ScheduleTime.DayTime) { key = maid.status.noonWorkId; } if (time == ScheduleMgr.ScheduleTime.Night) { key = maid.status.nightWorkId; } if (configEntryUtill["FacilitySlotActive", false]) { MyLog.LogMessage("ScheduleAPI.FacilitySlotActive1" , MyUtill.GetMaidFullName(maid) , key ); } if (ScheduleCSVData.AllData.ContainsKey(key)) { ScheduleCSVData.ScheduleBase scheduleBase = ScheduleCSVData.AllData[key]; if (scheduleBase.type == ScheduleTaskCtrl.TaskType.Work) { ScheduleCSVData.Work work = (ScheduleCSVData.Work)scheduleBase; if (configEntryUtill["FacilitySlotActive", false]) { MyLog.LogMessage("ScheduleAPI.FacilitySlotActive2" , work.facilityId , work.facility.ID , work.facility.name ); } if (configEntryUtill["FacilitySlotActive", false]) { MyLog.LogMessage("ScheduleAPI.FacilitySlotActive3" , ScheduleCSVData.faclilityPowerUpWorkId , facility.defaultData.ID , facility.defaultData.name ); } if (work.facility == facility.defaultData && work.facilityId != ScheduleCSVData.faclilityPowerUpWorkId) { return; } } else if (scheduleBase.type == ScheduleTaskCtrl.TaskType.Training) { ScheduleCSVData.Training training = (ScheduleCSVData.Training)scheduleBase; if (training.facilityId == facility.defaultData.ID) { return; } } } //SetRandomCommu(isDaytime); }
public void Call(Maid maid, ScheduleMgr.ScheduleTime scheduleTime, Dictionary <ScheduleTaskCtrl.TaskType, List <ScheduleTaskViewer.ViewData> > viewDic, Dictionary <ScheduleMgr.ScheduleTime, ScheduleCSVData.ScheduleBase> currentSetWorkDic) { if (this.category_button_dic_ == null) { this.Awake(); } ScheduleTaskViewer.scheduleTime = scheduleTime; HashSet <int> hashSet = new HashSet <int>(); int maxValue = int.MaxValue; UIWFTabButton uiwftabButton = null; UIWFTabButton uiwftabButton2 = null; foreach (KeyValuePair <ScheduleTaskCtrl.TaskType, List <ScheduleTaskViewer.ViewData> > keyValuePair in viewDic) { this.CallEnableButton(maid, keyValuePair.Key, keyValuePair.Value, ref hashSet, ref maxValue); } this.currentWorkDic = currentSetWorkDic; int num = maxValue; ScheduleCSVData.ScheduleBase work_data = null; foreach (KeyValuePair <int, UIButton> keyValuePair2 in this.category_button_dic_) { keyValuePair2.Value.onClick.Clear(); bool flag = hashSet.Contains(keyValuePair2.Key); keyValuePair2.Value.transform.parent.gameObject.SetActive(flag); if (flag) { EventDelegate.Add(keyValuePair2.Value.onClick, new EventDelegate.Callback(this.OnClickFromMainCategoryButton)); if (uiwftabButton2 == null && num == keyValuePair2.Key) { uiwftabButton2 = keyValuePair2.Value.gameObject.GetComponent <UIWFTabButton>(); } ScheduleCSVData.ScheduleBase scheduleBase = currentSetWorkDic[scheduleTime]; if (uiwftabButton == null && scheduleBase != null && scheduleBase.categoryID == keyValuePair2.Key) { work_data = scheduleBase; uiwftabButton = keyValuePair2.Value.gameObject.GetComponent <UIWFTabButton>(); } } } if (uiwftabButton == null) { uiwftabButton = uiwftabButton2; } Utility.ResetNGUI(this.CategoryGrid); Utility.ResetNGUI(this.CategoryScrollView); UIWFTabPanel componentInChildren = this.CategoryGrid.GetComponentInChildren <UIWFTabPanel>(); componentInChildren.ResetSelect(); componentInChildren.UpdateChildren(); if (uiwftabButton != null) { componentInChildren.Select(uiwftabButton); } if (this.descDic == null) { DescScheduleYotogi component = UTY.GetChildObject(base.gameObject, "DescScheduleYotogi", false).GetComponent <DescScheduleYotogi>(); component.Init(this.taskCtrl); DescScheduleTraining component2 = UTY.GetChildObject(base.gameObject, "DescScheduleTraining", false).GetComponent <DescScheduleTraining>(); component2.Init(this.taskCtrl); DescScheduleWork component3 = UTY.GetChildObject(base.gameObject, "DescScheduleWork", false).GetComponent <DescScheduleWork>(); component3.Init(this.taskCtrl); this.descDic = new Dictionary <ScheduleTaskCtrl.TaskType, DescScheduleBase>(); this.descDic.Add(ScheduleTaskCtrl.TaskType.Yotogi, component); this.descDic.Add(ScheduleTaskCtrl.TaskType.Training, component2); this.descDic.Add(ScheduleTaskCtrl.TaskType.Work, component3); } this.UpdateForDescriptionViewer(work_data); }
/// <summary> /// 원인불명 오류 발생 /// public static ScheduleCalcAPI.ResultSimulateParam SimulateIncomeResult(Maid maid, int workId, Facility facility, ScheduleMgr.ScheduleTime time, ScheduleData.WorkSuccessLv successLv = ScheduleData.WorkSuccessLv.Success, bool commu = false) /// </summary> // [HarmonyPrefix, HarmonyPatch(typeof(ScheduleCalcAPI), "SimulateIncomeResult", new Type[] { typeof(Maid), typeof(int) , typeof(Facility) , typeof(ScheduleMgr.ScheduleTime) , typeof(ScheduleData.WorkSuccessLv) , typeof(bool) })] public static void SimulateIncomeResult(Maid maid, int workId, Facility facility, ScheduleMgr.ScheduleTime time, ScheduleData.WorkSuccessLv successLv = ScheduleData.WorkSuccessLv.Success, bool commu = false) { MyLog.LogMessage( "ScheduleCalcAPI.SimulateIncomeResult" , MyUtill.GetMaidFullName(maid) , workId //, facility.defaultName , time , successLv , commu ); successLv = ScheduleData.WorkSuccessLv.Perfect; }
public static void SetFacilityAllMaid(ScheduleMgr.ScheduleTime scheduleTime) { if (ScheduleMgrPatch.m_scheduleApi == null) { MyLog.LogMessage("SetSlotAllDel" , "스케줄 관리 접속 한번 필요" ); return; } if (configEntryUtill["SetFacilityAllMaid", false]) { MyLog.LogMessage( "SetFacilityAllMaid1" ); } //List<KeyValuePair<int, ScheduleCSVData.Work>> works = ScheduleCSVData.WorkData.ToList(); // 스케줄의 슬롯 정보 // public Maid GetScheduleSlot(int slotNo) // if (string.IsNullOrEmpty(this.scheduleSlot[slotNo].maid_guid)) ScheduleData[] scheduleDatas = GameMain.Instance.CharacterMgr.status.scheduleSlot; Maid maid; // 사용 가능한 메이드 슬롯 목록 List <int> slots = new(); for (int i = 0; i < scheduleDatas.Length; i++) { if (scheduleDatas[i].maid_guid == string.Empty) { continue; } slots.Add(i); } //var facilitys = GameMain.Instance.FacilityMgr.GetFacilityArray().Where(x=>x).ToList(); var facilitys = GameMain.Instance.FacilityMgr.GetFacilityArray().ToList(); if (configEntryUtill["SetFacilityAllMaid"]) { MyLog.LogMessage( "SetFacilityAllMaid3" , scheduleDatas.Length , slots.Count , facilitys.Count ); } // 구현부 Facility facility; FacilityDataTable.FacilityDefaultData defaultData; ScheduleCSVData.Work workData; while (facilitys.Count > 2) { int n2 = UnityEngine.Random.Range(2, facilitys.Count); if (facilitys[n2] == null) { if (configEntryUtill["SetFacilityAllMaid"]) { MyLog.LogMessage( "SetFacilityAllMaid null" , n2 ); } } else { facility = facilitys[n2]; defaultData = facility.defaultData; workData = defaultData.workData; if (facility.minMaidCount <= slots.Count && workData.id != 0) { for (int k = 0; k < facility.minMaidCount; k++) { int n1 = UnityEngine.Random.Range(0, slots.Count); try { maid = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(slots[n1]); if (configEntryUtill["SetFacilityAllMaid"]) { MyLog.LogMessage( "SetFacilityAllMaid4" , n2 , n1 , MyUtill.GetMaidFullName(maid) , facility.defaultName ); } //if (ScheduleMgrPatch.m_scheduleApi != null) ScheduleMgrPatch.m_scheduleApi.SetNoonWorkSlot_Safe(scheduleTime, slots[n1], workData.id); facility.AllocationMaid(maid, scheduleTime); } catch (Exception e) { MyLog.LogWarning( "SetFacilityAllMaid4" , n2 , e.ToString() ); } slots.Remove(slots[n1]); } if (slots.Count == 0) { if (!DailyMgrPatch.IsLegacy) { GameMain.Instance.FacilityMgr.UpdateFacilityAssignedMaidData(); } ScheduleAPI.MaidWorkIdErrorCheck(true); return; } } } facilitys.RemoveAt(n2); } facility = facilitys[1]; defaultData = facility.defaultData; workData = defaultData.workData; while (slots.Count > 0) { int n1 = 0; maid = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(slots[n1]); //if (ScheduleMgrPatch.m_scheduleApi != null) ScheduleMgrPatch.m_scheduleApi.SetNoonWorkSlot_Safe(scheduleTime, slots[n1], workData.id); facility.AllocationMaid(maid, scheduleTime); slots.RemoveAt(n1); } if (!DailyMgrPatch.IsLegacy) { GameMain.Instance.FacilityMgr.UpdateFacilityAssignedMaidData(); } ScheduleAPI.MaidWorkIdErrorCheck(true); }
/* * private void CallEnableButton(Maid maid, ScheduleTaskCtrl.TaskType type, List<ScheduleTaskViewer.ViewData> viewList, ref HashSet<int> enabled_category, ref int min_category_id) * { * this.tmpData[type].views = new List<ScheduleTaskViewer.ViewData>(viewList); * for (int i = 0; i < this.tmpData[type].views.Count; i++) * { * if (!enabled_category.Contains(this.tmpData[type].views[i].schedule.categoryID)) * { * ScheduleCSVData.ScheduleBase schedule = this.tmpData[type].views[i].schedule; * int categoryID = schedule.categoryID; * if (DailyMgr.IsLegacy || schedule.mode != ScheduleCSVData.ScheduleBase.Mode.CM3D2) * { * if (!DailyMgr.IsLegacy || schedule.mode != ScheduleCSVData.ScheduleBase.Mode.COM3D) * { * if (DailyMgr.IsLegacy) * { * if (ScheduleTaskViewer.scheduleTime == ScheduleMgr.ScheduleTime.DayTime) * { * if (categoryID != 51) * { * goto IL_135; * } * } * else if (ScheduleTaskViewer.scheduleTime == ScheduleMgr.ScheduleTime.Night && (categoryID == 51 || categoryID == 52)) * { * goto IL_135; * } * } * if (maid.status.heroineType != HeroineType.Sub || (categoryID != 51 && categoryID != 100)) * { * enabled_category.Add(categoryID); * min_category_id = System.Math.Min(min_category_id, categoryID); * } * } * } * } * IL_135:; * } * } * */ /// 밤시중 스킬 선택 private static void SetYotogi(ScheduleMgr.ScheduleTime scheduleTime, List <int> slots) { Maid maid; int ic = UnityEngine.Random.Range(0, 5); //밤시중용 처리 for (int i = 0; i < ic; i++) { int n1 = UnityEngine.Random.Range(0, slots.Count); maid = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(slots[n1]); if (maid.status.heroineType == MaidStatus.HeroineType.Sub) { continue; } //ScheduleMgrPatch.m_scheduleApi.SetNightWorkSlot_Safe(scheduleTime, slots[n1], 10000); SetWorkId(scheduleTime, 10000, slots[n1]); slots.Remove(slots[n1]); if (slots.Count <= 4 || slots.Count == 0) { break; } } ic = UnityEngine.Random.Range(0, 40); // // 메이드별 밤시중용 처리 for (int j = 0; j < ic; j++) { int sn = UnityEngine.Random.Range(0, slots.Count); ; SetWorkId(scheduleTime, slots[sn], LoadYotogiData(slots[sn])); /* * for (int i = 0; i < 10; i++) * { * * int dn = UnityEngine.Random.Range(0, ScheduleCSVData.YotogiData.Count); * if (ScheduleCSVData.YotogiData.ElementAt(dn).Value.mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2) * { * * continue; * } * * int id = ScheduleCSVData.YotogiData.ElementAt(dn).Key; * * int sn = UnityEngine.Random.Range(0, slots.Count); * maid = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(slots[sn]); * if (maid.status.heroineType == MaidStatus.HeroineType.Sub) * break; * * if(!PersonalEventBlocker.IsEnabledScheduleTask(maid.status.personal, id)) * { * break; * } * * if (!ScheduleUtill.CheckYotogi(maid, id, scheduleTime)) * { * ScheduleMgrPatch.m_scheduleApi.SetNightWorkSlot_Safe(scheduleTime, slots[sn], id); * slots.Remove(slots[sn]); * break; * } * } */ if (slots.Count == 0) { break; } } }
public static void SetWorkFacility(ScheduleMgr.ScheduleTime scheduleTime, List <int> slots, List <int> slotsn) { slots.AddRange(slotsn); slotsn.Clear(); if (slots.Count == 0) { return; } Facility facility; FacilityDataTable.FacilityDefaultData defaultData; ScheduleCSVData.Work workData; Maid maid; int fn; int sn; var facilitys = GameMain.Instance.FacilityMgr.GetFacilityArray().ToList(); while (facilitys.Count > 1) { fn = UnityEngine.Random.Range(1, facilitys.Count); if (facilitys[fn] == null) { facilitys.RemoveAt(fn); if (configEntryUtill["SetWorkFacility"]) { MyLog.LogMessage( "facilitys null" , fn ); } continue; } facility = facilitys[fn]; defaultData = facility.defaultData; workData = defaultData.workData; if (facility.minMaidCount <= slots.Count && workData.id != 0) { for (int k = 0; k < facility.minMaidCount; k++) { sn = UnityEngine.Random.Range(0, slots.Count); maid = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(slots[sn]); SetWorkId(scheduleTime, workData.id, slots[sn]); facility.AllocationMaid(maid, scheduleTime); slots.Remove(slots[sn]); } if (slots.Count == 0) { return; } } facilitys.RemoveAt(fn); } }
/// <summary> /// /// </summary> /// <param name="scheduleTime"></param> /// <param name="scheduleType">not use Work</param> /// <param name="slots"></param> /// <param name="slotsn"></param> /// <param name="cnt"></param> public static void SetSchedule(ScheduleMgr.ScheduleTime scheduleTime, ScheduleType scheduleType, List <int> slots, List <int> slotsn, int cnt = 40) { if (scheduleType == ScheduleType.Work || cnt == 0) { return; } slots.AddRange(slotsn); slotsn.Clear(); if (slots.Count == 0) { return; } Maid maid; List <ScheduleBase> list = new List <ScheduleBase>(); List <ScheduleBase> scheduleData; int sc; int wc; for (int i = 0; i < cnt; i++) { sc = UnityEngine.Random.Range(0, slots.Count); maid = GameMain.Instance.CharacterMgr.status.GetScheduleSlot(slots[sc]); if (maid.status.heroineType == HeroineType.Sub) { slotsn.Add(slots[sc]); slots.Remove(slots[sc]); continue; } scheduleData = ScheduleMgrPatch.m_scheduleApi.slot[slots[sc]].scheduleData.Where( x => x.workType == scheduleType && x.enabled ).ToList(); list.Clear(); foreach (ScheduleBase scheduleBase in scheduleData) { if (DailyMgr.IsLegacy && ScheduleCSVData.WorkLegacyDisableId.Contains(scheduleBase.id)) { continue; } if (!PersonalEventBlocker.IsEnabledScheduleTask(maid.status.personal, scheduleBase.id)) { continue; } list.Add(scheduleBase); } if (list.Count > 0) { wc = UnityEngine.Random.Range(0, list.Count); SetWorkId(scheduleTime, list[wc].id, slots[sc]); } slots.Remove(slots[sc]); if (slots.Count == 0) { break; } } }