def select(self): dispatcher = g_prbLoader.getDispatcher() if dispatcher is not None: dispatcher.doSelectAction(PrebattleAction(self._data)) else: LOG_ERROR('Prebattle dispatcher is not defined') return
def __inviteOrCreateSquad(self, referralID): """ Send invite to the target player if squad is already exist or make the new one with invitation """ self.prbDispatcher.doSelectAction( PrebattleAction(PREBATTLE_ACTION_NAME.SQUAD, accountsToInvite=(referralID, )))
def fightClick(self, mapID=None, actionName=''): dispatcher = g_prbLoader.getDispatcher() if dispatcher is not None: dispatcher.doAction(PrebattleAction(actionName, mapID=mapID)) else: LOG_ERROR('Prebattle dispatcher is not defined') return
def triggerEffect(self): 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.RANDOM_QUEUE)) else: LOG_ERROR('Prebattle dispatcher is not defined') return
def fightSelectClick(self, actionName): if actionName == PREBATTLE_ACTION_NAME.JOIN_RANDOM_QUEUE: LOG_DEBUG('Disabling random battle start on list item click') return else: dispatcher = g_prbLoader.getDispatcher() if dispatcher is not None: dispatcher.doAction(PrebattleAction(actionName)) else: LOG_ERROR('Prebattle dispatcher is not defined') return
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 onMultiteamBtnClick(self): self.prbDispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.FALLOUT_MULTITEAM)) self.destroy()
def onDominationBtnClick(self): self.prbDispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.FALLOUT_CLASSIC)) self.destroy()
def onWindowClose(self): self.destroy() if not self.prbDispatcher.getFunctionalState().hasLockedState: self.prbDispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.RANDOM_QUEUE))
def onMapSelected(self, mapID): dispatcher = g_prbLoader.getDispatcher() if dispatcher is not None: dispatcher.doAction(PrebattleAction(None, mapID=mapID)) self.onWindowClose() return
def _doSelect(self, dispatcher): result = dispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.BATTLE_TUTORIAL)) if result: self._doEffect(dispatcher)
def showSquad(self): if self.prbDispatcher: self.prbDispatcher.doSelectAction( PrebattleAction(PREBATTLE_ACTION_NAME.SQUAD)) else: LOG_ERROR('Prebattle dispatcher is not defined')
def fightClick(self, mapID, actionName): if self.prbDispatcher: self.prbDispatcher.doAction( PrebattleAction(actionName, mapID=mapID)) else: LOG_ERROR('Prebattle dispatcher is not defined')
def createEventSquad(self): self.prbDispatcher.doSelectAction( PrebattleAction(PREBATTLE_ACTION_NAME.EVENT_SQUAD, accountsToInvite=(self.databaseID, )))
def showSquad(self): dispatcher = g_prbLoader.getDispatcher() if dispatcher is not None: dispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.SQUAD)) else: LOG_ERROR('Prebattle dispatcher is not defined')
def selectFight(self, actionName): if self.prbDispatcher: self.prbDispatcher.doSelectAction(PrebattleAction(actionName)) else: LOG_ERROR('Prebattle dispatcher is not defined')