Esempio n. 1
0
 def _dispose(self):
     self.__receivers = []
     self._ignoreActionCooldown.stop()
     self._ignoreActionCooldown = None
     self.fireEvent(ChannelManagementEvent(0, ChannelManagementEvent.UNREGISTER_BATTLE), scope=EVENT_BUS_SCOPE.BATTLE)
     self.removeListener(ChannelManagementEvent.MESSAGE_FADING_ENABLED, self.__handleMessageFadingEnabled, EVENT_BUS_SCOPE.GLOBAL)
     g_sessionProvider.removeArenaCtrl(self)
     super(BattleMessengerView, self)._dispose()
     return
Esempio n. 2
0
 def _dispose(self):
     Waiting.close()
     g_sessionProvider.removeArenaCtrl(self)
     BigWorld.wg_enableGUIBackground(False, True)
     super(BattleLoading, self)._dispose()
     self.__tipsGetter = None
     if self.__updateTipTI:
         self.__updateTipTI.stop()
         self.__updateTipTI = None
     return
Esempio n. 3
0
 def _dispose(self):
     self.__receivers = []
     self._ignoreActionCooldown.stop()
     self._ignoreActionCooldown = None
     self.fireEvent(ChannelManagementEvent(
         0, ChannelManagementEvent.UNREGISTER_BATTLE),
                    scope=EVENT_BUS_SCOPE.BATTLE)
     self.removeListener(ChannelManagementEvent.MESSAGE_FADING_ENABLED,
                         self.__handleMessageFadingEnabled,
                         EVENT_BUS_SCOPE.GLOBAL)
     g_sessionProvider.removeArenaCtrl(self)
     super(BattleMessengerView, self)._dispose()
     return
Esempio n. 4
0
 def _dispose(self):
     g_messengerEvents.voip.onStateToggled -= self.__onVOIPStateToggled
     ctrl = g_sessionProvider.shared.vehicleState
     if ctrl is not None:
         ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
     g_sessionProvider.removeArenaCtrl(self)
     if self._exchangeBroker is not None:
         self._exchangeBroker.destroy()
         self._exchangeBroker = None
     self.__clearTeamOverrides()
     super(BattleStatisticsDataController, self)._dispose()
     return
Esempio n. 5
0
 def destroy(self):
     """
     Routine invokes when player leave arena.
     """
     ctrl = g_sessionProvider.getVehicleStateCtrl()
     ctrl.onVehicleControlling -= self.__onVehicleControlling
     ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     g_sessionProvider.removeArenaCtrl(self)
     if self._flashObject:
         self.as_destroyS()
     self._dispose()
     if self.__tankIndicator:
         self.__tankIndicator.clear(self.__ui)
         self.__tankIndicator = None
     self.__ui = None
     self.__isShow = False
     self.__isHasGasAttack = False
     return
Esempio n. 6
0
 def destroy(self):
     """
     Routine invokes when player leave arena.
     """
     ctrl = g_sessionProvider.getVehicleStateCtrl()
     ctrl.onVehicleControlling -= self.__onVehicleControlling
     ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     g_sessionProvider.removeArenaCtrl(self)
     if self._flashObject:
         self.as_destroyS()
     self._dispose()
     if self.__tankIndicator:
         self.__tankIndicator.clear(self.__ui)
         self.__tankIndicator = None
     self.__ui = None
     self.__isShow = False
     self.__isHasGasAttack = False
     return
Esempio n. 7
0
    def stop(self):
        while self.__aoiToFarCallbacksIDs:
            _, callbackID = self.__aoiToFarCallbacksIDs.popitem()
            if callbackID is not None:
                BigWorld.cancelCallback(callbackID)

        while self.__destroyCallbacksIDs:
            _, callbackID = self.__destroyCallbacksIDs.popitem()
            if callbackID is not None:
                BigWorld.cancelCallback(callbackID)

        g_sessionProvider.removeArenaCtrl(self)
        g_eventBus.removeListener(events.GameEvent.SHOW_EXTENDED_INFO, self.__handleShowExtendedInfo, scope=EVENT_BUS_SCOPE.BATTLE)
        ctrl = g_sessionProvider.shared.feedback
        if ctrl is not None:
            ctrl.onMinimapVehicleAdded -= self.__onMinimapVehicleAdded
            ctrl.onMinimapVehicleRemoved -= self.__onMinimapVehicleRemoved
            ctrl.onMinimapFeedbackReceived -= self.__onMinimapFeedbackReceived
        super(ArenaVehiclesPlugin, self).stop()
        return
Esempio n. 8
0
 def close(self, nextScope):
     if self.__dynSquadMsgController:
         g_sessionProvider.removeArenaCtrl(self.__dynSquadMsgController)
         self.__dynSquadMsgController.destroy()
         self.__dynSquadMsgController = None
     g_messengerEvents.channels.onMessageReceived -= self.__me_onMessageReceived
     g_messengerEvents.channels.onCommandReceived -= self.__me_onCommandReceived
     g_messengerEvents.users.onUserActionReceived -= self.__me_onUserActionReceived
     g_messengerEvents.onErrorReceived -= self.__me_onErrorReceived
     g_settings.onUserPreferencesUpdated -= self.__ms_onUserPreferencesUpdated
     g_settings.onColorsSchemesUpdated -= self.__ms_onColorsSchemesUpdated
     self.dispossessUI()
     self.__sharedHistory.clear()
     BattleChannelView.resetReceiver()
     self.__initialized = 0
     self.__focused = False
     if self.__channelsCtrl is not None:
         self.__channelsCtrl.clear()
         self.__channelsCtrl = None
     g_eventBus.removeListener(MessengerEvent.BATTLE_CHANNEL_CTRL_INITED, self.__handleChannelControllerInited, scope=EVENT_BUS_SCOPE.BATTLE)
     return
Esempio n. 9
0
    def stop(self):
        while self.__aoiToFarCallbacksIDs:
            _, callbackID = self.__aoiToFarCallbacksIDs.popitem()
            if callbackID is not None:
                BigWorld.cancelCallback(callbackID)

        while self.__destroyCallbacksIDs:
            _, callbackID = self.__destroyCallbacksIDs.popitem()
            if callbackID is not None:
                BigWorld.cancelCallback(callbackID)

        g_sessionProvider.removeArenaCtrl(self)
        g_eventBus.removeListener(events.GameEvent.SHOW_EXTENDED_INFO,
                                  self.__handleShowExtendedInfo,
                                  scope=EVENT_BUS_SCOPE.BATTLE)
        ctrl = g_sessionProvider.shared.feedback
        if ctrl is not None:
            ctrl.onMinimapVehicleAdded -= self.__onMinimapVehicleAdded
            ctrl.onMinimapVehicleRemoved -= self.__onMinimapVehicleRemoved
            ctrl.onMinimapFeedbackReceived -= self.__onMinimapFeedbackReceived
        super(ArenaVehiclesPlugin, self).stop()
        return
 def fini(self):
     """Clear control
     """
     if self._isBattleCtrlInit:
         g_sessionProvider.removeArenaCtrl(self)
Esempio n. 11
0
 def stop(self):
     g_sessionProvider.removeArenaCtrl(self.__arenaPeriodCtrl)
     self.__arenaPeriodCtrl.stopControl()
     self.__arenaPeriodCtrl.clearViewComponents()
Esempio n. 12
0
 def _dispose(self):
     Waiting.close()
     g_sessionProvider.removeArenaCtrl(self)
     if not BattleReplay.isPlaying():
         BigWorld.wg_enableGUIBackground(False, True)
     super(BattleLoading, self)._dispose()
Esempio n. 13
0
 def _dispose(self):
     Waiting.close()
     g_sessionProvider.removeArenaCtrl(self)
     if not BattleReplay.isPlaying():
         BigWorld.wg_enableGUIBackground(False, True)
     super(BattleLoading, self)._dispose()
Esempio n. 14
0
 def _dispose(self):
     Waiting.close()
     g_sessionProvider.removeArenaCtrl(self)
     super(BattleLoading, self)._dispose()
Esempio n. 15
0
 def beforeDelete(self):
     LOG_DEBUG('[Battle] beforeDelete')
     removeListener = g_eventBus.removeListener
     removeListener(events.GameEvent.HELP, self.toggleHelpWindow, scope=_SCOPE)
     removeListener(events.GameEvent.GUI_VISIBILITY, self.showAll, scope=_SCOPE)
     ctrl = g_sessionProvider.getVehicleStateCtrl()
     ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched
     player = BigWorld.player()
     if player and player.inputHandler:
         player.inputHandler.onPostmortemVehicleChanged -= self.onPostmortemVehicleChanged
         player.inputHandler.onCameraChanged -= self.onCameraChanged
     if self.colorManager:
         self.colorManager.dispossessUI()
     voice = VoiceChatInterface.g_instance
     if voice:
         voice.dispossessUI(self.proxy)
         voice.onPlayerSpeaking -= self.setPlayerSpeaking
         voice.onVoiceChatInitFailed -= self.onVoiceChatInitFailed
     if self.__plugins is not None:
         self.__plugins.stop()
         self.__plugins.fini()
         self.__plugins = None
     if self.movingText is not None:
         self.movingText.dispossessUI()
         self.movingText = None
     if self.__timerSound is not None:
         self.__timerSound.stop()
         self.__timerSound = None
     if self.__soundManager is not None:
         self.__soundManager.dispossessUI()
         self.__soundManager = None
     if self.colorManager is not None:
         self.colorManager.dispossessUI()
         self.colorManager = None
     if self.component:
         g_repeatKeyHandlers.discard(self.component.handleKeyEvent)
     g_settingsCore.onSettingsChanged -= self.__accs_onSettingsChanged
     g_settingsCore.interfaceScale.onScaleChanged -= self.__onRecreateDevice
     self.__timersBar.destroy()
     self.__teamBasesPanel.destroy()
     self.__debugPanel.destroy()
     self.__consumablesPanel.destroy()
     self.__damagePanel.destroy()
     self.__markersManager.destroy()
     self.__ingameHelp.destroy()
     self.__vErrorsPanel.destroy()
     self.__vMsgsPanel.destroy()
     self.__pMsgsPanel.destroy()
     self.__radialMenu.destroy()
     self.__minimap.destroy()
     self.__ribbonsPanel.destroy()
     self.__fragCorrelation.destroy()
     self.__statsForm.destroy()
     g_sessionProvider.clearBattleUI()
     if self.__arenaCtrl is not None:
         g_sessionProvider.removeArenaCtrl(self.__arenaCtrl)
         self.__arenaCtrl.clear()
         self.__arenaCtrl = None
     self.__ppSwitcher.destroy()
     self.__leftPlayersPanel.dispossessUI()
     self.__rightPlayersPanel.dispossessUI()
     MessengerEntry.g_instance.gui.invoke('dispossessUI')
     self.__arena = None
     g_guiResetters.discard(self.__onRecreateDevice)
     self.__settingsInterface.dispossessUI()
     self.__settingsInterface = None
     VoiceChatInterface.g_instance.onVoiceChatInitFailed -= self.onVoiceChatInitFailed
     if self.__dynSquadListener:
         self.__dynSquadListener.destroy()
         self.__dynSquadListener = None
     BattleWindow.beforeDelete(self)
     event = events.AppLifeCycleEvent
     g_eventBus.handleEvent(event(self.__ns, event.DESTROYED))
     return
Esempio n. 16
0
 def stop(self):
     g_sessionProvider.removeArenaCtrl(self)
     super(BattleSpaceEnv, self).stop()
Esempio n. 17
0
 def beforeDelete(self):
     LOG_DEBUG('[Battle] beforeDelete')
     removeListener = g_eventBus.removeListener
     removeListener(events.GameEvent.HELP, self.toggleHelpWindow, scope=_SCOPE)
     removeListener(events.GameEvent.GUI_VISIBILITY, self.showAll, scope=_SCOPE)
     ctrl = g_sessionProvider.getVehicleStateCtrl()
     ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
     ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched
     if self.colorManager:
         self.colorManager.dispossessUI()
     voice = VoiceChatInterface.g_instance
     if voice:
         voice.dispossessUI(self.proxy)
         voice.onPlayerSpeaking -= self.setPlayerSpeaking
         voice.onVoiceChatInitFailed -= self.onVoiceChatInitFailed
     if self.__plugins is not None:
         self.__plugins.stop()
         self.__plugins.fini()
         self.__plugins = None
     if self.movingText is not None:
         self.movingText.dispossessUI()
         self.movingText = None
     if self.__soundManager is not None:
         self.__soundManager.dispossessUI()
         self.__soundManager = None
     if self.colorManager is not None:
         self.colorManager.dispossessUI()
         self.colorManager = None
     if self.component:
         g_repeatKeyHandlers.discard(self.component.handleKeyEvent)
     g_settingsCore.onSettingsChanged -= self.__accs_onSettingsChanged
     g_settingsCore.interfaceScale.onScaleChanged -= self.__onRecreateDevice
     self.__timersBar.destroy()
     self.__teamBasesPanel.destroy()
     self.__debugPanel.destroy()
     self.__consumablesPanel.destroy()
     self.__damagePanel.destroy()
     self.__markersManager.destroy()
     self.__ingameHelp.destroy()
     self.__vErrorsPanel.destroy()
     self.__vMsgsPanel.destroy()
     self.__pMsgsPanel.destroy()
     self.__radialMenu.destroy()
     self.__minimap.destroy()
     self.__ribbonsPanel.destroy()
     self.__fragCorrelation.destroy()
     self.__statsForm.destroy()
     g_sessionProvider.clearBattleUI()
     if self.__arenaCtrl is not None:
         g_sessionProvider.removeArenaCtrl(self.__arenaCtrl)
         self.__arenaCtrl.clear()
         self.__arenaCtrl = None
     self.__ppSwitcher.destroy()
     self.__leftPlayersPanel.dispossessUI()
     self.__rightPlayersPanel.dispossessUI()
     MessengerEntry.g_instance.gui.invoke('dispossessUI')
     self.__arena = None
     g_guiResetters.discard(self.__onRecreateDevice)
     self.__settingsInterface.dispossessUI()
     self.__settingsInterface = None
     VoiceChatInterface.g_instance.onVoiceChatInitFailed -= self.onVoiceChatInitFailed
     if self.__dynSquadListener:
         self.__dynSquadListener.destroy()
         self.__dynSquadListener = None
     BattleWindow.beforeDelete(self)
     event = events.AppLifeCycleEvent
     g_eventBus.handleEvent(event(self.__ns, event.DESTROYED))
 def onAccountBecomePlayer(self):
     """Listener for event onAccountBecomePlayer
     """
     if self._isBattleCtrlInit:
         g_sessionProvider.removeArenaCtrl(self)
         self._isBattleCtrlInit = False
Esempio n. 19
0
 def stop(self):
     g_sessionProvider.removeArenaCtrl(self)
     super(BattleSpaceEnv, self).stop()
Esempio n. 20
0
 def beforeDelete(self):
     LOG_DEBUG('[Battle] beforeDelete')
     removeListener = g_eventBus.removeListener
     removeListener(events.GameEvent.HELP,
                    self.toggleHelpWindow,
                    scope=_SCOPE)
     removeListener(events.GameEvent.TOGGLE_GUI, self.showAll, scope=_SCOPE)
     ctrl = g_sessionProvider.shared.vehicleState
     if ctrl is not None:
         ctrl.onVehicleStateUpdated -= self.__onVehicleStateUpdated
         ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched
     player = BigWorld.player()
     if player and player.inputHandler:
         player.inputHandler.onPostmortemVehicleChanged -= self.onPostmortemVehicleChanged
         player.inputHandler.onCameraChanged -= self.onCameraChanged
     if self.colorManager:
         self.colorManager.dispossessUI()
     voice = g_messengerEvents.voip
     if voice:
         voice.onPlayerSpeaking -= self.setPlayerSpeaking
         voice.onVoiceChatInitFailed -= self.onVoiceChatInitFailed
     if self.__plugins is not None:
         self.__plugins.stop()
         self.__plugins.fini()
         self.__plugins = None
     if self.movingText is not None:
         self.movingText.dispossessUI()
         self.movingText = None
     if self.__timerSound is not None:
         self.__timerSound.stop()
         self.__timerSound = None
     if self.__soundManager is not None:
         self.__soundManager.dispossessUI()
         self.__soundManager = None
     if self.colorManager is not None:
         self.colorManager.dispossessUI()
         self.colorManager = None
     if self.component:
         g_repeatKeyHandlers.discard(self.component.handleKeyEvent)
     g_settingsCore.onSettingsChanged -= self.__accs_onSettingsChanged
     g_settingsCore.interfaceScale.onScaleChanged -= self.__onRecreateDevice
     self.__timersBar.destroy()
     self.__battleEndWarningPanel.destroy()
     self.__teamBasesPanel.destroy()
     self.__consumablesPanel.destroy()
     self.__damagePanel.destroy()
     self.__markersManager.destroy()
     self.__ingameHelp.destroy()
     self.__vErrorsPanel.destroy()
     self.__vMsgsPanel.destroy()
     self.__pMsgsPanel.destroy()
     self.__radialMenu.destroy()
     self.__minimap.destroy()
     self.__ribbonsPanel.destroy()
     self.__fragCorrelation.destroy()
     self.__statsForm.destroy()
     self.__damageInfoPanel.destroy()
     remove = g_sessionProvider.removeViewComponent
     remove('legacy/hitDirection')
     remove('legacy/teamBasesPanel')
     remove('legacy/debugPanel')
     remove('legacy/battleTimer')
     remove('legacy/prebattleTimer')
     remove('legacy/ppSwitcher')
     if self.__arenaCtrl is not None:
         g_sessionProvider.removeArenaCtrl(self.__arenaCtrl)
         self.__arenaCtrl = None
     self.__ppSwitcher.destroy()
     self.__debugPanel.dispossessUI()
     self.__leftPlayersPanel.dispossessUI()
     self.__rightPlayersPanel.dispossessUI()
     MessengerEntry.g_instance.gui.invoke('dispossessUI')
     self.__arena = None
     self.__denunciator = None
     g_guiResetters.discard(self.__onRecreateDevice)
     self.__settingsInterface.dispossessUI()
     self.__settingsInterface = None
     if self.__dynSquadListener:
         self.__dynSquadListener.destroy()
         self.__dynSquadListener = None
     if self.__crosshairPanel is not None:
         self.__crosshairPanel.close()
         self.__crosshairPanel = None
     BattleWindow.beforeDelete(self)
     event = events.AppLifeCycleEvent
     g_eventBus.handleEvent(event(self.__ns, event.DESTROYED))
     return