Пример #1
0
 def __del__(self):
     LOG_DEBUG('PlayersPanelsSwitcher is deleted')
Пример #2
0
 def stopVideo(self):
     if self.__movieFiles:
         self.__showNextMovie()
         return
     LOG_DEBUG('Startup Videos has been played: STOP')
     self.__sendResult(True)
Пример #3
0
 def reset(self):
     LOG_DEBUG('OfflineMapCreator.reset()')
     self.destroy()
     self.__isActive = True
Пример #4
0
 def setSetting(self, key, value):
     self.__settings.write(key, base64.b64encode(pickle.dumps(value)))
     diff = {key: value}
     LOG_DEBUG('Applying REPLAY settings: ', diff)
     self.settingsCore.onSettingsChanged(diff)
 def __onViewPoints(self, argStr):
     self.__viewPoints = cPickle.loads(zlib.decompress(argStr))
     LOG_DEBUG('[VIEW POINTS] received view points', self.__viewPoints)
     self.onViewPoints(self.__viewPoints)
Пример #6
0
 def __del__(self):
     LOG_DEBUG('Channel carousel deleted:', id(self))
Пример #7
0
 def _request(self, callback):
     LOG_DEBUG('Make server request to pawn quest', self.__quest)
     BigWorld.player().pawnFreeAwardList(
         self.__quest.getType(), self.__quest.getID(),
         lambda code: self._response(code, callback))
Пример #8
0
 def __del__(self):
     LOG_DEBUG('Units list requester deleted:', self)
Пример #9
0
 def __onUserCredentials(self, data):
     LOG_DEBUG('__onUserCredentials', data['data'][0], data['data'][1])
     self.channelsMgr.login(data['data'][0], data['data'][1])
     BigWorld.player().requestUsersRoster(USERS_ROSTER_VOICE_MUTED)
Пример #10
0
 def __init__(self):
     BigWorld.UserDataObject.__init__(self)
     LOG_DEBUG('FlagSpawnPoint ', self.position)
 def removeTimer(self, typeID):
     if typeID in self._timers:
         LOG_DEBUG('Removes timer', typeID)
         timer = self._timers.pop(typeID)
         timer.hide()
Пример #12
0
def _return(value):
    LOG_DEBUG('Async return, value: {0}'.format(value))
    raise ReturnValueException(value)
Пример #13
0
 def callback(self, value):
     LOG_DEBUG('Promise::callback: {0}, {1}, {2}'.format(
         self, self.__callback, value))
     self.__result = value
     if callable(self.__callback):
         self.__callback(value)
Пример #14
0
 def __del__(self):
     LOG_DEBUG('Deleted:', self)
Пример #15
0
 def onProcessVivoxTest(self, callbackId, isStart):
     LOG_DEBUG('Vivox test: %s' % str(isStart))
     import VOIP
     rh = VOIP.getVOIPManager()
     rh.enterTestChannel() if isStart else rh.leaveTestChannel()
     self.respond([callbackId, False])
Пример #16
0
 def setMicMute(self, muted=True):
     cmd = {}
     cmd[constants.KEY_COMMAND] = 'mute_mic'
     cmd[constants.KEY_STATE] = str(muted)
     BigWorld.VOIP.command(cmd)
     LOG_DEBUG('mute_mic: %s' % str(muted))
Пример #17
0
    def __getSettings(self):
        settings = [self.graphicsPresets.getGraphicsPresetsData()]
        import VOIP
        rh = VOIP.getVOIPManager()
        g_windowsStoredData.start()
        vManager = VibroManager.g_instance
        vEffGroups = vManager.getGroupsSettings()
        vEffDefGroup = VibroManager.VibroManager.GroupSettings()
        vEffDefGroup.enabled = False
        vEffDefGroup.gain = 0
        markers = {
            'enemy': g_settingsCore.getSetting('enemy'),
            'dead': g_settingsCore.getSetting('dead'),
            'ally': g_settingsCore.getSetting('ally')
        }
        config = {
            'locale':
            getClientOverride(),
            'aspectRatio': {
                'current': self.resolutions.aspectRatioIndex,
                'options': self.resolutions.aspectRatiosList
            },
            'vertSync':
            self.resolutions.isVideoVSync,
            'tripleBuffered':
            self.resolutions.isTripleBuffered,
            'multisampling': {
                'current': self.resolutions.multisamplingTypeIndex,
                'options': self.resolutions.multisamplingTypesList
            },
            'customAA': {
                'current': self.resolutions.customAAModeIndex,
                'options': self.resolutions.customAAModesList
            },
            'gamma':
            self.resolutions.gamma,
            'masterVolume':
            round(SoundGroups.g_instance.getMasterVolume() * 100),
            'musicVolume':
            round(SoundGroups.g_instance.getVolume('music') * 100),
            'voiceVolume':
            round(SoundGroups.g_instance.getVolume('voice') * 100),
            'vehiclesVolume':
            round(SoundGroups.g_instance.getVolume('vehicles') * 100),
            'effectsVolume':
            round(SoundGroups.g_instance.getVolume('effects') * 100),
            'guiVolume':
            round(SoundGroups.g_instance.getVolume('gui') * 100),
            'ambientVolume':
            round(SoundGroups.g_instance.getVolume('ambient') * 100),
            'masterVivoxVolume':
            round(SoundGroups.g_instance.getVolume('masterVivox') * 100),
            'micVivoxVolume':
            round(SoundGroups.g_instance.getVolume('micVivox') * 100),
            'masterFadeVivoxVolume':
            round(SoundGroups.g_instance.getVolume('masterFadeVivox') * 100),
            'captureDevice':
            self.__getCaptureDeviceSettings(),
            'voiceChatNotSupported':
            rh.vivoxDomain == '' or not VoiceChatInterface.g_instance.ready,
            'datetimeIdx':
            g_settingsCore.serverSettings.getGameSetting('datetimeIdx', 2),
            'enableOlFilter':
            g_settingsCore.getSetting('enableOlFilter'),
            'enableSpamFilter':
            g_settingsCore.getSetting('enableSpamFilter'),
            'enableStoreChatMws':
            g_settingsCore.getSetting('enableStoreMws'),
            'enableStoreChatCws':
            g_settingsCore.getSetting('enableStoreCws'),
            'invitesFromFriendsOnly':
            g_settingsCore.getSetting('invitesFromFriendsOnly'),
            'storeReceiverInBattle':
            g_settingsCore.getSetting('storeReceiverInBattle'),
            'dynamicCamera':
            g_settingsCore.getSetting('dynamicCamera'),
            'horStabilizationSnp':
            g_settingsCore.getSetting('horStabilizationSnp'),
            'enableVoIP':
            VOIP.getVOIPManager().channelsMgr.enabled,
            'enablePostMortemEffect':
            g_settingsCore.getSetting('enablePostMortemEffect'),
            'nationalVoices':
            AccountSettings.getSettings('nationalVoices'),
            'isColorBlind':
            AccountSettings.getSettings('isColorBlind'),
            'useServerAim':
            g_settingsCore.getSetting('useServerAim'),
            'showVehiclesCounter':
            g_settingsCore.getSetting('showVehiclesCounter'),
            'minimapAlpha':
            g_settingsCore.getSetting('minimapAlpha'),
            'vibroIsConnected':
            vManager.connect(),
            'vibroGain':
            vManager.getGain() * 100,
            'vibroEngine':
            vEffGroups.get('engine', vEffDefGroup).gain * 100,
            'vibroAcceleration':
            vEffGroups.get('acceleration', vEffDefGroup).gain * 100,
            'vibroShots':
            vEffGroups.get('shots', vEffDefGroup).gain * 100,
            'vibroHits':
            vEffGroups.get('hits', vEffDefGroup).gain * 100,
            'vibroCollisions':
            vEffGroups.get('collisions', vEffDefGroup).gain * 100,
            'vibroDamage':
            vEffGroups.get('damage', vEffDefGroup).gain * 100,
            'vibroGUI':
            vEffGroups.get('gui', vEffDefGroup).gain * 100,
            'ppShowLevels':
            g_settingsCore.getSetting('ppShowLevels'),
            'ppShowTypes':
            AccountSettings.getSettings('players_panel')['showTypes'],
            'replayEnabled':
            g_settingsCore.getSetting('replayEnabled'),
            'fpsPerfomancer':
            g_settingsCore.getSetting('fpsPerfomancer'),
            'arcade': {
                'values':
                g_settingsCore.options.getSetting(
                    'arcade').toAccountSettings(),
                'options':
                SettingsInterface.CURSOR_VALUES
            },
            'sniper': {
                'values':
                g_settingsCore.options.getSetting(
                    'sniper').toAccountSettings(),
                'options':
                SettingsInterface.SNIPER_VALUES
            },
            'markers': {
                'values': markers,
                'options': SettingsInterface.MARKER_VALUES,
                'types': SettingsInterface.MARKER_TYPES
            }
        }
        if self.__altVoiceSetting.isOptionEnabled():
            altVoices = []
            for idx, desc in enumerate(self.__altVoiceSetting.getOptions()):
                altVoices.append({'data': idx, 'label': desc})

            config['alternativeVoices'] = {
                'current': self.__altVoiceSetting.get(),
                'options': altVoices
            }
        gameplayMask = gameplay_ctx.getMask()
        for name in ArenaType.g_gameplayNames:
            key = self.GAMEPLAY_KEY_FORMAT.format(name)
            bit = ArenaType.getVisibilityMask(
                ArenaType.getGameplayIDForName(name))
            config[key] = gameplayMask & bit > 0

        settings.append(config)
        if not LogitechMonitor.isPresentColor():
            if self.KEYBOARD_MAPPING_BLOCKS.has_key('logitech_keyboard'):
                del self.KEYBOARD_MAPPING_BLOCKS['logitech_keyboard']
        else:
            self.KEYBOARD_MAPPING_BLOCKS['logitech_keyboard'] = (
                'switch_view', )
        cmdMap = CommandMapping.g_instance
        defaults = cmdMap.getDefaults()
        keyboard = []
        for group_name in self.KEYBOARD_MAPPING_BLOCKS_ORDER:
            if group_name in self.KEYBOARD_MAPPING_BLOCKS.keys():
                group = {'id': group_name, 'commands': []}
                keyboard.append(group)
                for key_setting in self.KEYBOARD_MAPPING_BLOCKS[group_name]:
                    command = cmdMap.getCommand(
                        self.KEYBOARD_MAPPING_COMMANDS[group_name]
                        [key_setting])
                    keyCode = cmdMap.get(
                        self.KEYBOARD_MAPPING_COMMANDS[group_name]
                        [key_setting])
                    defaultCode = defaults[command] if defaults.has_key(
                        command) else 0
                    key = {
                        'id': key_setting,
                        'command': command,
                        'key': getScaleformKey(keyCode),
                        'keyDefault': getScaleformKey(defaultCode)
                    }
                    group['commands'].append(key)

        settings.append(keyboard)
        mouse = {}
        player = BigWorld.player()
        if hasattr(player.inputHandler, 'ctrls'):
            for key, path in SettingsInterface.MOUSE_KEYS['ingame'].items():
                if key == 'horInvert':
                    value = g_settingsCore.getSetting('mouseHorzInvert')
                elif key == 'vertInvert':
                    value = g_settingsCore.getSetting('mouseVertInvert')
                elif key == 'backDraftInvert':
                    value = g_settingsCore.getSetting('backDraftInvert')
                else:
                    value = player.inputHandler.ctrls[
                        path[0]].camera.getUserConfigValue(path[1])
                mouse[key] = {
                    'defaultValue':
                    SettingsInterface.MOUSE_KEYS['default'][key],
                    'value': value
                }

        else:
            ds = Settings.g_instance.userPrefs[Settings.KEY_CONTROL_MODE]
            for key, path in SettingsInterface.MOUSE_KEYS['lobby'].items():
                default = SettingsInterface.MOUSE_KEYS['default'][key]
                value = default
                if key == 'horInvert':
                    value = g_settingsCore.getSetting('mouseHorzInvert')
                elif key == 'vertInvert':
                    value = g_settingsCore.getSetting('mouseVertInvert')
                elif key == 'backDraftInvert':
                    value = g_settingsCore.getSetting('backDraftInvert')
                elif ds is not None:
                    if path[2] == 'float':
                        value = ds[path[0]].readFloat(path[1], default)
                    elif path[2] == 'bool':
                        value = ds[path[0]].readBool(path[1], default)
                    else:
                        LOG_DEBUG('Unknown mouse settings type %s %s' %
                                  (key, path))
                mouse[key] = {'defaultValue': default, 'value': value}

        settings.append(mouse)
        g_windowsStoredData.stop()
        return settings
Пример #18
0
 def __onChatActionMute(self, dbid, muted):
     LOG_DEBUG('__onChatActionMute', dbid, muted)
     self.usersRoster[dbid] = muted
     if dbid in self.channelUsers and self.channelUsers[dbid][
             'muted'] != muted:
         self.__muteParticipantForMe(dbid, muted)
 def hideBootcampHint(self, componentID):
     if not self._validate(componentID):
         return
     LOG_DEBUG('hideBootcampHint', componentID)
     self.__doHideEffect(componentID, _EFFECT_TYPES.BOOTCAMP_HINT)
Пример #20
0
 def _doQueue(self, ctx):
     BigWorld.player().enqueueBattleRoyale(ctx.getVehicleInventoryID())
     LOG_DEBUG('Sends request on queuing to the Battle Royale', ctx)
Пример #21
0
 def onClientReady(self):
     if not (self.isPlaying or self.isRecording):
         return
     elif self.isRecording and BigWorld.player(
     ).arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
         self.stop(None, True)
         return
     else:
         self.__replayCtrl.playerVehicleID = BigWorld.player(
         ).playerVehicleID
         self.__replayCtrl.onClientReady()
         if self.isPlaying:
             AreaDestructibles.g_destructiblesManager.onAfterReplayTimeWarp(
             )
             if isPlayerAvatar():
                 BigWorld.player(
                 ).onVehicleEnterWorld += self.__onVehicleEnterWorld
         if self.isRecording:
             player = BigWorld.player()
             arena = player.arena
             arenaName = arena.arenaType.geometry
             i = arenaName.find('/')
             if i != -1:
                 arenaName = arenaName[i + 1:]
             now = datetime.datetime.now()
             now = '%02d.%02d.%04d %02d:%02d:%02d' % (
                 now.day, now.month, now.year, now.hour, now.minute,
                 now.second)
             vehicleName = BigWorld.entities[
                 player.playerVehicleID].typeDescriptor.name
             vehicleName = vehicleName.replace(':', '-')
             vehicles = self.__getArenaVehiclesInfo()
             gameplayID = player.arenaTypeID >> 16
             clientVersionFromXml = getFullClientVersion()
             clientVersionFromExe = BigWorld.wg_getProductVersion()
             arenaInfo = {
                 'dateTime': now,
                 'playerName': player.name,
                 'playerID': self.__playerDatabaseID,
                 'playerVehicle': vehicleName,
                 'mapName': arenaName,
                 'mapDisplayName': arena.arenaType.name,
                 'gameplayID': ArenaType.getGameplayName(gameplayID)
                 or gameplayID,
                 'vehicles': vehicles,
                 'battleType': arena.bonusType,
                 'clientVersionFromExe': clientVersionFromExe,
                 'clientVersionFromXml': clientVersionFromXml,
                 'serverName': self.connectionMgr.serverUserName,
                 'regionCode': constants.AUTH_REALM,
                 'serverSettings': self.__serverSettings,
                 'hasMods': self.__replayCtrl.hasMods
             }
             if self.isRecording and BigWorld.player(
             ).arena.guiType == constants.ARENA_GUI_TYPE.BOOTCAMP:
                 from bootcamp.Bootcamp import g_bootcamp
                 arenaInfo['lessonId'] = g_bootcamp.getLessonNum()
             self.__replayCtrl.recMapName = arenaName
             self.__replayCtrl.recPlayerVehicleName = vehicleName
             self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
         else:
             self.__showInfoMessages()
             if self.replayTimeout > 0:
                 LOG_DEBUG('replayTimeout set for %.2f' %
                           float(self.replayTimeout))
                 BigWorld.callback(float(self.replayTimeout), BigWorld.quit)
         return
Пример #22
0
 def _doDequeue(self, ctx):
     BigWorld.player().dequeueBattleRoyale()
     LOG_DEBUG('Sends request on dequeuing from the Battle Royale')
def _initializeDefaultSettings(core, data, initialized):
    LOG_DEBUG('Initializing server settings.')
    from account_helpers.counter_settings import dropCounters as dropNewSettingsCounters
    from account_helpers.AccountSettings import AccountSettings
    options = core.options
    gameData = data['gameData'] = {
        GAME.DATE_TIME_MESSAGE_INDEX:
        2,
        GAME.ENABLE_OL_FILTER:
        options.getSetting(GAME.ENABLE_OL_FILTER).getDefaultValue(),
        GAME.ENABLE_SPAM_FILTER:
        options.getSetting(GAME.ENABLE_SPAM_FILTER).getDefaultValue(),
        GAME.INVITES_FROM_FRIENDS:
        options.getSetting(GAME.INVITES_FROM_FRIENDS).getDefaultValue(),
        GAME.RECEIVE_FRIENDSHIP_REQUEST:
        core.options.getSetting(
            GAME.RECEIVE_FRIENDSHIP_REQUEST).getDefaultValue(),
        GAME.STORE_RECEIVER_IN_BATTLE:
        core.options.getSetting(
            GAME.STORE_RECEIVER_IN_BATTLE).getDefaultValue(),
        GAME.REPLAY_ENABLED:
        core.getSetting(GAME.REPLAY_ENABLED),
        GAME.ENABLE_SERVER_AIM:
        core.getSetting(GAME.ENABLE_SERVER_AIM),
        GAME.SHOW_DAMAGE_ICON:
        core.getSetting(GAME.SHOW_DAMAGE_ICON),
        GAME.SHOW_VEHICLES_COUNTER:
        core.getSetting(GAME.SHOW_VEHICLES_COUNTER),
        GAME.MINIMAP_ALPHA:
        core.getSetting(GAME.MINIMAP_ALPHA),
        GAME.PLAYERS_PANELS_SHOW_LEVELS:
        core.getSetting(GAME.PLAYERS_PANELS_SHOW_LEVELS)
    }
    data['gameExtData'] = {
        GAME.CHAT_CONTACTS_LIST_ONLY:
        options.getSetting(GAME.CHAT_CONTACTS_LIST_ONLY).getDefaultValue(),
        GAME.SNIPER_ZOOM:
        core.getSetting(GAME.SNIPER_ZOOM),
        GAME.HULLLOCK_ENABLED:
        core.getSetting(GAME.HULLLOCK_ENABLED),
        GAME.PRE_COMMANDER_CAM:
        core.getSetting(GAME.PRE_COMMANDER_CAM),
        GAME.COMMANDER_CAM:
        core.getSetting(GAME.COMMANDER_CAM)
    }
    gameplayData = data['gameplayData'] = {
        GAME.GAMEPLAY_MASK: AccountSettings.getSettingsDefault('gameplayMask')
    }
    aimData = data['aimData'] = {
        'arcade': core.getSetting('arcade'),
        'sniper': core.getSetting('sniper')
    }
    controlsData = data['controlsData'] = {
        CONTROLS.MOUSE_HORZ_INVERSION:
        core.getSetting(CONTROLS.MOUSE_HORZ_INVERSION),
        CONTROLS.MOUSE_VERT_INVERSION:
        core.getSetting(CONTROLS.MOUSE_VERT_INVERSION),
        CONTROLS.BACK_DRAFT_INVERSION:
        core.getSetting(CONTROLS.BACK_DRAFT_INVERSION)
    }
    igrCtrl = dependency.instance(IIGRController)
    if igrCtrl.getRoomType() == constants.IGR_TYPE.NONE:
        import Settings
        section = Settings.g_instance.userPrefs
        if section.has_key(Settings.KEY_MESSENGER_PREFERENCES):
            subSec = section[Settings.KEY_MESSENGER_PREFERENCES]
            tags = subSec.keys()
            _userProps = {
                GAME.DATE_TIME_MESSAGE_INDEX: 'readInt',
                GAME.ENABLE_OL_FILTER: 'readBool',
                GAME.ENABLE_SPAM_FILTER: 'readBool',
                GAME.INVITES_FROM_FRIENDS: 'readBool',
                GAME.RECEIVE_FRIENDSHIP_REQUEST: 'readBool',
                GAME.RECEIVE_INVITES_IN_BATTLE: 'readBool',
                GAME.STORE_RECEIVER_IN_BATTLE: 'readBool',
                GAME.CHAT_CONTACTS_LIST_ONLY: 'readBool'
            }
            for key, reader in _userProps.iteritems():
                if key in tags:
                    gameData[key] = getattr(subSec, reader)(key)

        try:
            value = section['replayPrefs'].readBool('enabled', None)
            if value:
                gameData[GAME.REPLAY_ENABLED] = 2
            elif value is not None:
                gameData[GAME.REPLAY_ENABLED] = 0
        except Exception:
            LOG_DEBUG('Replay preferences is not available.')

        gameData[GAME.ENABLE_SERVER_AIM] = AccountSettings.getSettings(
            'useServerAim')
        gameData[GAME.SHOW_VEHICLES_COUNTER] = AccountSettings.getSettings(
            'showVehiclesCounter')
        gameData[GAME.MINIMAP_ALPHA] = AccountSettings.getSettings(
            'minimapAlpha')
        gameData[
            GAME.PLAYERS_PANELS_SHOW_LEVELS] = AccountSettings.getSettings(
                'players_panel')['showLevels']
        gameplayData[GAME.GAMEPLAY_MASK] = AccountSettings.getSettings(
            'gameplayMask')
        arcade = AccountSettings.getSettings('arcade')
        sniper = AccountSettings.getSettings('sniper')
        aimData['arcade'] = core.options.getSetting(
            'arcade').fromAccountSettings(arcade)
        aimData['sniper'] = core.options.getSetting(
            'sniper').fromAccountSettings(sniper)
        if section.has_key(Settings.KEY_CONTROL_MODE):
            ds = section[Settings.KEY_CONTROL_MODE]
            try:
                controlsData[
                    CONTROLS.MOUSE_HORZ_INVERSION] = ds['arcadeMode'].readBool(
                        'horzInvert', False)
                controlsData[
                    CONTROLS.MOUSE_VERT_INVERSION] = ds['arcadeMode'].readBool(
                        'vertInvert', False)
                controlsData[
                    CONTROLS.MOUSE_VERT_INVERSION] = ds['arcadeMode'].readBool(
                        'backDraftInvert', False)
            except Exception:
                LOG_DEBUG('Controls preferences is not available.')

    data['markersData'] = AccountSettings.getSettings('markers')
    data['graphicsData'] = {
        GAME.LENS_EFFECT: core.getSetting(GAME.LENS_EFFECT)
    }
    data['marksOnGun'] = {
        GAME.SHOW_MARKS_ON_GUN: core.getSetting(GAME.SHOW_MARKS_ON_GUN)
    }
    dropNewSettingsCounters()
    return
Пример #24
0
    def set(self, serverSettings):
        self.__serverSettings = copy.deepcopy(
            serverSettings) if serverSettings else {}
        if 'roaming' in self.__serverSettings:
            roamingSettings = self.__serverSettings['roaming']
            self.__roamingSettings = RoamingSettings(
                roamingSettings[0], roamingSettings[1],
                [_ServerInfo(*s) for s in roamingSettings[2]])
        if 'file_server' in self.__serverSettings:
            self.__fileServerSettings = _FileServerSettings(
                self.__serverSettings['file_server'])
        if 'regional_settings' in self.__serverSettings:
            self.__regionalSettings = makeTupleByDict(
                _RegionalSettings, self.__serverSettings['regional_settings'])
        try:
            self.__eSportCurrentSeason = makeTupleByDict(
                _ESportCurrentSeason, self.__serverSettings)
        except TypeError:
            self.__eSportCurrentSeason = _ESportCurrentSeason.defaults()

        if 'wgcg' in self.__serverSettings:
            self.__updateWgcg(self.__serverSettings)
        if 'clanProfile' in self.__serverSettings:
            self.__updateClanProfile(self.__serverSettings)
        if 'spgRedesignFeatures' in self.__serverSettings:
            self.__spgRedesignFeatures = makeTupleByDict(
                _SpgRedesignFeatures,
                self.__serverSettings['spgRedesignFeatures'])
        if 'strongholdSettings' in self.__serverSettings:
            settings = self.__serverSettings['strongholdSettings']
            self.__strongholdSettings = _StrongholdSettings(
                settings.get('wgshHostUrl', ''))
        if 'tournamentSettings' in self.__serverSettings:
            settings = self.__serverSettings['tournamentSettings']
            self.__tournamentSettings = _TournamentSettings(
                settings.get('tmsHostUrl', ''))
        if 'frontlineSettings' in self.__serverSettings:
            settings = self.__serverSettings['frontlineSettings']
            self.__frontlineSettings = _FrontlineSettings(
                settings.get('flHostUrl', ''),
                settings.get('isEpicTrainingEnabled', False))
        if 'rankedBattles' in self.__serverSettings:
            self.__bwRankedBattles = makeTupleByDict(
                _BwRankedBattles, self.__serverSettings['rankedBattles'])
        if 'hallOfFame' in self.__serverSettings:
            self.__bwHallOfFame = makeTupleByDict(
                _BwHallOfFame, self.__serverSettings['hallOfFame'])
        if 'shop' in self.__serverSettings:
            self.__bwShop = makeTupleByDict(_BwShop,
                                            self.__serverSettings['shop'])
        if 'ranked_config' in self.__serverSettings:
            self.__rankedBattlesSettings = makeTupleByDict(
                _RankedBattlesConfig, self.__serverSettings['ranked_config'])
        if 'event_progression_config' in self.__serverSettings:
            self.__eventProgressionSettings = makeTupleByDict(
                _EventProgressionConfig,
                self.__serverSettings['event_progression_config'])
        if 'advent_calendar_config' in self.__serverSettings:
            self.__adventCalendar = makeTupleByDict(
                _AdventCalendarConfig,
                self.__serverSettings['advent_calendar_config'])
        if 'epic_config' in self.__serverSettings:
            LOG_DEBUG('epic_config', self.__serverSettings['epic_config'])
            self.__epicMetaGameSettings = makeTupleByDict(
                _EpicMetaGameConfig,
                self.__serverSettings['epic_config']['epicMetaGame'])
            self.__epicGameSettings = makeTupleByDict(
                _EpicGameConfig, self.__serverSettings['epic_config'])
        if PremiumConfigs.PREM_SQUAD in self.__serverSettings:
            self.__squadPremiumBonus = _SquadPremiumBonus.create(
                self.__serverSettings[PremiumConfigs.PREM_SQUAD])
        if Configs.BATTLE_ROYALE_CONFIG.value in self.__serverSettings:
            LOG_DEBUG(
                'battle_royale_config',
                self.__serverSettings[Configs.BATTLE_ROYALE_CONFIG.value])
            self.__battleRoyaleSettings = makeTupleByDict(
                _BattleRoyaleConfig,
                self.__serverSettings[Configs.BATTLE_ROYALE_CONFIG.value])
        else:
            self.__battleRoyaleSettings = _BattleRoyaleConfig.defaults()
        if 'telecom_config' in self.__serverSettings:
            self.__telecomConfig = _TelecomConfig(
                self.__serverSettings['telecom_config'])
        if 'blueprints_config' in self.__serverSettings:
            self.__blueprintsConfig = makeTupleByDict(
                _BlueprintsConfig, self.__serverSettings['blueprints_config'])
        else:
            self.__blueprintsConfig = _BlueprintsConfig.defaults()
        if 'progressive_reward_config' in self.__serverSettings:
            self.__progressiveReward = makeTupleByDict(
                _ProgressiveReward,
                self.__serverSettings['progressive_reward_config'])
        else:
            self.__progressiveReward = _ProgressiveReward()
        if 'seniority_awards_config' in self.__serverSettings:
            self.__seniorityAwardsConfig = makeTupleByDict(
                _SeniorityAwardsConfig,
                self.__serverSettings['seniority_awards_config'])
        else:
            self.__seniorityAwardsConfig = _SeniorityAwardsConfig()
        if BATTLE_PASS_CONFIG_NAME in self.__serverSettings:
            self.__battlePassConfig = BattlePassConfig(
                self.__serverSettings.get(BATTLE_PASS_CONFIG_NAME, {}))
        else:
            self.__battlePassConfig = BattlePassConfig({})
        if _crystalRewardsConfig.CONFIG_NAME in self.__serverSettings:
            self.__crystalRewardsConfig = makeTupleByDict(
                _crystalRewardsConfig,
                self.__serverSettings[_crystalRewardsConfig.CONFIG_NAME])
        self.onServerSettingsChange(serverSettings)
 def suspend(self):
     LOG_DEBUG('Listeners collection was suspended: ', self)
     self._isSuspended = True
Пример #26
0
 def _populate(self):
     super(FortClanStatisticsWindow, self)._populate()
     LOG_DEBUG('FortClanStatisticsWindow | _populate', self.data.getData())
     self.as_setDataS(self.data.getData())