Info_Gates.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace loyalsoft;
  8. /**
  9. * Description of Info_Gates
  10. *
  11. * @author c'y'zhao
  12. */
  13. class Info_Gates extends Object_ext {
  14. /**
  15. * 当前剧情选择的关卡
  16. */
  17. public $CurrentGateId = 0;
  18. /**
  19. * 已解锁剧情关卡的最大id
  20. * @var type
  21. */
  22. public $UnlockedGatesMaxId = 0;
  23. /**
  24. * 章节列表
  25. * @var Ins_GateInfo
  26. */
  27. public $GateList = null;
  28. /**
  29. * 挑战功能领取记录
  30. * @var type
  31. */
  32. public $GatesChallengeRecord = null;
  33. /**
  34. * 进化解锁记录
  35. * @var type
  36. */
  37. #[ArrayType]
  38. public $evolveUnlockRecord = array();
  39. /**
  40. * 巡逻领取奖励的时间
  41. * @var int
  42. */
  43. public $xunluo_StartTs = 0;
  44. /**
  45. * 快速巡逻的购买记录
  46. * @var int
  47. */
  48. public $xunluo_quick_buyRecord = 0;
  49. public function initialize() {
  50. $startId = 1;
  51. $this->CurrentGateId = $startId;
  52. $this->UnlockedGatesMaxId = $startId;
  53. $this->GateList = new \stdClass();
  54. $Ins_GateInfo = new Ins_GateInfo();
  55. $Ins_GateInfo->GateId = $this->CurrentGateId;
  56. $this->GateList->$startId = $Ins_GateInfo;
  57. $this->GatesChallengeRecord = new \stdClass();
  58. $this->xunluo_StartTs = now();
  59. }
  60. public function __construct($arg = null) {
  61. if ($arg == null) {
  62. if ($this->CurrentGateId == 0) {
  63. $startId = 1;
  64. $this->CurrentGateId = $startId;
  65. $this->UnlockedGatesMaxId = $startId;
  66. $this->GateList = new \stdClass();
  67. $Ins_GateInfo = new Ins_GateInfo();
  68. $Ins_GateInfo->GateId = $this->CurrentGateId;
  69. $this->GateList->$startId = $Ins_GateInfo;
  70. }
  71. $this->GatesChallengeRecord = new \stdClass();
  72. $this->evolveUnlockRecord = array();
  73. $this->xunluo_StartTs = now();
  74. } else {
  75. parent::__construct($arg);
  76. }
  77. }
  78. }