コード例 #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)
コード例 #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
コード例 #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)
コード例 #4
0
ファイル: boostersbooster_tabs.py プロジェクト: Difrex/wotsdk
 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
コード例 #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
コード例 #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)
コード例 #7
0
 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
コード例 #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
コード例 #9
0
 def showBeginnerQuests(self):
     showEventsWindow(eventID=self._battleQuestId,
                      eventType=constants.EVENT_TYPE.TUTORIAL)
コード例 #10
0
 def showQuestsWindow(self):
     showEventsWindow()
コード例 #11
0
ファイル: awards.py プロジェクト: krzcho/WOTDecompiled
 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
コード例 #12
0
 def showPersonalQuests(self):
     showEventsWindow(eventID=self._personalQuestID,
                      eventType=constants.EVENT_TYPE.POTAPOV_QUEST,
                      doResetNavInfo=self._personalQuestID is None)
     return
コード例 #13
0
 def openQuest(self, questID):
     return quests_events.showEventsWindow(questID, constants.EVENT_TYPE.FORT_QUEST)
コード例 #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)
コード例 #15
0
ファイル: awards.py プロジェクト: jamesxia4/wot_client
 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)
コード例 #16
0
 def showCommonQuests(self):
     showEventsWindow(eventID=self._battleQuestId,
                      eventType=constants.EVENT_TYPE.BATTLE_QUEST)
コード例 #17
0
ファイル: headerquestscontrol.py プロジェクト: aevitas/wotsdk
 def showQuestsWindow(self):
     showEventsWindow()
コード例 #18
0
ファイル: main_view.py プロジェクト: webiumsk/WOT-0.9.14-CT
 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)
コード例 #19
0
 def openQuest(self, questID):
     return quests_events.showEventsWindow(questID, constants.EVENT_TYPE.FORT_QUEST)
コード例 #20
0
ファイル: hangarhangar_header.py プロジェクト: aevitas/wotsdk
 def showCommonQuests(self):
     showEventsWindow(eventID=self._battleQuestId, eventType=constants.EVENT_TYPE.BATTLE_QUEST)
コード例 #21
0
ファイル: hangarhangar_header.py プロジェクト: aevitas/wotsdk
 def showPersonalQuests(self):
     showEventsWindow(eventID=self._personalQuestID, eventType=constants.EVENT_TYPE.POTAPOV_QUEST, doResetNavInfo=self._personalQuestID is None)
     return
コード例 #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)
コード例 #23
0
ファイル: awards.py プロジェクト: webiumsk/WoT
 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)