ResultYotogiTask.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 && 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. this.successLv_icon = base.slot.textureBank.GetTexture(this.successLvName);
  60. this.commonSuccessLv = this.successLv;
  61. }
  62. }
  63. public ScheduleData.WorkSuccessLv successLv = ScheduleData.WorkSuccessLv.Success;
  64. public bool yotogiLvCompletion;
  65. public bool yotogiLvMax;
  66. }
  67. }