internal static void SetYotogiAll() { MyLog.LogDarkBlue("SetAllYotogi START" ); foreach (var item in ScheduleCSVData.YotogiData) { ScheduleCSVData.Yotogi yotogi = item.Value; MyLog.LogMessage("SetScenarioAll.YotogiData", item.Key, yotogi.yotogiType); if (yotogi.condManVisibleFlag1.Count > 0) { for (int j = 0; j < yotogi.condManVisibleFlag1.Count; j++) { if (GameMain.Instance.CharacterMgr.status.GetFlag(yotogi.condManVisibleFlag1[j]) == 0) { MyLog.LogMessage("SetScenarioAll.yotogi." + yotogi.condManVisibleFlag1[j]); GameMain.Instance.CharacterMgr.status.SetFlag(yotogi.condManVisibleFlag1[j], 1); } } } } MyLog.LogDarkBlue("SetAllYotogi END" ); }
/// <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); }
//#if DEBUG /// <summary> /// 분석용 /// </summary> /// <param name="workId"></param> /// <param name="maid"></param> /// <param name="checkFinish"></param> /// <returns></returns> public static bool VisibleNightWork(int workId, Maid maid, bool checkFinish) { ScheduleCSVData.Yotogi yotogi = ScheduleCSVData.YotogiData[workId]; switch (yotogi.yotogiType) { case ScheduleCSVData.YotogiType.Vip: case ScheduleCSVData.YotogiType.VipCall: { NightWorkState nightWorksState = GameMain.Instance.CharacterMgr.status.GetNightWorksState(workId); //if (nightWorksState == null) { //return false; } //nightWorksState.finish = true; //if (checkFinish && nightWorksState.finish) { //if (DailyMgr.IsLegacy) { //return false; } //if (GameMain.Instance.CharacterMgr.status.clubGrade < 5) { //return false; } //ScheduleCSVData.vipFullOpenDay = 0; //if (GameMain.Instance.CharacterMgr.status.days < ScheduleCSVData.vipFullOpenDay) { //return false; } } break; } case ScheduleCSVData.YotogiType.Travel: //return false; break; case ScheduleCSVData.YotogiType.EasyYotogi: { //if (yotogi.easyYotogi == null) { //return false; } //int trophyId = yotogi.easyYotogi.trophyId; //if (!GameMain.Instance.CharacterMgr.status.IsHaveTrophy(trophyId)) { //return false; } break; } } if (yotogi.condPackage.Count > 0) { for (int i = 0; i < ScheduleCSVData.YotogiData[workId].condPackage.Count; i++) { if (!PluginData.IsEnabled(ScheduleCSVData.YotogiData[workId].condPackage[i])) { return(false); } } } if (yotogi.condManVisibleFlag1.Count > 0) { for (int j = 0; j < yotogi.condManVisibleFlag1.Count; j++) { if (GameMain.Instance.CharacterMgr.status.GetFlag(yotogi.condManVisibleFlag1[j]) < 1) { return(false); } } } if (maid != null) { if (ScheduleCSVData.YotogiData[workId].condMainChara && !maid.status.mainChara) { return(false); } if (yotogi.condPersonal.Count > 0) { bool flag = false; for (int k = 0; k < yotogi.condPersonal.Count; k++) { if (maid.status.personal.id == yotogi.condPersonal[k]) { flag = true; break; } } if (!flag) { return(false); } } if (yotogi.subMaidUnipueName != string.Empty) { if (maid.status.heroineType != HeroineType.Sub) { return(false); } if (yotogi.subMaidUnipueName != maid.status.subCharaData.uniqueName) { return(false); } } else if (maid.status.heroineType == HeroineType.Sub) { return(false); } } return(true); }