Info_PrivateState.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * Description of Info_PrivateState
  5. * 私有状态标志字
  6. */
  7. class Info_PrivateState extends Object_ext {
  8. // ------------字段声明-------------
  9. /**
  10. * @var int 武器/言灵的uid,递增
  11. */
  12. public $currentId = 0;
  13. /**
  14. *
  15. * @var int 物品的背包格子的上限 目前和李宁协商的结果是:抽奖可以超上限,物品合成可以超上限,任务奖励可以超上限,只有战斗时候会有限制超过上限,如果继续战斗的话,战斗的奖励品将不会获取.
  16. */
  17. public $maxItemNum = 100;
  18. /**
  19. *
  20. * @var int 物品背包格子的数量.
  21. */
  22. public $ItemNum = 0;
  23. /**
  24. * 上次获取体力的时间戳
  25. * @var int
  26. */
  27. public $TiliTime;
  28. /**
  29. * 登录天数
  30. * @var array[12345,12347,...]
  31. */
  32. public $LoginDays = array();
  33. /**
  34. * @var array[1,2,3,4,5,6,7] 7日签到领取数据
  35. */
  36. public $day7_drawed = array();
  37. /**
  38. * @var array 兑换码使用记录
  39. */
  40. public $usedTokens = array();
  41. /**
  42. * @var int 在线礼包累计时长
  43. */
  44. public $onlineGiftts = 0;
  45. /**
  46. * @var List<int> 当前在线礼包ID(每天清空)
  47. */
  48. public $onlineGiftIDs;
  49. /**
  50. * @var array 全服注册礼包领取记录
  51. */
  52. public $drawedRegGift = array();
  53. /**
  54. * @var boolean 首付礼包是否领取
  55. */
  56. public $firstPayGift = false;
  57. /**
  58. * @var array 每日领取的体力奖励记录
  59. */
  60. public $dailyDrawedTiliGift = array();
  61. /**
  62. * 排行榜, 战力突破奖领取记录
  63. * @var array
  64. */
  65. public $RankFpowerRewardRec = array();
  66. /**
  67. * 排行榜, 通关记录突破奖励领取记录
  68. * @var type
  69. */
  70. public $RankPassGateRewardRec = array();
  71. /**
  72. * @var int 上次检查被挑战记录的时间戳
  73. */
  74. public $lastCheckDefLog_ts = 0;
  75. /**
  76. * 角标通知缓存
  77. * @var array[int]
  78. */
  79. public $cornerSignNotifications = array();
  80. /**
  81. * 已解锁建筑
  82. * @var array[int]
  83. */
  84. public $unlockedBuild = array();
  85. /**
  86. * 已经解锁得npc
  87. * @var type
  88. */
  89. public $unlockNpc = array();
  90. // <editor-fold defaultstate="collapsed" desc=" 初始化 ">
  91. /**
  92. * 玩家注册时初始化, 用于给各个字段赋默认初始值
  93. */
  94. public function initialize() {
  95. $this->maxItemNum = GameConfig::primordial_data()->User_Private_MaxItem_num; # Ps.默认100;
  96. $this->TiliTime = now();
  97. }
  98. /**
  99. * 添加已经解锁得npc
  100. * @param type $npcId
  101. */
  102. public function addUnlockNpc($npcId) {
  103. if(!in_array($npcId,$this->unlockNpc)){
  104. $this->unlockNpc[] = $npcId;
  105. }
  106. }
  107. // </editor-fold>
  108. }