Info_UserGuild.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace loyalsoft;
  3. //
  4. ///*
  5. // * To change this license header, choose License Headers in Project Properties.
  6. // * To change this template file, choose Tools | Templates
  7. // * and open the template in the editor.
  8. // */
  9. //
  10. ///**
  11. // * Description of UserGuildModel
  12. // *
  13. // * @author cyzhao
  14. // */
  15. //class UserGuildModel {
  16. //
  17. // //put your code here
  18. // public static function Clear() {
  19. // $userGuildinfo = new UserGuildModel();
  20. // $userGuildinfo->ts = now();
  21. // $userGuildinfo->joints = now(); //玩家公会的创建时间
  22. // $userGuildinfo->guildId = 0;
  23. // //s$userGuildinfo->guildName;
  24. // $userGuildinfo->cupScore = 0;
  25. // $userGuildinfo->appliedguildlist = array();
  26. // $userGuildinfo->appliedguildRecord = ObjectInit();
  27. // $userGuildinfo->contribute = 0; //贡献度
  28. //// $userGuildinfo->level;
  29. //// $userGuildinfo->name;
  30. // //$userGuildinfo->fightPower;
  31. // $userGuildinfo->requestCardTs = 0;
  32. // $userGuildinfo->donateCount = ObjectInit();
  33. // $userGuildinfo->allDonateCount = 0;
  34. // //$userGuildinfo->position = 0; //职位
  35. //
  36. // return $userGuildinfo;
  37. // }
  38. //
  39. // /**
  40. // * 检查玩家每日需要清理的状态
  41. // * @param UserGuildModel $userGuildInfo
  42. // */
  43. // static function checkFirstlog($userGuildInfo) {
  44. // #每天清理
  45. // if (TimeUtil::tsDay() > TimeUtil::tsDay($userGuildInfo->ts)) {
  46. // $userGuildInfo->allDonateCount = 0;
  47. // }
  48. // #清理过期捐献信息
  49. // $donateCount = $userGuildInfo->donateCount;
  50. // foreach ($donateCount as $key => $value) {
  51. // if (now() - $value->ts >= glc()->Guild_DonateCoolingTime) {//捐献冷却时间到了
  52. // unset($donateCount->$key);
  53. // }
  54. // }
  55. // }
  56. //
  57. // /**
  58. // * 初始化个人公会信息
  59. // * @param type $userGuildInfo
  60. // * @param type $uid
  61. // * @param type $baseInfo
  62. // * @param type $mem
  63. // * @param type $guildId
  64. // * @param type $zoneid
  65. // */
  66. // static function userGuildInfoInit($userGuildInfo, $uid, $baseInfo, $mem, $zoneid) {
  67. // #self::Clear();
  68. // $userGuildInfo->ts = now();
  69. //// if ($guildId != 0) {
  70. //// $guildInfo = GuildProc::getMemGuildInfo($mem, $guildId, $zoneid);
  71. //// $userGuildInfo->guildName = $guildInfo->name;
  72. //// }
  73. //// $key_cur = MemKey_GameRun::Game_PVPScoreByZone_zset($zoneid); # 总积分榜
  74. //// $score = $mem->zscore($key_cur, $uid);
  75. //// $cupScore = $score == null ? 0 : $score;
  76. //// $userGuildInfo->cupScore = $cupScore;
  77. // $userGuildInfo->name = $baseInfo->name;
  78. // $userGuildInfo->level = $baseInfo->level;
  79. // //$userGuildInfo->fightPower = GuildProc::initFightTeamInfo($mem, $uid, $zoneid); #$game->heroTeamConfig;
  80. // $userGuildInfo->uid = $uid;
  81. // $userGuildInfo->headImg = $baseInfo->headImg;
  82. // $userGuildInfo->imgBorderId = $baseInfo->imgBorderId;
  83. // }
  84. //
  85. //}