Exemplo n.º 1
0
def getAchievementFactory(record, dossier = None):
    achieveType = getAchieveType(record)
    if record in _ACHIEVEMENTS_BY_NAME:
        factoryMaker = _ACHIEVEMENTS_BY_NAME[record]
    elif achieveType is not None and achieveType in _ACHIEVEMENTS_BY_TYPE:
        factoryMaker = _ACHIEVEMENTS_BY_TYPE[achieveType]
    elif record[0] in _ACHIEVEMENTS_BY_BLOCK:
        factoryMaker = _ACHIEVEMENTS_BY_BLOCK[record[0]]
    else:
        factoryMaker = _AchieveFactory.get(_abstract_achievements.RegularAchievement)
    return factoryMaker(record[1], record[0], dossier)
def getAchievementFactory(record, dossier=None):
    achieveType = getAchieveType(record)
    if record in _ACHIEVEMENTS_BY_NAME:
        factoryMaker = _ACHIEVEMENTS_BY_NAME[record]
    elif achieveType is not None and achieveType in _ACHIEVEMENTS_BY_TYPE:
        factoryMaker = _ACHIEVEMENTS_BY_TYPE[achieveType]
    elif record[0] in _ACHIEVEMENTS_BY_BLOCK:
        factoryMaker = _ACHIEVEMENTS_BY_BLOCK[record[0]]
    else:
        factoryMaker = _AchieveFactory.get(_abstract_achievements.RegularAchievement)
    return factoryMaker(record[1], record[0], dossier)