def setDailyData(userId, gameId, key, value):
    '''
    设置每日数据
    :param userId:
    :param gameId:
    :param key:
    :param value:
    '''
    dailyData = weakdata.getWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                     DAILY_DATA_KEY)
    dailyData[key] = value
    weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                         DAILY_DATA_KEY, dailyData)
Beispiel #2
0
def _setTbData(gameId, userId, data):
    data = weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                'treasurebox', data)
    if ftlog.is_debug():
        ftlog.debug('treasurebox._setTbData', 'gameId=', gameId, 'userId=',
                    userId, 'data=', data)
    return data
Beispiel #3
0
def _setTbData(userId, data):
    data = weakdata.setWeakData(userId, DIZHU_GAMEID, weakdata.CYCLE_TYPE_DAY,
                                'treasurebox', data)
    ftlog.debug('_setTbData->userIds=', userId, data)
    return data
Beispiel #4
0
def setDay1stDatas(userId, gameId, datas):
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY, '1st',
                                datas)
Beispiel #5
0
def setDayFishDataAll(userId, gameId, data):
    """
    设置每日数据(每个自然日的0点数据会被清除)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                "fish", data)
Beispiel #6
0
def setDayPoseidonDataAll(userId, gameId, data):
    """
    设置每日数据(海皇来袭专用)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                "poseidon", data)
Beispiel #7
0
def setDayRobberyDataAll(userId, gameId, data):
    """
    设置每日数据(招财模式专用)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                "robbery", data)
Beispiel #8
0
def setMonthFishDataAll(userId, gameId, data):
    """
    设置每月数据(每个自然月的首日0点数据会被清除)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_MONTH,
                                "fish", data)
Beispiel #9
0
def setWeekFishDataAll(userId, gameId, data):
    """
    设置每周数据(每个自然周的周一0点数据会被清除)设置一堆数据
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_WEEK,
                                "fish", data)
Beispiel #10
0
def setDay1stDatas(userId, gameId, datas):
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY, '1st', datas)