ScheduleTraining.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System;
  2. using PlayerStatus;
  3. namespace Schedule
  4. {
  5. public class ScheduleTraining : ScheduleBase
  6. {
  7. public ScheduleTraining(ScheduleType workType, Slot slot, int workId) : base(workType, slot, workId)
  8. {
  9. this.simulateParams = ScheduleCalcAPI.SimulateMaidStatusResult(base.maid, base.id, ScheduleData.WorkSuccessLv.Success, false);
  10. this.simulateParams.study_rate /= 10;
  11. if (base.maid != null)
  12. {
  13. this.simulateParams.teach_rate += base.maid.status.teachRate / 1000;
  14. }
  15. this.simulateParams.teach_rate /= 10;
  16. this.simulateeMaidParams = new MaidParams(this);
  17. this.simulateeSalonMaidParams = new SalonParams(this);
  18. this.enabled = ScheduleAPI.EnableNoonWork(base.id, slot.maid);
  19. if (workType == ScheduleType.Training)
  20. {
  21. this.type = ScheduleCSVData.TrainingData[base.id].trainingType;
  22. ScheduleCSVData.TrainingType type = this.type;
  23. if (type == ScheduleCSVData.TrainingType.Trainer)
  24. {
  25. this.visible = false;
  26. }
  27. }
  28. this.visible &= this.enabled;
  29. if (this.legacyDisable)
  30. {
  31. this.visible = false;
  32. }
  33. }
  34. public int lv
  35. {
  36. get
  37. {
  38. return ScheduleAPI.NoonWorkPlayToLv(ScheduleAPI.NoonWorkPlayCount(base.maid, base.id));
  39. }
  40. }
  41. public float expRatio
  42. {
  43. get
  44. {
  45. return ScheduleAPI.NoonWorkPlayExpRatio(ScheduleAPI.NoonWorkPlayCount(base.maid, base.id));
  46. }
  47. }
  48. public int expRatioFrom0To10
  49. {
  50. get
  51. {
  52. return (int)Math.Floor((double)(this.expRatio * 10f));
  53. }
  54. }
  55. public int revision
  56. {
  57. get
  58. {
  59. return ScheduleAPI.NoonWorkLvToRevision(this.lv);
  60. }
  61. }
  62. public ScheduleCSVData.TrainingType type { get; private set; }
  63. public bool visible = true;
  64. public MaidParams simulateeMaidParams;
  65. public SalonParams simulateeSalonMaidParams;
  66. public ScheduleCalcAPI.ResultSimulateParam simulateParams;
  67. }
  68. }