def handleSkipTutorial(self, skip): localAvatar.motionFSM.onIfMoveLock() if self.skipTutorialBox: self.skipTutorialBox.destroy() self.skipTutorialBox = None if skip: self.skipTutorial = True if not base.launcher.getPhaseComplete(4): if not self.doorDisableDialog: base.cr.centralLogger.writeClientEvent('Player encountered phase 4 blocker trying to skip tutorial before PR downloaded') self.doorDisableDialog = PDialog.PDialog(text = PLocalizer.NoPortRoyal, style = OTPDialog.Acknowledge, command = self.cleanupDoorDisableDialog) return None base.cr.tutorialObject.skipTutorial() else: self.askedTutorial = True if not base.launcher.getPhaseComplete(3): if not self.doorDisableDialog: base.cr.centralLogger.writeClientEvent('Player encountered phase 3 blocker trying to leave starting jail') self.doorDisableDialog = PDialog.PDialog(text = PLocalizer.NoRambleshack, style = OTPDialog.Acknowledge, command = self.cleanupDoorDisableDialog) return None DistributedDoor.requestInteraction(self, self.avId, self.interactType)
def requestInteraction(self, avId, interactType = 0): locationId = base.localAvatar.getLocation()[0] location = None if locationId: locationObj = base.cr.doId2do.get(locationId) if locationObj: location = locationObj.uniqueId if location == TutorialGlobals.JAIL_INTERIOR and base.localAvatar.style.getTutorial() < PiratesGlobals.TUT_GOT_CUTLASS: if not self.skipTutorialBox: base.localAvatar.motionFSM.moveLockIfOn() self.avId = avId self.interactType = interactType self.skipTutorialBox = SkipTutorialFrame.SkipTutorialFrame(callback = self.handleSkipTutorial) return None elif not base.launcher.getPhaseComplete(3): if not self.doorDisableDialog: base.cr.centralLogger.writeClientEvent('Player encountered phase 3 blocker') self.doorDisableDialog = PDialog.PDialog(text = PLocalizer.NoRambleshack, style = OTPDialog.Acknowledge, command = self.cleanupDoorDisableDialog) return None if self.buildingUid == LocationIds.PARLOR_BUILDING: if avId == base.localAvatar.doId: base.transitions.fadeOut(self.tOpen) self.openDoorIval.start() self.cr.teleportMgr.d_requestShardTeleport(base.localAvatar.getDefaultShard()) return None DistributedDoor.requestInteraction(self, avId, interactType)
def disable(self): self.notify.debug('%s DistributedBuildingDoor.disable' % self.doId) if self.areaRequest: self.cr.relatedObjectMgr.abortRequest(self.areaRequest) self.areaRequest = None self.privateInteriorId = 0 DistributedDoor.disable(self)
def disable(self): self.cleanupDoorDisableDialog() if self.skipTutorialBox: self.skipTutorialBox.destroy() self.skipTutorialBox = None del self.interior DistributedDoor.disable(self) return
def disable(self): self.cleanupDoorDisableDialog() if self.skipTutorialBox: self.skipTutorialBox.destroy() self.skipTutorialBox = None del self.interior DistributedDoor.disable(self)
def delete(self): self.notify.debug('%s DistributedBuildingDoor.delete' % self.doId) DistributedDoor.delete(self)
def __init__(self, cr): DistributedDoor.__init__(self, cr, 'DistributedBuildingDoor') self.areaRequest = None self.privateInteriorId = 0
def delete(self): if self.islandRequest: self.cr.relatedObjectMgr.abortRequest(self.islandRequest) self.islandRequest = None DistributedDoor.delete(self) return
def handleEnterProximity(self, collEntry): DistributedDoor.handleEnterProximity(self, collEntry)
def __init__(self, cr): DistributedDoor.__init__(self, cr, 'DistributedInteriorDoor') self.islandRequest = None self.doorDisableDialog = None self.skipTutorialBox = None return
def delete(self): if self.islandRequest: self.cr.relatedObjectMgr.abortRequest(self.islandRequest) self.islandRequest = None DistributedDoor.delete(self)
def __init__(self, cr): DistributedDoor.__init__(self, cr, 'DistributedInteriorDoor') self.islandRequest = None self.doorDisableDialog = None self.skipTutorialBox = None
def requestInteraction(self, avId, interactType=0): if avId == localAvatar.doId and localAvatar.zombie and self.buildingUid != LocationConstants.LocationIds.KINGSHEAD_OUTER_DOOR: localAvatar.guiMgr.createWarning(PLocalizer.ZombieNoDoors, PiratesGuiGlobals.TextFG6) return DistributedDoor.requestInteraction(self, avId, interactType)