示例#1
0
 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
示例#2
0
 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, )))
示例#3
0
 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
示例#4
0
 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
示例#5
0
 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
示例#6
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
示例#7
0
 def onMultiteamBtnClick(self):
     self.prbDispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.FALLOUT_MULTITEAM))
     self.destroy()
示例#8
0
 def onDominationBtnClick(self):
     self.prbDispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.FALLOUT_CLASSIC))
     self.destroy()
示例#9
0
 def onWindowClose(self):
     self.destroy()
     if not self.prbDispatcher.getFunctionalState().hasLockedState:
         self.prbDispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.RANDOM_QUEUE))
示例#10
0
 def onMapSelected(self, mapID):
     dispatcher = g_prbLoader.getDispatcher()
     if dispatcher is not None:
         dispatcher.doAction(PrebattleAction(None, mapID=mapID))
         self.onWindowClose()
     return
示例#11
0
 def _doSelect(self, dispatcher):
     result = dispatcher.doSelectAction(PrebattleAction(PREBATTLE_ACTION_NAME.BATTLE_TUTORIAL))
     if result:
         self._doEffect(dispatcher)
示例#12
0
 def showSquad(self):
     if self.prbDispatcher:
         self.prbDispatcher.doSelectAction(
             PrebattleAction(PREBATTLE_ACTION_NAME.SQUAD))
     else:
         LOG_ERROR('Prebattle dispatcher is not defined')
示例#13
0
 def fightClick(self, mapID, actionName):
     if self.prbDispatcher:
         self.prbDispatcher.doAction(
             PrebattleAction(actionName, mapID=mapID))
     else:
         LOG_ERROR('Prebattle dispatcher is not defined')
示例#14
0
 def createEventSquad(self):
     self.prbDispatcher.doSelectAction(
         PrebattleAction(PREBATTLE_ACTION_NAME.EVENT_SQUAD,
                         accountsToInvite=(self.databaseID, )))
示例#15
0
 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')