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()
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()
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())
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