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)
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
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)
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
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
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
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
def showBeginnerQuests(self): showEventsWindow(eventID=self._battleQuestId, eventType=constants.EVENT_TYPE.TUTORIAL)
def showQuestsWindow(self): showEventsWindow()
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
def showPersonalQuests(self): showEventsWindow(eventID=self._personalQuestID, eventType=constants.EVENT_TYPE.POTAPOV_QUEST, doResetNavInfo=self._personalQuestID is None) return
def openQuest(self, questID): return quests_events.showEventsWindow(questID, constants.EVENT_TYPE.FORT_QUEST)
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)
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)
def showCommonQuests(self): showEventsWindow(eventID=self._battleQuestId, eventType=constants.EVENT_TYPE.BATTLE_QUEST)
def showQuestsWindow(self): showEventsWindow()
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)
def openQuest(self, questID): return quests_events.showEventsWindow(questID, constants.EVENT_TYPE.FORT_QUEST)
def showCommonQuests(self): showEventsWindow(eventID=self._battleQuestId, eventType=constants.EVENT_TYPE.BATTLE_QUEST)
def showPersonalQuests(self): showEventsWindow(eventID=self._personalQuestID, eventType=constants.EVENT_TYPE.POTAPOV_QUEST, doResetNavInfo=self._personalQuestID is None) return
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)
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)