def doUserBind_3_3(self, userId, gameId, clientId, isFirstuserInfo): # 检查是否禁止登录 if self.checkForceLogout(userId): return loc = '' isReconnect = False if isFirstuserInfo: loc = onlinedata.checkUserLoc(userId, clientId, 0) self.recoverUserTableChips(userId, clientId) isReconnect = self._isReconnect(userId, gameId, clientId, loc) # # 更新基本信息 # halluser.updateUserBaseInfo(userId, clientId, runcmd.getMsgPack()) # 登录游戏处理 isdayfirst, _ = halluser.loginGame(userId, gameId, clientId) # 发送udata响应消息 self.helper.sendUserInfoResponse(userId, gameId, clientId, loc, 1, 0) # 发送gdata响应消息 self.helper.sendUserInfoResponse(userId, gameId, clientId, loc, 0, 1) # 发送响应消息 if not isReconnect: self.helper.sendTodoTaskResponse(userId, gameId, clientId, isdayfirst) # 标记游戏时长开始 gamedata.incrPlayTime(userId, 0, gameId) # BI日志统计 bireport.userBindUser(gameId, userId, clientId) bireport.reportGameEvent('BIND_USER', userId, gameId, 0, 0, 0, 0, 0, 0, [], clientId) evt = OnLineGameChangedEvent(userId, gameId, 1, clientId) TGHall.getEventBus().publishEvent(evt)
def doGameEnter(self, userId, gameId, clientId): isdayfirst, iscreate = halluser.loginGame(userId, gameId, clientId) self.helper.sendUserInfoResponse(userId, gameId, clientId, '', 0, 1) self.helper.sendTodoTaskResponse(userId, gameId, clientId, isdayfirst) # BI日志统计 bireport.userGameEnter(gameId, userId, clientId) bireport.reportGameEvent('BIND_GAME', userId, gameId, 0, 0, 0, 0, 0, 0, [], clientId, iscreate) evt = OnLineGameChangedEvent(userId, gameId, 1, clientId) TGHall.getEventBus().publishEvent(evt)
def doUserBind_0(self, userId, gameId, clientId, isFirstuserInfo, clipboardContent): if ftlog.is_debug(): ftlog.debug('AccountTcpHandler.doUserBind_0', 'userId=', userId, 'clipboard=', clipboardContent) # 检查是否禁止登录 if self.checkForceLogout(userId) : return self.updateBiggestHallVersion(userId, gameId, clientId) loc = '' if isFirstuserInfo : loc = onlinedata.checkUserLoc(userId, clientId, 0) self.recoverUserTableChips(userId, clientId) # # 更新基本信息 #halluser.updateUserBaseInfo(userId, clientId, runcmd.getMsgPack()) clipboard = Clipboard.parse(clipboardContent) # 登录游戏处理 isdayfirst, isCreate = halluser.loginGame(userId, gameId, clientId, clipboard) # 发送udata和gdata响应消息 self.helper.sendUserInfoResponse(userId, gameId, clientId, loc, 1, 1) # 发送TodoTask消息 self.helper.sendTodoTaskResponse(userId, gameId, clientId, isdayfirst) # 分析clipboardConent内容,根据分析结果 功能 TGHall.getEventBus().publishEvent(EventAfterUserLogin(userId, gameId, isdayfirst, isCreate, clientId, loc, clipboard)) # 标记游戏时长开始 gamedata.incrPlayTime(userId, 0, gameId) # BI日志统计 bireport.userBindUser(gameId, userId, clientId) bireport.reportGameEvent('BIND_USER', userId, gameId, 0, 0, 0, 0, 0, 0, [], clientId) evt = OnLineGameChangedEvent(userId, gameId, 1, clientId) TGHall.getEventBus().publishEvent(evt)
def doGameLeave(self, userId, gameId, clientId): evt = OnLineGameChangedEvent(userId, gameId, 0, clientId) TGHall.getEventBus().publishEvent(evt)