Exemplo n.º 1
0
 def exitPlayingGame(self):
     self.shardFSM.request('Off')
     ivalMgr.interrupt()
     base.ambientMgr.delete()
     base.musicMgr.delete()
     messenger.send('clientLogout')
     for (doId, obj) in self.doId2do.items():
         if not isinstance(obj, LocalPirate) and not isinstance(obj, DistributedDistrict.DistributedDistrict):
             if hasattr(self, 'disableObject'):
                 self.disableObject(doId)
             
         hasattr(self, 'disableObject')
     
     camera.reparentTo(render)
     camera.setPos(0, 0, 0)
     camera.setHpr(0, 0, 0)
     base.transitions.noTransitions()
     OTPClientRepository.exitPlayingGame(self)
     self.detectLeaks(okTasks = [
         'physics-avatar',
         'memory-monitor-task',
         'multitexFlatten'], okEvents = [
         'destroy-ToontownLoadingScreenTitle',
         'destroy-ToontownLoadingScreenTip',
         'destroy-ToontownLoadingScreenWaitBar',
         PiratesGlobals.LogoutHotkey,
         PiratesGlobals.HideGuiHotkey,
         PiratesGlobals.OptionsHotkey,
         'close_main_window',
         'open_main_window',
         'texture_state_changed',
         'connectionIssue',
         'connectionRetrying',
         self.getConnectedEvent()])
    def exitPlayingGame(self):
        self.shardFSM.request('Off')
        ivalMgr.interrupt()
        base.ambientMgr.delete()
        base.musicMgr.delete()
        messenger.send('clientLogout')
        for (doId, obj) in self.doId2do.items():
            if not isinstance(obj, LocalPirate) and not isinstance(
                    obj, DistributedDistrict.DistributedDistrict):
                if hasattr(self, 'disableObject'):
                    self.disableObject(doId)

            hasattr(self, 'disableObject')

        camera.reparentTo(render)
        camera.setPos(0, 0, 0)
        camera.setHpr(0, 0, 0)
        base.transitions.noTransitions()
        OTPClientRepository.exitPlayingGame(self)
        self.detectLeaks(okTasks=[
            'physics-avatar', 'memory-monitor-task', 'multitexFlatten'
        ],
                         okEvents=[
                             'destroy-ToontownLoadingScreenTitle',
                             'destroy-ToontownLoadingScreenTip',
                             'destroy-ToontownLoadingScreenWaitBar',
                             PiratesGlobals.LogoutHotkey,
                             PiratesGlobals.HideGuiHotkey,
                             PiratesGlobals.OptionsHotkey, 'close_main_window',
                             'open_main_window', 'texture_state_changed',
                             'connectionIssue', 'connectionRetrying',
                             self.getConnectedEvent()
                         ])
    def enterPlayingGame(self):
        OTPClientRepository.enterPlayingGame(self)
        self.enterPlayGame(401000001, base.localAvatar.zoneId,base.localAvatar.getDoId())
        if __dev__ and config.GetDouble('want-dev-hotkeys', 0):
            print ("PiratesClientRepository: Enabling developer hotkeys...")
            def toggleKraken():
                if base.localAvatar:
                    if base.localAvatar.ship:
                        messenger.send('magicWord', [
                            '~kraken',
                            base.localAvatar.getDoId(),
                            base.localAvatar.zoneId])
            try:
                self.accept(PiratesGlobals.KrakenHotkey, toggleKraken)
            except:
                self.notify.warning("Failed to initialize the Kraken Hotkey.")

        def logout():
            if not base.config.GetBool('location-kiosk', 0) and hasattr(base, 'localAvatar') and localAvatar.getCanLogout():
                self._userLoggingOut = True
                self.gameFSM.request('closeShard', [
                    'waitForAvatarList'])

        self._userLoggingOut = False
        self.accept(PiratesGlobals.LogoutHotkey, logout)
        if __dev__ and config.GetDouble('want-dev-hotkeys', 0):

            def deployShip():
                messenger.send('magicWord', [
                    '~deployShip',
                    base.localAvatar.getDoId(),
                    base.localAvatar.zoneId])
            try:
                self.accept(PiratesGlobals.ShipHotkey, deployShip)
            except:
                self.notify.warning("Failed to initialize the Ship Hotkey.")

        if (localAvatar.style.getTutorial() < PiratesGlobals.TUT_MET_JOLLY_ROGER and self.skipTutorial == 0) or True:
            localAvatar.teleportToType = PiratesGlobals.INSTANCE_TUTORIAL
            localAvatar.teleportToName = WorldGlobals.PiratesTutorialSceneFileBase
            #self.sendMsgToTravelAgent('requestInitLocUD', [
            #    'unused',
            #    0])
        elif localAvatar.onWelcomeWorld and self.defaultShard != 0 and config.GetBool('want-welcome-worlds', 0):
            localAvatar.teleportToType = PiratesGlobals.INSTANCE_WELCOME
            localAvatar.teleportToName = PLocalizer.WelcomeWorld #'Welcome World'
            #self.sendMsgToTravelAgent('requestInitLocUD', [
            #    'unused',
            #    0])
        else:
            desiredShard = self.defaultShard
            localAvatar.teleportToType = PiratesGlobals.INSTANCE_MAIN
            localAvatar.teleportToName = WorldGlobals.PiratesWorldSceneFileBase
            #self.sendMsgToTravelAgent('requestInitLocUD', [
            #    'unused',
            #    desiredShard])
        base.loadingScreen.beginStep('beginTeleport', 11, 32)
 def enterCloseShard(self, loginState=None):
     if loginState == 'waitForAvatarList':
         self.loadingScreen.showTarget(pickapirate=True)
     elif loginState == 'shutdown':
         self.loadingScreen.showTarget(exit=True)
     self.loadingScreen.show()
     base.disableZoneLODs()
     self._processVisStopIW = InterestWatcher(self, 'stopProcessViz')
     self.acceptOnce(self._processVisStopIW.getDoneEvent(),
                     Functor(self._removeShardObjects, loginState))
     messenger.send(PiratesClientRepository.StopVisibilityEvent)
     self._processVisStopIW.stopCollect()
     OTPClientRepository.enterCloseShard(self, loginState)
Exemplo n.º 5
0
 def enterCloseShard(self, loginState = None):
     if loginState == 'waitForAvatarList':
         self.loadingScreen.showTarget(pickapirate = True)
     elif loginState == 'shutdown':
         self.loadingScreen.showTarget(exit = True)
     
     self.loadingScreen.show()
     base.disableZoneLODs()
     self._processVisStopIW = InterestWatcher(self, 'stopProcessViz')
     self.acceptOnce(self._processVisStopIW.getDoneEvent(), Functor(self._removeShardObjects, loginState))
     messenger.send(PiratesClientRepository.StopVisibilityEvent)
     self._processVisStopIW.stopCollect()
     OTPClientRepository.enterCloseShard(self, loginState)
 def exitCloseShard(self):
     self.loadingScreen.hide()
     if hasattr(self, 'closeShardEGroup'):
         self.ignore(self.closeShardEGroup.getDoneEvent())
         del self.closeShardEGroup
     if hasattr(self, '_localAvDisableIW'):
         self.ignore(self._localAvDisableIW.getDoneEvent())
         self._localAvDisableIW.destroy()
         del self._localAvDisableIW
     if hasattr(self, '_processVisStopIW'):
         self.ignore(self._processVisStopIW.getDoneEvent())
         self._processVisStopIW.destroy()
         del self._processVisStopIW
     OTPClientRepository.exitCloseShard(self)
Exemplo n.º 7
0
 def enterPlayingGame(self):
     OTPClientRepository.enterPlayingGame(self)
     self.doDetectLeaks = False
     self.shardFSM = ShardFSM(self)
     if localAvatar.style.getTutorial() < PiratesGlobals.TUT_MET_JOLLY_ROGER and not (self.skipTutorial):
         self.travelAgent.d_requestTutorialTeleport()
     elif localAvatar.onWelcomeWorld and not (self.defaultShard):
         self.travelAgent.d_requestWelcomeWorldTeleport()
     elif self.defaultShard:
         self.travelAgent.d_requestLoginTeleport(self.defaultShard)
     elif self.avPlayedRecently:
         self.travelAgent.d_requestLoginTeleport(localAvatar.defaultShard)
     else:
         self.travelAgent.d_requestLoginTeleport()
Exemplo n.º 8
0
    def enterPlayingGame(self):
        OTPClientRepository.enterPlayingGame(self)
        if __dev__ and config.GetDouble('want-dev-hotkeys', 0):

            def toggleKraken():
                if base.localAvatar:
                    if base.localAvatar.ship:
                        messenger.send('magicWord', [
                            '~kraken',
                            base.localAvatar.getDoId(), base.localAvatar.zoneId
                        ])

            self.accept(PiratesGlobals.KrakenHotkey, toggleKraken)

        def logout():
            if not base.config.GetBool('location-kiosk', 0) and hasattr(
                    base, 'localAvatar') and localAvatar.getCanLogout():
                self._userLoggingOut = True
                self.gameFSM.request('closeShard', ['waitForAvatarList'])

        self._userLoggingOut = False
        self.accept(PiratesGlobals.LogoutHotkey, logout)
        if __dev__ and config.GetDouble('want-dev-hotkeys', 0):

            def deployShip():
                messenger.send('magicWord', [
                    '~deployShip',
                    base.localAvatar.getDoId(), base.localAvatar.zoneId
                ])

            self.accept(PiratesGlobals.ShipHotkey, deployShip)

        if localAvatar.style.getTutorial(
        ) < PiratesGlobals.TUT_MET_JOLLY_ROGER and self.skipTutorial == 0:
            localAvatar.teleportToType = PiratesGlobals.INSTANCE_TUTORIAL
            localAvatar.teleportToName = WorldGlobals.PiratesTutorialSceneFileBase
            self.sendMsgToTravelAgent('requestInitLocUD', ['unused', 0])
        elif localAvatar.onWelcomeWorld and self.defaultShard != 0 and config.GetBool(
                'want-welcome-worlds', 0):
            localAvatar.teleportToType = PiratesGlobals.INSTANCE_WELCOME
            localAvatar.teleportToName = 'Welcome World'
            self.sendMsgToTravelAgent('requestInitLocUD', ['unused', 0])
        else:
            desiredShard = self.defaultShard
            localAvatar.teleportToType = PiratesGlobals.INSTANCE_MAIN
            localAvatar.teleportToName = WorldGlobals.PiratesWorldSceneFileBase
            self.sendMsgToTravelAgent('requestInitLocUD',
                                      ['unused', desiredShard])
        base.loadingScreen.beginStep('beginTeleport', 11, 32)
 def enterPlayingGame(self):
     OTPClientRepository.enterPlayingGame(self)
     self.doDetectLeaks = False
     self.shardFSM = ShardFSM(self)
     if localAvatar.style.getTutorial(
     ) < PiratesGlobals.TUT_MET_JOLLY_ROGER and not (self.skipTutorial):
         self.travelAgent.d_requestTutorialTeleport()
     elif localAvatar.onWelcomeWorld and not (self.defaultShard):
         self.travelAgent.d_requestWelcomeWorldTeleport()
     elif self.defaultShard:
         self.travelAgent.d_requestLoginTeleport(self.defaultShard)
     elif self.avPlayedRecently:
         self.travelAgent.d_requestLoginTeleport(localAvatar.defaultShard)
     else:
         self.travelAgent.d_requestLoginTeleport()
Exemplo n.º 10
0
 def exitCloseShard(self):
     self.loadingScreen.hide()
     if hasattr(self, 'closeShardEGroup'):
         self.ignore(self.closeShardEGroup.getDoneEvent())
         del self.closeShardEGroup
     
     if hasattr(self, '_localAvDisableIW'):
         self.ignore(self._localAvDisableIW.getDoneEvent())
         self._localAvDisableIW.destroy()
         del self._localAvDisableIW
     
     if hasattr(self, '_processVisStopIW'):
         self.ignore(self._processVisStopIW.getDoneEvent())
         self._processVisStopIW.destroy()
         del self._processVisStopIW
     
     OTPClientRepository.exitCloseShard(self)
    def exitPlayingGame(self):
        self.shardFSM.request('Off')
        ivalMgr.interrupt()
        base.ambientMgr.delete()
        base.musicMgr.delete()
        messenger.send('clientLogout')
        for doId, obj in self.doId2do.items():
            if not isinstance(obj, LocalPirate) and not isinstance(
                    obj, DistributedDistrict.DistributedDistrict):
                if hasattr(self, 'disableObject'):
                    self.disableObject(doId)

        camera.reparentTo(render)
        camera.setPos(0, 0, 0)
        camera.setHpr(0, 0, 0)
        base.transitions.noTransitions()
        OTPClientRepository.exitPlayingGame(self)
    def exitPlayingGame(self):
        self.notify.info('exitPlayingGame')
        ivalMgr.interrupt()
        self.notify.info('sending clientLogout')
        messenger.send('clientLogout')
        if config.GetDouble('want-dev-hotkeys', 0):
            try:
                self.ignore(PiratesGlobals.KrakenHotkey)
                self.ignore(PiratesGlobals.ShipHotkey)
            except:
                pass
            self.ignore(PiratesGlobals.LogoutHotkey)

        self.uidMgr.reset()
        if self.distributedDistrict:
            self.distributedDistrict.worldCreator.cleanupAllAreas()

        for (doId, obj) in self.doId2do.items():
            if not isinstance(obj, LocalPirate) and not isinstance(obj, DistributedDistrict.DistributedDistrict):
                if hasattr(self, 'disableObject'):
                    self.disableObject(doId)

            hasattr(self, 'disableObject')

        if hasattr(base, 'localAvatar'):
            camera.reparentTo(render)
            camera.setPos(0, 0, 0)
            camera.setHpr(0, 0, 0)

        base.transitions.noTransitions()
        if self._userLoggingOut:
            self.detectLeaks(okTasks = [
                'physics-avatar',
                'memory-monitor-task',
                'multitexFlatten'], okEvents = [
                'destroy-ToontownLoadingScreenTitle',
                'destroy-ToontownLoadingScreenTip',
                'destroy-ToontownLoadingScreenWaitBar',
                'f12',
                'f7',
                'close_main_window',
                'open_main_window',
                PiratesGlobals.LogoutHotkey])

        OTPClientRepository.exitPlayingGame(self)
Exemplo n.º 13
0
    def exitPlayingGame(self):
        self.notify.info('exitPlayingGame')
        ivalMgr.interrupt()
        self.notify.info('sending clientLogout')
        messenger.send('clientLogout')
        if config.GetDouble('want-dev-hotkeys', 0):
            self.ignore(PiratesGlobals.KrakenHotkey)
            self.ignore(PiratesGlobals.ShipHotkey)
            self.ignore(PiratesGlobals.LogoutHotkey)

        self.uidMgr.reset()
        if self.distributedDistrict:
            self.distributedDistrict.worldCreator.cleanupAllAreas()

        for (doId, obj) in self.doId2do.items():
            if not isinstance(obj, LocalPirate) and not isinstance(
                    obj, DistributedDistrict.DistributedDistrict):
                if hasattr(self, 'disableObject'):
                    self.disableObject(doId)

            hasattr(self, 'disableObject')

        if hasattr(base, 'localAvatar'):
            camera.reparentTo(render)
            camera.setPos(0, 0, 0)
            camera.setHpr(0, 0, 0)

        base.transitions.noTransitions()
        if self._userLoggingOut:
            self.detectLeaks(okTasks=[
                'physics-avatar', 'memory-monitor-task', 'multitexFlatten'
            ],
                             okEvents=[
                                 'destroy-ToontownLoadingScreenTitle',
                                 'destroy-ToontownLoadingScreenTip',
                                 'destroy-ToontownLoadingScreenWaitBar', 'f12',
                                 'f7', 'close_main_window', 'open_main_window',
                                 PiratesGlobals.LogoutHotkey
                             ])

        OTPClientRepository.exitPlayingGame(self)
Exemplo n.º 14
0
 def enterNoConnection(self):
     OTPClientRepository.enterNoConnection(self)
     if hasattr(base, 'localAvatar'):
         base.localAvatar.logDefaultShard()
Exemplo n.º 15
0
    def __init__(self, serverVersion, launcher=None):
        self.loadingScreen = base.loadingScreen
        self.loadingScreen.parent = self
        self.accept('connectionIssue', self.loadingScreen.hide)
        self.accept('connectionRetrying', self.loadingScreen.show)
        OTPClientRepository.__init__(self,
                                     serverVersion,
                                     launcher,
                                     playGame=PlayGame.PlayGame)
        self.createAvatarClass = DistributedPlayerPirate.DistributedPlayerPirate
        self.tradeManager = None
        self.pvpManager = None
        self.csm = self.generateGlobalObject(
            OtpDoGlobals.OTP_DO_ID_CLIENT_SERVICES_MANAGER,
            'ClientServicesManager')
        #self.avatarManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_AVATAR_MANAGER, 'DistributedAvatarManager')
        #self.chatManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_CHAT_MANAGER, 'DistributedChatManager')
        #self.crewMatchManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_CREW_MATCH_MANAGER, 'DistributedCrewMatchManager')
        #self.avatarFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_AVATAR_FRIENDS_MANAGER, 'PCAvatarFriendsManager')
        #self.playerFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PLAYER_FRIENDS_MANAGER, 'PCPlayerFriendsManager')
        #self.guildManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_GUILD_MANAGER, 'PCGuildManager')
        #self.speedchatRelay = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_SPEEDCHAT_RELAY, 'PiratesSpeedchatRelay')
        #self.shipLoader = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_SHIP_MANAGER, 'DistributedShipLoader')
        #self.matchMaker = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_MATCH_MAKER, 'DistributedMatchMaker')
        base.loadingScreen.tick()
        #self.codeRedemption = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_CODE_REDEMPTION, 'CodeRedemption')
        base.loadingScreen.tick()
        #self.settingsMgr = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_SETTINGS_MANAGER, 'PiratesSettingsMgr')
        #self.statusDatabase = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_STATUS_DATABASE, 'StatusDatabase')
        self.wantSeapatch = base.config.GetBool('want-seapatch', 1)
        self.wantSpecialEffects = base.config.GetBool('want-special-effects',
                                                      1)
        self.wantMakeAPirate = base.config.GetBool('wantMakeAPirate', 0)
        self.forceTutorial = base.config.GetBool('force-tutorial', 0)
        self.skipTutorial = base.config.GetBool('skip-tutorial', 0)
        self.tutorialObject = None
        self.avChoiceDoneEvent = None
        self.avChoice = None
        self.avCreate = None
        self.currentCutscene = None
        self.activeWorld = None
        self.oldWorld = None
        self.teleportMgr = None
        self.treasureMap = None
        self.newsManager = None
        self.distributedDistrict = None
        self.district = None
        self.profileMgr = None
        self.battleMgr = BattleManager.BattleManager(self)
        self.combatAnims = CombatAnimations.CombatAnimations()
        self.interactionMgr = InteractionManager.InteractionManager()
        self.currCamParent = None
        self.uidMgr = UniqueIdManager.UniqueIdManager(self)
        self.fakeMSP = None
        self.questDynMap = QuestLadderDynMap.QuestLadderDynMap()
        self.questDependency = QuestLadderDependency()
        self.questChoiceSibsMap = QuestChoiceDynMap()
        base.loadingScreen.beginStep('MasterHumans', 52, 45)
        self.humanHigh = [MasterHuman.MasterHuman(), MasterHuman.MasterHuman()]
        self.humanHigh[0].billboardNode.removeNode()
        self.humanHigh[1].billboardNode.removeNode()
        self.humanHigh[0].style = HumanDNA.HumanDNA('m')
        self.humanHigh[1].style = HumanDNA.HumanDNA('f')
        self.humanHigh[0].generateHuman('m')
        base.loadingScreen.tick()
        self.humanHigh[1].generateHuman('f')
        base.loadingScreen.tick()
        self.humanHigh[0].ignoreAll()
        self.humanHigh[1].ignoreAll()
        self.humanHigh[0].stopBlink()
        self.humanHigh[1].stopBlink()
        self.humanLow = [MasterHuman.MasterHuman(), MasterHuman.MasterHuman()]
        self.humanLow[0].billboardNode.removeNode()
        self.humanLow[1].billboardNode.removeNode()
        self.humanLow[0].style = HumanDNA.HumanDNA('m')
        self.humanLow[1].style = HumanDNA.HumanDNA('f')
        self.humanLow[0].generateHuman('m')
        base.loadingScreen.tick()
        self.humanLow[1].generateHuman('f')
        base.loadingScreen.tick()
        base.loadingScreen.endStep('MasterHumans')
        self.humanLow[0].ignoreAll()
        self.humanLow[1].ignoreAll()
        self.humanLow[0].stopBlink()
        self.humanLow[1].stopBlink()
        for i in range(2):
            self.humanLow[i]._Actor__sortedLODNames = ['500']
            del self.humanLow[i]._Actor__partBundleDict['2000']
            del self.humanLow[i]._Actor__partBundleDict['1000']
            self.humanLow[i].getLOD('2000').detachNode()
            self.humanLow[i].getLOD('1000').detachNode()
            self.humanLow[i].getLODNode().clearSwitches()
            self.humanLow[i].getLODNode().addSwitch(10000, 0)

        if base.options.getCharacterDetailSetting() == 0:
            self.human = self.humanLow
        else:
            self.human = self.humanHigh
        A = AvatarTypes
        del A
        self.preloadedCutscenes = {}
        self.defaultShard = 0
        if __dev__:
            __builtin__.go = self.getDo
            self.effectTypes = {
                'damageSmoke': ['BlackSmoke'],
                'damageFire': ['Fire'],
                'cannonDeckFire': ['CannonSmokeSimple', 'CannonBlastSmoke'],
                'cannonBSFire': [
                    'MuzzleFlameBS', 'CannonSmokeSimpleBS',
                    'CannonBlastSmokeBS', 'GrapeshotEffectBS'
                ],
                'cannonHit': ['SimpleSmokeCloud', 'ExplosionFlip'],
                'cannonSplash': ['CannonSplash']
            }
            self.effectToggles = {}

        self.cannonballCollisionDebug = 1
        self.npcManager = NPCManager.NPCManager()
        self.accountDetailRecord = AccountDetailRecord()
    def __init__(self, serverVersion, launcher = None):
        self.loadingScreen = base.loadingScreen
        self.loadingScreen.parent = self
        self.accept('connectionIssue', self.loadingScreen.hide)
        self.accept('connectionRetrying', self.loadingScreen.show)
        OTPClientRepository.__init__(self, serverVersion, launcher, playGame = PlayGame.PlayGame)
        self.createAvatarClass = DistributedPlayerPirate.DistributedPlayerPirate
        self.tradeManager = None
        self.pvpManager = None #pvpManager.pvpManager(self)
        self.csm = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_CLIENT_SERVICES_MANAGER, 'ClientServicesManager')
        self.avatarManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_AVATAR_MANAGER, 'DistributedAvatarManager')
        self.chatManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_CHAT_MANAGER, 'DistributedChatManager')
        self.crewMatchManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_CREW_MATCH_MANAGER, 'DistributedCrewMatchManager')
        self.avatarFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_AVATAR_FRIENDS_MANAGER, 'PCAvatarFriendsManager')
        self.playerFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PLAYER_FRIENDS_MANAGER, 'PCPlayerFriendsManager')
        self.guildManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_GUILD_MANAGER, 'PCGuildManager')
        self.speedchatRelay = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_SPEEDCHAT_RELAY, 'PiratesSpeedchatRelay')
        self.shipLoader = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_SHIP_MANAGER, 'DistributedShipLoader')
        self.matchMaker = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_MATCH_MAKER, 'DistributedMatchMaker')
        base.loadingScreen.tick()
        #self.codeRedemption = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_CODE_REDEMPTION, 'CodeRedemption')
        self.travelAgent = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_TRAVEL_AGENT, 'DistributedTravelAgent')
        base.loadingScreen.tick()
        self.settingsMgr = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PIRATES_SETTINGS_MANAGER, 'PiratesSettingsMgr')
        self.statusDatabase = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_STATUS_DATABASE, 'StatusDatabase')
        self.wantSeapatch = base.config.GetBool('want-seapatch', 1)
        self.wantSpecialEffects = base.config.GetBool('want-special-effects', 1)
        self.wantMakeAPirate = base.config.GetBool('wantMakeAPirate', 0)
        self.forceTutorial = base.config.GetBool('force-tutorial', 0)
        self.skipTutorial = base.config.GetBool('skip-tutorial', 0)
        self.tutorialObject = None
        self.avChoiceDoneEvent = None
        self.avChoice = None
        self.avCreate = None
        self.playToken = None
        self.currentCutscene = None
        self.activeWorld = None
        self.oldWorld = None
        self.teleportMgr = None #DistributedTeleportMgr.DistributedTeleportMgr(self)
        self.treasureMap = None
        self.newsManager = None #NewsManager.NewsManager(self)
        self.distributedDistrict = None
        self.district = None
        self.profileMgr = None
        self.battleMgr = BattleManager.BattleManager(self)
        self.combatAnims = CombatAnimations.CombatAnimations()
        self.interactionMgr = InteractionManager.InteractionManager()
        self.currCamParent = None
        self.uidMgr = UniqueIdManager.UniqueIdManager(self)
        self.fakeMSP = None
        self.questDynMap = QuestLadderDynMap.QuestLadderDynMap()
        self.questDependency = QuestLadderDependency()
        self.questChoiceSibsMap = QuestChoiceDynMap()
        base.loadingScreen.beginStep('MasterHumans', 52, 45)
        self.humanHigh = [
            MasterHuman.MasterHuman(),
            MasterHuman.MasterHuman()]
        self.humanHigh[0].billboardNode.removeNode()
        self.humanHigh[1].billboardNode.removeNode()
        self.humanHigh[0].style = HumanDNA.HumanDNA('m')
        self.humanHigh[1].style = HumanDNA.HumanDNA('f')
        self.humanHigh[0].generateHuman('m')
        base.loadingScreen.tick()
        self.humanHigh[1].generateHuman('f')
        base.loadingScreen.tick()
        self.humanHigh[0].ignoreAll()
        self.humanHigh[1].ignoreAll()
        self.humanHigh[0].stopBlink()
        self.humanHigh[1].stopBlink()
        self.humanLow = [
            MasterHuman.MasterHuman(),
            MasterHuman.MasterHuman()]
        self.humanLow[0].billboardNode.removeNode()
        self.humanLow[1].billboardNode.removeNode()
        self.humanLow[0].style = HumanDNA.HumanDNA('m')
        self.humanLow[1].style = HumanDNA.HumanDNA('f')
        self.humanLow[0].generateHuman('m')
        base.loadingScreen.tick()
        self.humanLow[1].generateHuman('f')
        base.loadingScreen.tick()
        base.loadingScreen.endStep('MasterHumans')
        self.humanLow[0].ignoreAll()
        self.humanLow[1].ignoreAll()
        self.humanLow[0].stopBlink()
        self.humanLow[1].stopBlink()
        for i in range(2):
            self.humanLow[i]._Actor__sortedLODNames = [
                '500']
            del self.humanLow[i]._Actor__partBundleDict['2000']
            del self.humanLow[i]._Actor__partBundleDict['1000']
            self.humanLow[i].getLOD('2000').detachNode()
            self.humanLow[i].getLOD('1000').detachNode()
            self.humanLow[i].getLODNode().clearSwitches()
            self.humanLow[i].getLODNode().addSwitch(10000, 0)

        if base.options.getCharacterDetailSetting() == 0:
            self.human = self.humanLow
        else:
            self.human = self.humanHigh
        A = AvatarTypes
        del A
        self.preloadedCutscenes = { }
        self.defaultShard = 0
        if __dev__:
            __builtin__.go = self.getDo
            self.effectTypes = {
                'damageSmoke': [
                    'BlackSmoke'],
                'damageFire': [
                    'Fire'],
                'cannonDeckFire': [
                    'CannonSmokeSimple',
                    'CannonBlastSmoke'],
                'cannonBSFire': [
                    'MuzzleFlameBS',
                    'CannonSmokeSimpleBS',
                    'CannonBlastSmokeBS',
                    'GrapeshotEffectBS'],
                'cannonHit': [
                    'SimpleSmokeCloud',
                    'ExplosionFlip'],
                'cannonSplash': [
                    'CannonSplash'] }
            self.effectToggles = { }

        self.cannonballCollisionDebug = 1
        self.npcManager = NPCManager.NPCManager()
        self.accountDetailRecord = AccountDetailRecord()
 def enterNoConnection(self):
     OTPClientRepository.enterNoConnection(self)
     if hasattr(base, 'localAvatar'):
         base.localAvatar.logDefaultShard()