Пример #1
0
 def pe_onKickedFromRandomQueue(self):
     self.__queueFunctional = functional.createQueueFunctional(
         isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     SystemMessages.pushMessage(messages.getKickReasonMessage('timeout'),
                                type=SystemMessages.SM_TYPE.Warning)
Пример #2
0
 def prb_onTeamStatesReceived(self):
     super(SquadFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     if self.getPlayerInfo().isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue():
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Пример #3
0
 def prb_onTeamStatesReceived(self):
     super(SquadFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     if self.getPlayerInfo().isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue():
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Пример #4
0
 def pe_onPrebattleAutoInvitesChanged(self):
     if GUI_SETTINGS.specPrebatlesVisible:
         isHidden = areSpecBattlesHidden()
         if isHidden:
             events_dispatcher.removeSpecBattlesFromCarousel()
         else:
             events_dispatcher.addSpecBattlesToCarousel()
     events_dispatcher.updateUI()
Пример #5
0
 def pe_onPrebattleAutoInvitesChanged(self):
     if GUI_SETTINGS.specPrebatlesVisible:
         isHidden = areSpecBattlesHidden()
         if isHidden:
             events_dispatcher.removeSpecBattlesFromCarousel()
         else:
             events_dispatcher.addSpecBattlesToCarousel()
     events_dispatcher.updateUI()
Пример #6
0
 def unitMgr_onUnitErrorReceived(self, requestID, unitMgrID, unitIdx, errorCode, errorString):
     if errorCode not in IGNORED_UNIT_MGR_ERRORS:
         msgType, msgBody = messages.getUnitMessage(errorCode, errorString)
         SystemMessages.pushMessage(msgBody, type=msgType)
         if errorCode in RETURN_INTRO_UNIT_MGR_ERRORS:
             self.__unitFunctional.setExit(FUNCTIONAL_EXIT.INTRO_UNIT)
         self.__requestCtx.stopProcessing(result=False)
         events_dispatcher.updateUI()
Пример #7
0
 def unitMgr_onUnitErrorReceived(self, requestID, unitMgrID, unitIdx,
                                 errorCode, errorString):
     if errorCode not in IGNORED_UNIT_MGR_ERRORS:
         msgType, msgBody = messages.getUnitMessage(errorCode, errorString)
         SystemMessages.pushMessage(msgBody, type=msgType)
         if errorCode in RETURN_INTRO_UNIT_MGR_ERRORS:
             self.__unitFunctional.setExit(FUNCTIONAL_EXIT.INTRO_UNIT)
         self.__requestCtx.stopProcessing(result=False)
         events_dispatcher.updateUI()
Пример #8
0
 def _changeUnitFunctional(self, exit=None):
     if exit is not None:
         self.__unitFunctional.setExit(exit)
     self.__unitFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     events_dispatcher.updateUI()
     return
Пример #9
0
 def _changeUnitFunctional(self, exit = None):
     if exit is not None:
         self.__unitFunctional.setExit(exit)
     self.__unitFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     events_dispatcher.updateUI()
     return
Пример #10
0
 def prb_onTeamStatesReceived(self):
     super(CompanyFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     playerInfo = self.getPlayerInfo()
     if playerInfo.isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue() and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Пример #11
0
 def prb_onTeamStatesReceived(self):
     super(CompanyFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     playerInfo = self.getPlayerInfo()
     if playerInfo.isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue(
         ) and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Пример #12
0
 def start(self, ctx):
     self.__requestCtx = context._PrbRequestCtx()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=ctx.isInRandomQueue)
     self._startListening()
     functional.initDevFunctional()
     if not self.__prbFunctional.hasGUIPage() and not self.__prbFunctional.isGUIProcessed():
         self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     events_dispatcher.addCompaniesToCarousel()
     if GUI_SETTINGS.specPrebatlesVisible and not areSpecBattlesHidden():
         events_dispatcher.addSpecBattlesToCarousel()
Пример #13
0
 def start(self, ctx):
     self.__requestCtx = context._PrbRequestCtx()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     self.__queueFunctional = functional.createQueueFunctional(
         isInRandomQueue=ctx.isInRandomQueue)
     self._startListening()
     functional.initDevFunctional()
     if not self.__prbFunctional.hasGUIPage(
     ) and not self.__prbFunctional.isGUIProcessed():
         self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     events_dispatcher.addCompaniesToCarousel()
     if GUI_SETTINGS.specPrebatlesVisible and not areSpecBattlesHidden():
         events_dispatcher.addSpecBattlesToCarousel()
Пример #14
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(SquadFunctional, self).prb_onPlayerStateChanged(pID, roster)
     if self.__doTeamReady:
         self.__doTeamReady = False
         self.__setTeamReady()
     events_dispatcher.updateUI()
Пример #15
0
 def prb_onRosterReceived(self):
     super(BattleSessionFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()
Пример #16
0
 def pe_onPrebattleLeft(self):
     self.__prbFunctional.fini()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     events_dispatcher.updateUI()
Пример #17
0
 def pe_onPrebattleJoinFailure(self, errorCode):
     SystemMessages.pushMessage(messages.getJoinFailureMessage(errorCode),
                                type=SystemMessages.SM_TYPE.Error)
     self.__requestCtx.stopProcessing(result=False)
     events_dispatcher.updateUI()
Пример #18
0
 def pe_onKickedFromRandomQueue(self):
     self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     SystemMessages.pushMessage(messages.getKickReasonMessage('timeout'), type=SystemMessages.SM_TYPE.Warning)
Пример #19
0
 def pe_onPrebattleLeft(self):
     self.__prbFunctional.fini()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     events_dispatcher.updateUI()
Пример #20
0
 def prb_onPlayerRosterChanged(self, pID, prevRoster, roster, actorID):
     super(CompanyFunctional,
           self).prb_onPlayerRosterChanged(pID, prevRoster, roster, actorID)
     events_dispatcher.updateUI()
Пример #21
0
 def prb_onRosterReceived(self):
     super(CompanyFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()
Пример #22
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(CompanyFunctional, self).prb_onPlayerStateChanged(pID, roster)
     if self.__doTeamReady:
         self.__doTeamReady = False
         self.__setTeamReady()
     events_dispatcher.updateUI()
Пример #23
0
 def prb_onSettingUpdated(self, settingName):
     super(CompanyFunctional, self).prb_onSettingUpdated(settingName)
     if settingName == PREBATTLE_SETTING_NAME.LIMITS:
         events_dispatcher.updateUI()
Пример #24
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(BattleSessionFunctional,
           self).prb_onPlayerStateChanged(pID, roster)
     events_dispatcher.updateUI()
Пример #25
0
 def prb_onPlayerAdded(self, pID, roster):
     super(CompanyFunctional, self).prb_onPlayerAdded(pID, roster)
     events_dispatcher.updateUI()
Пример #26
0
 def prb_onPlayerRosterChanged(self, pID, prevRoster, roster, actorID):
     super(SquadFunctional, self).prb_onPlayerRosterChanged(pID, prevRoster, roster, actorID)
     events_dispatcher.updateUI()
Пример #27
0
 def prb_onPlayerRemoved(self, pID, roster, name):
     super(SquadFunctional, self).prb_onPlayerRemoved(pID, roster, name)
     events_dispatcher.updateUI()
Пример #28
0
 def ctrl_onPrebattleInited(self):
     self.__prbFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init(ctx=self.__requestCtx)
     events_dispatcher.updateUI()
Пример #29
0
 def pe_onDequeuedRandom(self):
     self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
Пример #30
0
 def prb_onPlayerAdded(self, pID, roster):
     super(CompanyFunctional, self).prb_onPlayerAdded(pID, roster)
     events_dispatcher.updateUI()
Пример #31
0
 def prb_onPlayerRemoved(self, pID, roster, name):
     super(CompanyFunctional, self).prb_onPlayerRemoved(pID, roster, name)
     events_dispatcher.updateUI()
Пример #32
0
 def prb_onSettingUpdated(self, settingName):
     super(BattleSessionFunctional, self).prb_onSettingUpdated(settingName)
     if settingName == PREBATTLE_SETTING_NAME.LIMITS:
         events_dispatcher.updateUI()
Пример #33
0
 def pe_onPrebattleJoinFailure(self, errorCode):
     SystemMessages.pushMessage(messages.getJoinFailureMessage(errorCode), type=SystemMessages.SM_TYPE.Error)
     self.__requestCtx.stopProcessing(result=False)
     events_dispatcher.updateUI()
Пример #34
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(BattleSessionFunctional, self).prb_onPlayerStateChanged(pID, roster)
     events_dispatcher.updateUI()
Пример #35
0
 def ctrl_onPrebattleInited(self):
     self.__prbFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init(ctx=self.__requestCtx)
     events_dispatcher.updateUI()
Пример #36
0
 def prb_onRosterReceived(self):
     super(BattleSessionFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()
Пример #37
0
 def pe_onDequeuedRandom(self):
     self.__queueFunctional = functional.createQueueFunctional(
         isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
Пример #38
0
 def prb_onRosterReceived(self):
     super(CompanyFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()