Ejemplo n.º 1
0
    def __onServerSettingChanged(self, *args):
        if not g_lobbyContext.getServerSettings().isSandboxEnabled():

            def __leave(_ = True):
                g_prbCtrlEvents.onPreQueueFunctionalDestroyed()

            if self.isInQueue():
                self.dequeue(pre_queue_ctx.DequeueCtx(waitingID='prebattle/leave'), callback=__leave)
            else:
                __leave()
Ejemplo n.º 2
0
    def leave(self, ctx, callback=None):
        def __leave(_=True):
            g_prbCtrlEvents.onPreQueueFunctionalDestroyed()
            if callback is not None:
                callback(True)
            return

        if self.isInQueue():
            self.dequeue(pre_queue_ctx.DequeueCtx(waitingID='prebattle/leave'),
                         callback=__leave)
        else:
            __leave()
Ejemplo n.º 3
0
 def _doEffect(self, dispatcher):
     self.__stillRunning = True
     result = yield dispatcher.sendPreQueueRequest(pre_queue_ctx.DequeueCtx())
     self.__stillRunning = False
     if result:
         self._tutorial.getFlags().deactivateFlag(self._effect.getTargetID())
Ejemplo n.º 4
0
 def doAction(self, action=None):
     if not self.isInQueue():
         self.queue(self._makeQueueCtxByAction(action))
     else:
         self.dequeue(pre_queue_ctx.DequeueCtx(waitingID='prebattle/leave'))
     return True