Exemplo n.º 1
0
 def goToTask(self, idx):
     item = self.__controller.carousel.items[idx]['element']
     cType = self.__controller.slots.currentType
     quests = self.__controller.dataAggregator.getIncompleteQuestItems()
     questData = quests[cType][item.getID()]
     events_dispatcher.showEventsWindow(eventID=questData.id,
                                        eventType=EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 2
0
 def onBoosterActionBtnClick(self, boosterID, questID):
     if self.__isReceivedBoostersTab:
         booster = g_goodiesCache.getBooster(boosterID)
         activeBooster = self.__getActiveBoosterByType(booster.boosterType)
         if activeBooster is not None:
             canActivate = yield DialogsInterface.showDialog(
                 I18nConfirmDialogMeta(
                     BOOSTER_CONSTANTS.BOOSTER_ACTIVATION_CONFORMATION_TEXT_KEY,
                     messageCtx={
                         "newBoosterName": text_styles.middleTitle(booster.description),
                         "curBoosterName": text_styles.middleTitle(activeBooster.description),
                     },
                     focusedID=DIALOG_BUTTON_ID.CLOSE,
                 )
             )
         else:
             canActivate = True
         if canActivate:
             self.__activateBoosterRequest(booster)
     else:
         if questID and questID.isdigit():
             questID = int(questID)
         quest = g_eventsCache.getAllQuests(includePotapovQuests=True).get(questID)
         if quest is not None:
             quests_events.showEventsWindow(quest.getID(), quest.getType())
         elif self.__questsDescriptor and self.__questsDescriptor.getChapter(questID):
             quests_events.showEventsWindow(questID, constants.EVENT_TYPE.TUTORIAL)
     return
Exemplo n.º 3
0
 def goToTask(self, idx):
     item = g_customizationController.carousel.items[idx]['object']
     quests = g_customizationController.dataAggregator.associatedQuests
     cType = g_customizationController.carousel.currentType
     questData = quests[cType][item.getID()]
     events_dispatcher.showEventsWindow(eventID=questData.id,
                                        eventType=EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 4
0
 def doAction(self, boosterID, questID):
     if questID and questID.isdigit():
         questID = int(questID)
     quest = g_eventsCache.getAllQuests(includePotapovQuests=True).get(questID)
     if quest is not None:
         quests_events.showEventsWindow(quest.getID(), quest.getType())
     elif self.__questsDescriptor and self.__questsDescriptor.getChapter(questID):
         quests_events.showEventsWindow(questID, constants.EVENT_TYPE.TUTORIAL)
     return
Exemplo n.º 5
0
 def doAction(self, boosterID, questID):
     if questID and questID.isdigit():
         questID = int(questID)
     quest = g_eventsCache.getAllQuests(includePotapovQuests=True).get(questID)
     if quest is not None:
         quests_events.showEventsWindow(quest.getID(), quest.getType())
     elif self.__questsDescriptor and self.__questsDescriptor.getChapter(questID):
         quests_events.showEventsWindow(questID, constants.EVENT_TYPE.TUTORIAL)
     return
Exemplo n.º 6
0
 def onBoosterActionBtnClick(self, boosterID, questID):
     if self._isReceivedBoostersTab:
         booster = g_goodiesCache.getBooster(boosterID)
         activeBooster = self.__getActiveBoosterByType(booster.boosterType)
         if activeBooster is not None:
             canActivate = yield DialogsInterface.showDialog(I18nConfirmDialogMeta(BOOSTER_CONSTANTS.BOOSTER_ACTIVATION_CONFORMATION_TEXT_KEY, messageCtx={'newBoosterName': text_styles.middleTitle(booster.description),
              'curBoosterName': text_styles.middleTitle(activeBooster.description)}, focusedID=DIALOG_BUTTON_ID.CLOSE))
         else:
             canActivate = True
         if canActivate:
             self.__activateBoosterRequest(booster)
     else:
         quests_events.showEventsWindow(questID, constants.EVENT_TYPE.BATTLE_QUEST)
 def handleBodyButton(self):
     if self._isMaxLvl:
         from gui.prb_control.context import PrebattleAction
         from gui.prb_control.dispatcher import g_prbLoader
         from gui.prb_control.settings import PREBATTLE_ACTION_NAME
         dispatcher = g_prbLoader.getDispatcher()
         if dispatcher is not None:
             dispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.FALLOUT))
         else:
             LOG_ERROR('Prebattle dispatcher is not defined')
     else:
         from gui.server_events.events_dispatcher import showEventsWindow
         showEventsWindow(eventType=constants.EVENT_TYPE.BATTLE_QUEST)
     return
Exemplo n.º 8
0
 def handleBodyButton(self):
     if self._isMaxLvl:
         from gui.prb_control.entities.base.ctx import PrbAction
         from gui.prb_control.dispatcher import g_prbLoader
         from gui.prb_control.settings import PREBATTLE_ACTION_NAME
         dispatcher = g_prbLoader.getDispatcher()
         if dispatcher is not None:
             self.__doSelect(dispatcher)
         else:
             LOG_ERROR('Prebattle dispatcher is not defined')
     else:
         from gui.server_events.events_dispatcher import showEventsWindow
         showEventsWindow(eventType=constants.EVENT_TYPE.BATTLE_QUEST)
     return
Exemplo n.º 9
0
 def showBeginnerQuests(self):
     showEventsWindow(eventID=self._battleQuestId,
                      eventType=constants.EVENT_TYPE.TUTORIAL)
Exemplo n.º 10
0
 def showQuestsWindow(self):
     showEventsWindow()
Exemplo n.º 11
0
 def handleBodyButton(self):
     from gui.server_events import events_dispatcher as quests_events
     nextQuestID = _getNextQuestInTileByID(int(self.__potapovQuest.getID()))
     if nextQuestID is not None:
         quests_events.showEventsWindow(nextQuestID, constants.EVENT_TYPE.POTAPOV_QUEST)
     return
Exemplo n.º 12
0
 def showPersonalQuests(self):
     showEventsWindow(eventID=self._personalQuestID,
                      eventType=constants.EVENT_TYPE.POTAPOV_QUEST,
                      doResetNavInfo=self._personalQuestID is None)
     return
Exemplo n.º 13
0
 def openQuest(self, questID):
     return quests_events.showEventsWindow(questID, constants.EVENT_TYPE.FORT_QUEST)
Exemplo n.º 14
0
 def onBoosterActionBtnClick(self, boosterID, questID):
     if self._isReceivedBoostersTab:
         booster = g_goodiesCache.getBooster(boosterID)
         self.__activateBoosterRequest(booster)
     else:
         quests_events.showEventsWindow(questID, constants.EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 15
0
 def handleBodyButton(self):
     from gui.server_events import events_dispatcher as quests_events
     nextQuestID = _getNextQuestInTileByID(int(self.__potapovQuest.getID()))
     if nextQuestID is not None:
         quests_events.showEventsWindow(nextQuestID,
                                        constants.EVENT_TYPE.POTAPOV_QUEST)
Exemplo n.º 16
0
 def showCommonQuests(self):
     showEventsWindow(eventID=self._battleQuestId,
                      eventType=constants.EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 17
0
 def showQuestsWindow(self):
     showEventsWindow()
Exemplo n.º 18
0
 def goToTask(self, idx):
     item = g_customizationController.carousel.items[idx]['object']
     quests = g_customizationController.dataAggregator.associatedQuests
     cType = g_customizationController.carousel.currentType
     questData = quests[cType][item.getID()]
     events_dispatcher.showEventsWindow(eventID=questData.id, eventType=EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 19
0
 def openQuest(self, questID):
     return quests_events.showEventsWindow(questID, constants.EVENT_TYPE.FORT_QUEST)
Exemplo n.º 20
0
 def showCommonQuests(self):
     showEventsWindow(eventID=self._battleQuestId, eventType=constants.EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 21
0
 def showPersonalQuests(self):
     showEventsWindow(eventID=self._personalQuestID, eventType=constants.EVENT_TYPE.POTAPOV_QUEST, doResetNavInfo=self._personalQuestID is None)
     return
Exemplo n.º 22
0
 def goToTask(self, idx):
     item = self.__controller.carousel.items[idx]['element']
     cType = self.__controller.slots.currentType
     quests = self.__controller.dataAggregator.getIncompleteQuestItems()
     questData = quests[cType][item.getID()]
     events_dispatcher.showEventsWindow(eventID=questData.id, eventType=EVENT_TYPE.BATTLE_QUEST)
Exemplo n.º 23
0
 def handleBodyButton(self):
     from gui.server_events import events_dispatcher as quests_events
     nextQuestID = int(self.__potapovQuest.getID()) + 1
     if potapov_quests.g_cache.hasPotapovQuest(nextQuestID):
         quests_events.showEventsWindow(nextQuestID, constants.EVENT_TYPE.POTAPOV_QUEST)