Esempio n. 1
0
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)
Esempio n. 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
Esempio n. 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
Esempio n. 4
0
def setDay1stDatas(userId, gameId, datas):
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY, '1st',
                                datas)
Esempio n. 5
0
def setDayFishDataAll(userId, gameId, data):
    """
    设置每日数据(每个自然日的0点数据会被清除)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                "fish", data)
Esempio n. 6
0
def setDayPoseidonDataAll(userId, gameId, data):
    """
    设置每日数据(海皇来袭专用)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                "poseidon", data)
Esempio n. 7
0
def setDayRobberyDataAll(userId, gameId, data):
    """
    设置每日数据(招财模式专用)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY,
                                "robbery", data)
Esempio n. 8
0
def setMonthFishDataAll(userId, gameId, data):
    """
    设置每月数据(每个自然月的首日0点数据会被清除)
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_MONTH,
                                "fish", data)
Esempio n. 9
0
def setWeekFishDataAll(userId, gameId, data):
    """
    设置每周数据(每个自然周的周一0点数据会被清除)设置一堆数据
    """
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_WEEK,
                                "fish", data)
Esempio n. 10
0
def setDay1stDatas(userId, gameId, datas):
    return weakdata.setWeakData(userId, gameId, weakdata.CYCLE_TYPE_DAY, '1st', datas)