Пример #1
0
    def __getBoosterQuests():
        result = defaultdict(list)
        quests = events_helpers.getBoosterQuests()
        for q in quests.itervalues():
            bonuses = q.getBonuses("goodies")
            for b in bonuses:
                boosters = b.getBoosters()
                for booster, count in boosters.iteritems():
                    result[q.getID(), q.getUserName()].append((booster, count))

        for chapter, boosters in events_helpers.getTutorialQuestsBoosters().iteritems():
            result[chapter.getID(), chapter.getTitle()].extend(boosters)

        return result
Пример #2
0
    def __getBoosterQuests():
        result = defaultdict(list)
        quests = events_helpers.getBoosterQuests()
        for q in quests.itervalues():
            bonuses = q.getBonuses('goodies')
            for b in bonuses:
                boosters = b.getBoosters()
                for booster, count in boosters.iteritems():
                    result[q.getID(), q.getUserName()].append((booster, count))

        for chapter, boosters in events_helpers.getTutorialQuestsBoosters().iteritems():
            result[chapter.getID(), chapter.getTitle()].extend(boosters)

        return result
Пример #3
0
    def __getBoosterQuests(self):
        result = defaultdict(list)
        quests = g_eventsCache.getAllQuests(
            lambda q: q.isAvailable()[0] and not q.isCompleted(), includePotapovQuests=True
        )
        for q in quests.itervalues():
            bonuses = q.getBonuses("goodies")
            for b in bonuses:
                boosters = b.getBoosters()
                for booster, count in boosters.iteritems():
                    result[q.getID(), q.getUserName()].append((booster, count))

        for chapter, boosters in events_helpers.getTutorialQuestsBoosters().iteritems():
            result[chapter.getID(), chapter.getTitle()].extend(boosters)

        return result
Пример #4
0
    def __getBoosterQuestNames(self, boosterID):
        questsResult = set()
        quests = events_helpers.getBoosterQuests()
        for q in quests.itervalues():
            bonuses = q.getBonuses('goodies')
            for b in bonuses:
                boosters = b.getBoosters()
                for qBooster, count in boosters.iteritems():
                    if boosterID == qBooster.boosterID:
                        questsResult.add(q.getUserName())

        for chapter, boosters in events_helpers.getTutorialQuestsBoosters().iteritems():
            for booster, count in boosters:
                if boosterID == booster.boosterID:
                    questsResult.add(chapter.getTitle())

        return questsResult
Пример #5
0
    def __getBoosterQuestNames(self, boosterID):
        questsResult = set()
        quests = g_eventsCache.getAllQuests(lambda q: q.isAvailable()[0] and not q.isCompleted(), includePotapovQuests=True)
        for q in quests.itervalues():
            bonuses = q.getBonuses('goodies')
            for b in bonuses:
                boosters = b.getBoosters()
                for qBooster, count in boosters.iteritems():
                    if boosterID == qBooster.boosterID:
                        questsResult.add(q.getUserName())

        for chapter, boosters in events_helpers.getTutorialQuestsBoosters().iteritems():
            for booster, count in boosters:
                if boosterID == booster.boosterID:
                    questsResult.add(chapter.getTitle())

        return questsResult
Пример #6
0
    def __getBoosterQuestNames(self, boosterID):
        questsResult = set()
        quests = events_helpers.getBoosterQuests()
        for q in quests.itervalues():
            bonuses = q.getBonuses('goodies')
            for b in bonuses:
                boosters = b.getBoosters()
                for qBooster, count in boosters.iteritems():
                    if boosterID == qBooster.boosterID:
                        questsResult.add(q.getUserName())

        for chapter, boosters in events_helpers.getTutorialQuestsBoosters(
        ).iteritems():
            for booster, count in boosters:
                if boosterID == booster.boosterID:
                    questsResult.add(chapter.getTitle())

        return questsResult