def actualTcContent(clientId, keystr): datas = configure.getTcContentByGameId(keystr, None, HALL_GAMEID, clientId, []) if datas: ftlog.debug("actualTcContent|datas|ls|", clientId, keystr, datas) return datas return {}
def actualTcContent(clientId, package_gameId): datas = configure.getTcContentByGameId('newstartflow', None, package_gameId, clientId, []) if datas: ftlog.info("newstartflow|actualTcContent|datas|", datas) return datas return {}
def findSkinForClient(userId, clientId, skinVersion, skinId): skinIds = configure.getTcContentByGameId('table.skin', None, DIZHU_GAMEID, clientId, []) # 看该clientId是否配置了skinId if skinId not in skinIds: return None return skinVersion.findSkin(skinId)
def _getBoardTip(self, userId, clientId): temp = configure.getTcContentByGameId('red_packet_task', None, HALL_GAMEID, clientId) if ftlog.is_debug(): ftlog.debug('RPTaskSystem._getBoardTip', 'userId=', userId, 'clientId=', clientId, 'temp=', temp) return temp.get('boardTip') if temp else ''
def getRankRewardsConf(rankId, issueNum, clientId): tc = configure.getTcContentByGameId('score.ranklist', None, DIZHU_GAMEID, clientId, None) if tc: rankRewardsConf = tc.get(rankId) if rankRewardsConf: return rankRewardsConf.get(issueNum, []) return None
def _get_switch_config(self, clientId): from poker.entity.configure import configure from hall.entity.hallconf import HALL_GAMEID switchInfo = configure.getTcContentByGameId('switch', None, HALL_GAMEID, clientId, {}) if ftlog.is_debug(): ftlog.debug('hall._get_switch_config', 'clientId=', clientId, 'switchInfo=', switchInfo) return switchInfo
def loadMyVIPSkin(userId, clientId): model = loadMySkin(userId) vipLevel = hallvip.userVipSystem.getUserVip(userId).vipLevel.level if vipLevel >= 3: skinIds = configure.getTcContentByGameId('table.skin', None, DIZHU_GAMEID, clientId, []) for skinId in skinIds: model.mySkins.add(skinId) return model
def getWxShareTcContentByKey(userId, key, clientId): ''' 获取微信小游戏分享配置, 已clientId 进行区分 ''' temp = configure.getTcContentByGameId('share.wx', None, DIZHU_GAMEID, clientId, defaultVal={}) if ftlog.is_debug(): ftlog.debug('dizhu_wx_share.getWxShareTcContent', 'userId=', userId, 'clientId=', clientId, 'temp=', temp) return temp.get(key, [])
def _getTipTop(self, userId, clientId): """ 获取红包顶端提示,权重选择 """ if clientId is None: return None temp = configure.getTcContentByGameId('red.envelope.bomb', None, DIZHU_GAMEID, clientId) tipTop = temp.get('tipTop') if temp else None if ftlog.is_debug(): ftlog.debug('dizhu_red_envelope_bomb._getTipTop', 'userId=', userId, 'clientId=', clientId, 'tipTop=', tipTop) if tipTop: return dizhu_util.getItemByWeight(tipTop) return None
def download_guide(userId, gameId, clientId): datas = configure.getTcContentByGameId('download_guide', None, HALL_GAMEID, clientId, {}) if not datas: datas = {} msg = MsgPack() msg.setCmd('game_config') msg.setResult('action', 'download_guide') msg.setResult('gameId', gameId) msg.setResult('userId', userId) msg.setResult('datas', datas.get('list', [])) router.sendToUser(msg, userId) if ftlog.is_debug(): ftlog.debug('doGetdownload_guide', 'userId=', userId, 'gameId=', gameId, 'clientId=', clientId, 'datas=', datas)
def getClientSkins(userId, clientId, version): ret = [] skinVersion = loadSkinVersion(version) if skinVersion: skinIds = configure.getTcContentByGameId('table.skin', None, DIZHU_GAMEID, clientId, []) for skinId in skinIds: skin = skinVersion.findSkin(skinId) if skin: ret.append(skin) else: ftlog.warn('tableskin.getClientSkins userId=', userId, 'clientId=', clientId, 'version=', version, 'skinId=', skinId, 'err=', 'NoSkin') return ret
def _getUserTasks(self, userId, clientId, key): ret = [] temp = configure.getTcContentByGameId('red_packet_task', None, HALL_GAMEID, clientId) kindIds = temp.get(key) if temp else None if kindIds: for kindId in kindIds: taskKind = self.findTaskKind(kindId) if taskKind: ret.append(taskKind) else: ftlog.warn('RPTaskSystem._getUserTasks UnknownTask', 'userId=', userId, 'clientId=', clientId, 'kindId=', kindId) return ret
def getActivityList(cls, userId, clientId): ''' 获取活动列表 ''' actIdList = configure.getTcContentByGameId('activity.wx', None, DIZHU_GAMEID, clientId, {}) activityList = [] for act in actIdList: actObj = cls.findActivity(act['actId']) if not actObj: continue if actObj.isExpired(pktimestamp.getCurrentTimestamp()): continue hasReward = actObj.hasReward(userId) act.update({'hasReward': hasReward}) activityList.append(act) if ftlog.is_debug(): ftlog.debug('ActivityWxHelper.getActivityList.userId=', userId, 'clientId=', clientId, 'activityList=', activityList) return activityList
def getUpgradeIncConf(gameId, clientId): return configure.getTcContentByGameId('upgrade_inc', None, gameId, clientId, None)
def getUpgradeDiffConf(gameId, clientId): return configure.getTcContentByGameId('upgrade_diff', None, gameId, clientId, None)
def getUpgradeFullConf(gameId, clientId): return configure.getTcContentByGameId('upgrade_full', None, gameId, clientId, None)
def getClubHeadPics(clientId): heads = configure.getTcContentByClientId('clubpics', None, clientId, None) if not heads: heads = configure.getTcContentByGameId('clubpics', None, HALL_GAMEID, clientId) return heads
def getModulesSwitch(clientId): info = configure.getTcContentByGameId('modules.switch', None, HALL_GAMEID, clientId, []) return info
def getBurials(gameId, userId, clientId): hallGameId = gameId if gameId != 9999 else strutil.getGameIdFromHallClientId(clientId) return configure.getTcContentByGameId('share3', None, hallGameId, clientId, {})
def getUserHeadPics(clientId): heads = configure.getTcContentByClientId('headpics', None, clientId, None) if not heads: heads = configure.getTcContentByGameId('headpics', None, HALL_GAMEID, clientId) return heads
def actualTcContent(clientId): datas = configure.getTcContentByGameId('newcheckin', None, HALL_GAMEID, clientId, []) if datas: ftlog.debug("actualTcContent|datas|", datas) return datas return {}