Info_Gates.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. }
  59. public function __construct($arg = null) {
  60. if ($arg == null) {
  61. if ($this->CurrentGateId == 0) {
  62. $startId = 1;
  63. $this->CurrentGateId = $startId;
  64. $this->UnlockedGatesMaxId = $startId;
  65. $this->GateList = new \stdClass();
  66. $Ins_GateInfo = new Ins_GateInfo();
  67. $Ins_GateInfo->GateId = $this->CurrentGateId;
  68. $this->GateList->$startId = $Ins_GateInfo;
  69. }
  70. $this->GatesChallengeRecord = new \stdClass();
  71. $this->evolveUnlockRecord = array();
  72. $this->xunluo_StartTs = now();
  73. } else {
  74. parent::__construct($arg);
  75. }
  76. }
  77. }