Beispiel #1
0
 def getDetailInfo(self):
     if not utility.is_same_day(self.dailyRoundTime, time.time()):
         self.dailyRoundTime = int(time.time())
         self.dailyRound = 0
     if not self.dismissRoomList:
         # 同意人数和秒数
         self.dismissRoomList = [4, 300]
     return {
         'club_id': self.clubId,
         'club_name': self.name,
         'club_notice': self.notice,
         'member_num': len(self.members),
         'online_num': self.getOnlineMemberNum(),
         'apply_hint': 1 if len(self.applicants) > 0 else 0,
         'r_switch': self.roomSwitch,
         'c_switch': self.cardSwitch,
         'p_switch': self.payModeSwitch,
         'l_switch': self.lockSwitch,
         'owner': dict(self.owner),
         'game_type': self.gameType,
         'room_params': json.dumps(self.roomParams),
         'dailyRound': self.dailyRound,
         'dismissRoomList': self.dismissRoomList,
         'table_info_list': self.table_mgr.getTableListInfo(False),
     }
Beispiel #2
0
	def addDailyRound(self, round = 1):
		if utility.is_same_day(self.dailyRoundTime, time.time()):
			self.dailyRound += round
		else:
			self.dailyRound = round
			self.dailyRoundTime = int(time.time())

		self.event_mgr.push_event(Events.EVENT_CLUB_DAILY_ROUND_CHANGE, self.dailyRound)
Beispiel #3
0
    def initBase(self):
        """ 初始化 """
        ttime = time.time()
        tlocaltime = time.localtime()
        if not utility.is_same_day(ttime, self.lastResetDayTime):
            self.refreshOnResetDay(ttime, tlocaltime)

        self.client and self.client.pushAvatarInfo(self.getAvatarInfo())
Beispiel #4
0
 def signIn(self):
     now = time.time()
     res = util.is_same_day(self.sign_in_ts, now)
     if not res:
         self.sign_in_days += 1
         self.sign_in_ts = now
         # if self.sign_in_days >= const.SIGN_IN_ACHIEVEMENT_DAY:
         # 	self.addCards(const.SIGN_IN_ACHIEVEMENT_NUM, reason="signIn")
         # 	self.sign_in_days = 0
         self.client and self.client.pushSignInNum(self.sign_in_days)
     else:
         self.client and self.client.signInFailed()
Beispiel #5
0
 def updateDailyData(self):
     """刷新每日亲友圈状态"""
     if not utility.is_same_day(self.dailyTime, time.time()):
         self.dailyTime = int(time.time())
         self.active_members = []
     return