def _updateNavInfo(self, eventType = None, eventID = None, doResetNavInfo = False):
     if eventType is not None:
         if eventID is not None:
             if eventType == constants.EVENT_TYPE.POTAPOV_QUEST:
                 pQuest = g_eventsCache.potapov.getQuests()[int(eventID)]
                 targetQuestTab = events_helpers.getTabAliasByQuestBranchID(pQuest.getQuestBranch())
                 if targetQuestTab == _QA.SEASON_VIEW_TAB_RANDOM:
                     self._navInfo.selectRandomQuest(pQuest.getTileID(), pQuest.getID())
                 else:
                     self._navInfo.selectFalloutQuest(pQuest.getTileID(), pQuest.getID())
             elif eventType == constants.EVENT_TYPE.CLUBS_QUEST:
                 self._navInfo.selectLadderQuest(eventID)
             elif eventType in (constants.EVENT_TYPE.TUTORIAL, constants.EVENT_TYPE.MOTIVE_QUEST):
                 self._navInfo.selectTutorialQuest(eventID)
             else:
                 self._navInfo.selectCommonQuest(eventID)
         elif eventType == constants.EVENT_TYPE.POTAPOV_QUEST:
             self._navInfo.selectTab(_QA.TAB_PERSONAL_QUESTS, doResetNavInfo)
         elif eventType in (constants.EVENT_TYPE.TUTORIAL, constants.EVENT_TYPE.MOTIVE_QUEST):
             self._navInfo.selectTab(_QA.TAB_BEGINNER_QUESTS)
         else:
             self._navInfo.selectTab(_QA.TAB_COMMON_QUESTS)
         return True
     else:
         if self.__isTutorialTabEnabled():
             tutorialQuestsDescriptor = events_helpers.getTutorialEventsDescriptor()
             if tutorialQuestsDescriptor is not None:
                 completed = g_itemsCache.items.stats.tutorialsCompleted
                 if not tutorialQuestsDescriptor.areAllBonusesReceived(completed):
                     self._navInfo.selectTutorialQuest('')
                     return True
         return False
Exemple #2
0
 def triggerEffect(self):
     chapterID = self._tutorial.getVars().get(self.getTargetID())
     descriptor = events_helpers.getTutorialEventsDescriptor()
     completed = g_itemsCache.items.stats.tutorialsCompleted
     chapterIdx = descriptor.getChapterIdx(chapterID)
     chaptersCount = descriptor.getNumberOfChapters()
     nextChapterID = self.__getOpenedChapterID(descriptor, completed, chapterIdx, chaptersCount) or self.__getOpenedChapterID(descriptor, completed, 0, chapterIdx)
     events_dispatcher.showTutorialTabInEventsWindow(nextChapterID)
Exemple #3
0
 def triggerEffect(self):
     chapterID = self._tutorial.getVars().get(self.getTargetID())
     descriptor = events_helpers.getTutorialEventsDescriptor()
     completed = g_itemsCache.items.stats.tutorialsCompleted
     chapterIdx = descriptor.getChapterIdx(chapterID)
     chaptersCount = descriptor.getNumberOfChapters()
     nextChapterID = self.__getOpenedChapterID(descriptor, completed, chapterIdx, chaptersCount) or self.__getOpenedChapterID(descriptor, completed, 0, chapterIdx)
     events_dispatcher.showTutorialTabInEventsWindow(nextChapterID)
 def __init__(self, ctx=None):
     super(BoostersWindow, self).__init__()
     self.__availableBoosters = None
     self.__boosterQuests = None
     self.__activeBoosters = None
     self.__isReceivedBoostersTab = ctx.get("slotID", None) != ADD_BOOSTER_ID
     self.__boostersInQuestCount = 0
     self.__qualities = []
     self.__boosterTypes = []
     self.__questsDescriptor = events_helpers.getTutorialEventsDescriptor()
     return
Exemple #5
0
 def _updateNavInfo(self, eventType=None, eventID=None):
     if eventType is not None and eventID is not None:
         if eventType == constants.EVENT_TYPE.POTAPOV_QUEST:
             pQuest = g_eventsCache.potapov.getQuests()[int(eventID)]
             self._navInfo.selectPotapovQuest(pQuest.getTileID(), pQuest.getID())
         elif eventType == constants.EVENT_TYPE.TUTORIAL:
             self._navInfo.selectTutorialQuest(eventID)
         else:
             self._navInfo.selectCommonQuest(eventID)
         return True
     if g_settingsCore.serverSettings.getTutorialSetting(TUTORIAL.WAS_QUESTS_TUTORIAL_STARTED):
         tutorialQuestsDescriptor = events_helpers.getTutorialEventsDescriptor()
         if tutorialQuestsDescriptor is not None:
             completed = g_itemsCache.items.stats.tutorialsCompleted
             if not tutorialQuestsDescriptor.areAllBonusesReceived(completed):
                 self._navInfo.selectTutorialQuest("")
                 return True
     return False
Exemple #6
0
 def _updateNavInfo(self,
                    eventType=None,
                    eventID=None,
                    doResetNavInfo=False):
     if eventType is not None:
         if eventID is not None:
             if eventType == constants.EVENT_TYPE.POTAPOV_QUEST:
                 pQuest = g_eventsCache.potapov.getQuests()[int(eventID)]
                 targetQuestTab = events_helpers.getTabAliasByQuestBranchID(
                     pQuest.getQuestBranch())
                 if targetQuestTab == _QA.SEASON_VIEW_TAB_RANDOM:
                     self._navInfo.selectRandomQuest(
                         pQuest.getTileID(), pQuest.getID())
                 else:
                     self._navInfo.selectFalloutQuest(
                         pQuest.getTileID(), pQuest.getID())
             elif eventType == constants.EVENT_TYPE.CLUBS_QUEST:
                 self._navInfo.selectLadderQuest(eventID)
             elif eventType in (constants.EVENT_TYPE.TUTORIAL,
                                constants.EVENT_TYPE.MOTIVE_QUEST):
                 self._navInfo.selectTutorialQuest(eventID)
             else:
                 self._navInfo.selectCommonQuest(eventID)
         elif eventType == constants.EVENT_TYPE.POTAPOV_QUEST:
             self._navInfo.selectTab(_QA.TAB_PERSONAL_QUESTS,
                                     doResetNavInfo)
         elif eventType in (constants.EVENT_TYPE.TUTORIAL,
                            constants.EVENT_TYPE.MOTIVE_QUEST):
             self._navInfo.selectTab(_QA.TAB_BEGINNER_QUESTS)
         else:
             self._navInfo.selectTab(_QA.TAB_COMMON_QUESTS)
         return True
     else:
         if self.__isTutorialTabEnabled():
             tutorialQuestsDescriptor = events_helpers.getTutorialEventsDescriptor(
             )
             if tutorialQuestsDescriptor is not None:
                 completed = g_itemsCache.items.stats.tutorialsCompleted
                 if not tutorialQuestsDescriptor.areAllBonusesReceived(
                         completed):
                     self._navInfo.selectTutorialQuest('')
                     return True
         return False
Exemple #7
0
 def _updateNavInfo(self, eventType=None, eventID=None):
     if eventType is not None and eventID is not None:
         if eventType == constants.EVENT_TYPE.POTAPOV_QUEST:
             pQuest = g_eventsCache.potapov.getQuests()[int(eventID)]
             self._navInfo.selectPotapovQuest(pQuest.getTileID(),
                                              pQuest.getID())
         elif eventType == constants.EVENT_TYPE.TUTORIAL:
             self._navInfo.selectTutorialQuest(eventID)
         else:
             self._navInfo.selectCommonQuest(eventID)
         return True
     if g_settingsCore.serverSettings.getTutorialSetting(
             TUTORIAL.WAS_QUESTS_TUTORIAL_STARTED):
         tutorialQuestsDescriptor = events_helpers.getTutorialEventsDescriptor(
         )
         if tutorialQuestsDescriptor is not None:
             completed = g_itemsCache.items.stats.tutorialsCompleted
             if not tutorialQuestsDescriptor.areAllBonusesReceived(
                     completed):
                 self._navInfo.selectTutorialQuest('')
                 return True
     return False
 def __init__(self):
     super(TutorialQuestsTab, self).__init__()
     self.__questsDescriptor = events_helpers.getTutorialEventsDescriptor()
 def __init__(self):
     super(QuestsBoostersTab, self).__init__()
     self.__boosterQuests = self.__getBoosterQuests()
     self.__questsDescriptor = events_helpers.getTutorialEventsDescriptor()
Exemple #10
0
 def __init__(self):
     super(QuestsBoostersTab, self).__init__()
     self.__boosterQuests = self.__getBoosterQuests()
     self.__questsDescriptor = events_helpers.getTutorialEventsDescriptor()