Data_UserGuild.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * 玩家公会数据
  5. */
  6. class Data_UserGuild extends HashSaver {
  7. /**
  8. * @var int 时间戳, 用于清理每日申请记录
  9. */
  10. public $ts;
  11. /**
  12. * @var int 时间戳, 玩家加入/创建公会的时间
  13. */
  14. public $joints;
  15. /**
  16. * @var int 所属公会id
  17. */
  18. public $guildId = 0;
  19. /**
  20. * @var array 已经申请的公会列表
  21. */
  22. public $appliedguildlist = array();
  23. /**
  24. * @var dic<int,int> 申请过的公会记录
  25. */
  26. public $appliedguildRecord;
  27. //
  28. /**
  29. * @var string 公会名称
  30. */
  31. public $guildName = "";
  32. /**
  33. * 角色类型
  34. * @var type
  35. */
  36. public $position = "";
  37. /**
  38. * @var int 创建公会冷却时间
  39. */
  40. public $create_coding = 0;
  41. /**
  42. * 清理
  43. * @return Data_UserGuild
  44. */
  45. public function Clear() {
  46. $this->ts = now();
  47. $this->joints = now(); // 玩家公会的创建时间
  48. $this->guildId = 0;
  49. $this->appliedguildlist = array();
  50. $this->appliedguildRecord = ObjectInit();
  51. $this->position = ""; //职位
  52. return $this;
  53. }
  54. /**
  55. * 初始化个人公会信息
  56. */
  57. public function __construct($args = null) {
  58. if (isset($args)) {
  59. parent::__construct($args);
  60. } else {
  61. $this->ts = now();
  62. $this->joints = now(); // 玩家公会的创建时间
  63. $this->guildId = 0;
  64. $this->appliedguildlist = array();
  65. $this->appliedguildRecord = ObjectInit();
  66. }
  67. }
  68. }