ResultYotogiTask.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using System;
  2. using BackupParamAccessor;
  3. using PlayerStatus;
  4. namespace Schedule
  5. {
  6. public class ResultYotogiTask : ResultBaseTask
  7. {
  8. public ResultYotogiTask(WorkResultSlot slot, int workId, ResultWorkMgr.ResultType resultType)
  9. {
  10. base.Init(slot, workId, resultType);
  11. this.CalcParam();
  12. this.UpdateIcon();
  13. }
  14. protected void CalcParam()
  15. {
  16. if (base.slot.textureBank != null)
  17. {
  18. this._icon = base.slot.textureBank.GetTexture(ScheduleCSVData.AllData[base.id].icon);
  19. }
  20. if (base.maid != null && base.maid.status.selectedYotogiClass != null && base.maid.status.selectedYotogiClass.level == base.maid.status.selectedYotogiClass.expSystem.GetMaxLevel())
  21. {
  22. this.yotogiLvMax = true;
  23. if (this.uppedParams.yotogiClassLv > 0)
  24. {
  25. this.yotogiLvCompletion = true;
  26. }
  27. }
  28. }
  29. protected override void CalcParam(SCENE_ID baseId)
  30. {
  31. Params backupParams = BackupParamAccessor.GetBackupParams(base.slot.slotId, baseId - 1);
  32. Params backupParams2 = BackupParamAccessor.GetBackupParams(base.slot.slotId, baseId + 1);
  33. this.uppedParams = backupParams2 - backupParams;
  34. }
  35. protected void UpdateIcon()
  36. {
  37. this.successLv_icon = null;
  38. if (base.maid != null && base.slot.textureBank != null)
  39. {
  40. switch (this.successLv)
  41. {
  42. case ScheduleData.WorkSuccessLv.Miss:
  43. case ScheduleData.WorkSuccessLv.Unexecuted:
  44. this.successLvName = "CM3D2_work_result_mark_sippai";
  45. break;
  46. case ScheduleData.WorkSuccessLv.Success:
  47. this.successLvName = "CM3D2_work_result_mark_seikou";
  48. break;
  49. case ScheduleData.WorkSuccessLv.Perfect:
  50. this.successLvName = "CM3D2_work_result_mark_daiseikou";
  51. break;
  52. }
  53. if ((ScheduleCSVData.YotogiData[base.id].yotogiType == ScheduleCSVData.YotogiType.HaveSex || ScheduleCSVData.YotogiData[base.id].yotogiType == ScheduleCSVData.YotogiType.NewSex) && this.uppedParams.yotogi_play_count == 0)
  54. {
  55. this.successLvName = "CM3D2_work_result_mark_sippai";
  56. this.successLv = ScheduleData.WorkSuccessLv.Miss;
  57. this.commonSuccessLv = this.successLv;
  58. }
  59. if (Product.isPublic && ScheduleCSVData.YotogiData[base.id].yotogiType == ScheduleCSVData.YotogiType.HaveSex)
  60. {
  61. this.successLvName = "CM3D2_work_result_mark_seikou";
  62. this.commonSuccessLv = (this.successLv = ScheduleData.WorkSuccessLv.Success);
  63. }
  64. this.successLv_icon = base.slot.textureBank.GetTexture(this.successLvName);
  65. this.commonSuccessLv = this.successLv;
  66. }
  67. }
  68. public ScheduleData.WorkSuccessLv successLv = ScheduleData.WorkSuccessLv.Success;
  69. public bool yotogiLvCompletion;
  70. public bool yotogiLvMax;
  71. }
  72. }