def _getBonuses(self, operation): hiddenQuests = self._eventsCache.getHiddenQuests() finder = finders.getQuestByTokenAndBonus extrasQuest = finder(hiddenQuests, finders.mainQuestTokenFinder(operation.getID())) baseQuest = finder(hiddenQuests, finders.tokenFinder(finders.PERSONAL_MISSION_TOKEN % operation.getID())) bonuses = baseQuest.getBonuses('dossier') bonuses.extend(extrasQuest.getBonuses()) return bonuses
def _getBonuses(self, operation): hiddenQuests = self._eventsCache.getHiddenQuests() finder = finders.getQuestByTokenAndBonus baseQuest = finder(hiddenQuests, finders.addQuestTokenFinder(operation.getID())) bonuses = baseQuest.getBonuses() if not operation.getNextOperationID(): topBageQuest = finder(hiddenQuests, finders.tokenFinder(finders.PERSONAL_MISSION_BADGES_TOKEN)) bonuses.extend(topBageQuest.getBonuses()) return bonuses
def _getBonuses(self, operation): ctx = {'branch': operation.getBranch()} hiddenQuests = self._eventsCache.getHiddenQuests() finder = finders.getQuestByTokenAndBonus baseQuest = finder(hiddenQuests, finders.addQuestTokenFinder(operation)) bonuses = baseQuest.getBonuses(ctx=ctx) if not operation.getNextOperationIDs(): token = finders.PERSONAL_MISSION_BADGES_TOKEN % operation.getCampaignID( ) topBageQuest = finder(hiddenQuests, finders.tokenFinder(token)) bonuses.extend(topBageQuest.getBonuses(ctx=ctx)) return bonuses
def _getBonuses(self, operation): ctx = {'branch': operation.getBranch()} hiddenQuests = self._eventsCache.getHiddenQuests() finder = finders.getQuestByTokenAndBonus extrasQuest = finder(hiddenQuests, finders.mainQuestTokenFinder(operation)) baseQuest = finder( hiddenQuests, finders.tokenFinder( finders.PERSONAL_MISSION_TOKEN % (operation.getCampaignID(), operation.getID()))) bonuses = baseQuest.getBonuses('dossier', ctx=ctx) bonuses.extend(extrasQuest.getBonuses(ctx=ctx)) return bonuses