Пример #1
0
 def __init__(self, quest):
     quests, oldQuest = self._removeFromSameChain(
         g_eventsCache.potapov.getSelectedQuests().values(), quest)
     super(PotapovQuestSelect, self).__init__(quests)
     self.addPlugins([
         plugins.PotapovQuestSlotsValidator(removedCount=int(
             oldQuest is not None)),
         plugins.PotapovQuestSelectConfirmator(quest,
                                               oldQuest,
                                               isEnabled=oldQuest
                                               is not None)
     ])
Пример #2
0
 def __init__(self, quest, events_cache, questsBranch):
     quests, oldQuest = self._removeFromSameChain(
         events_cache.getSelectedQuests().values(), quest)
     super(PotapovQuestSelect, self).__init__(quests, events_cache,
                                              questsBranch)
     self.addPlugins([
         plugins.PotapovQuestSlotsValidator(
             events_cache.questsProgress,
             removedCount=int(oldQuest is not None)),
         plugins.PotapovQuestSelectConfirmator(quest,
                                               oldQuest,
                                               isEnabled=oldQuest
                                               is not None)
     ])
     return