Example #1
0
 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
Example #2
0
 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