# 2013.11.15 11:26:46 EST # Embedded file name: scripts/client/gui/Scaleform/VoiceChatInterface.py import BigWorld, Settings, constants, Event import BattleReplay from adisp import async from enumerations import Enumeration from windows import UIInterface from debug_utils import * from chat_shared import CHAT_ACTIONS from ChatManager import chatManager from gui import GUI_SETTINGS VC_STATES = Enumeration('Voice chat states enumeration', ['NotInitialized', 'Initialized', 'Failed']) class _VoiceChatInterface(UIInterface): onVoiceChatInitFailed = Event.Event() onVoiceChatInitSucceded = Event.Event() onPlayerSpeaking = Event.Event() def __init__(self): UIInterface.__init__(self) self.__initializationTimoutCallback = None self.__state = VC_STATES.NotInitialized self.__failedEventRaised = False self.__callback = None return def reset(self): self.__failedEventRaised = False
EXTRA_SUFFIX = 'Health' EXTRA_PREFIX_LENGTH = len(EXTRA_SUFFIX) def makeExtraName(entityName): return ''.join([entityName, EXTRA_SUFFIX]) PLAYER_GUI_PROPS = Enumeration('Gui properties for entity', [('ally', { 'isFriend': True, 'base': 'ally' }), ('teamKiller', { 'isFriend': True, 'base': 'ally' }), ('squadman', { 'isFriend': True, 'base': 'ally' }), ('enemy', { 'isFriend': False, 'base': 'enemy' })], instance=AttributeEnumItem) VEHICLE_WAINING_INTERVAL = 0.05 VEHICLE_UPDATE_INTERVAL = 0.03 class FEEDBACK_EVENT_ID(object): PLAYER_KILLED_ENEMY, PLAYER_DAMAGED_HP_ENEMY, PLAYER_DAMAGED_DEVICE_ENEMY, PLAYER_SPOTTED_ENEMY, PLAYER_ASSIST_TO_KILL_ENEMY, PLAYER_ASSIST_TO_STUN_ENEMY, PLAYER_USED_ARMOR, PLAYER_CAPTURED_BASE, PLAYER_DROPPED_CAPTURE, PLAYER_BLOCKED_CAPTURE, PLAYER_STUN_ENEMIES, VEHICLE_HEALTH, VEHICLE_HIT, VEHICLE_CRITICAL_HIT, VEHICLE_CRITICAL_HIT_DAMAGE, VEHICLE_CRITICAL_HIT_CHASSIS, VEHICLE_CRITICAL_HIT_CHASSIS_PIERCED, VEHICLE_RICOCHET, VEHICLE_ARMOR_PIERCED, VEHICLE_DEAD, VEHICLE_SHOW_MARKER, VEHICLE_ATTRS_CHANGED, ENTITY_IN_FOCUS, VEHICLE_HAS_AMMO, SHOW_VEHICLE_DAMAGES_DEVICES, HIDE_VEHICLE_DAMAGES_DEVICES, MINIMAP_SHOW_MARKER, MINIMAP_MARK_CELL, DAMAGE_LOG_SUMMARY, POSTMORTEM_SUMMARY, ENEMY_DAMAGED_HP_PLAYER, ENEMY_DAMAGED_DEVICE_PLAYER, VEHICLE_VISIBILITY_CHANGED, VEHICLE_STUN, VEHICLE_DEBUFF, VEHICLE_INSPIRE, VEHICLE_HEAL_POINT, VEHICLE_PASSIVE_ENGINEERING, VEHICLE_REPAIR_POINT, MINIMAP_MARK_POSITION, MINIMAP_MARK_OBJECTIVE, MINIMAP_MARK_BASE, ENEMY_SECTOR_CAPTURED, DESTRUCTIBLE_DAMAGED, DESTRUCTIBLE_DESTROYED, DESTRUCTIBLES_DEFENDED, DEFENDER_BONUS, SMOKE_ASSIST, INSPIRE_ASSIST, VEHICLE_RECOVERY_STATE_UPDATE, VEHICLE_RECOVERY_CANCELED, VEHICLE_RECOVERY_KEY_PRESSED, VEHICLE_ACTIVE_GUN_CHANGED, VEHICLE_SHOW_MESSAGE, VEHICLE_DETECTED, EQUIPMENT_TIMER_EXPIRED, VEHICLE_ARMOR_SCREEN_BLOCKED, VEHICLE_TRACK_BLOCKED, VEHICLE_WHEEL_BLOCKED, VEHICLE_ARMOR_MISSED, VEHICLE_FRONTLINE_STEALTH_RADAR_ACTIVE, VEHICLE_FRONTLINE_REGENERATION_KIT_ACTIVE = range( 1, 63)
# Embedded file name: scripts/client/gui/game_control/AOGAS.py import Event import BigWorld import time import weakref from constants import AOGAS_TIME, ACCOUNT_ATTR from debug_utils import LOG_ERROR, LOG_DEBUG from enumerations import AttributeEnumItem, Enumeration from gui.game_control.controllers import Controller from helpers import time_utils TIME_MODIFER = 3600 AOGAS_FORCE_START_NOTIFY = False _DEFAULT_AOGAS_NOTIFY_TIMEOUT = 5000.0 AOGAS_NOTIFY_MSG = Enumeration('Notification message for Anti-online game addiction system', [('AOND_1', {'timeout': _DEFAULT_AOGAS_NOTIFY_TIMEOUT}), ('AOND_2', {'timeout': _DEFAULT_AOGAS_NOTIFY_TIMEOUT}), ('AOND_3', {'timeout': _DEFAULT_AOGAS_NOTIFY_TIMEOUT}), ('AOND_MORE_3', {'timeout': _DEFAULT_AOGAS_NOTIFY_TIMEOUT}), ('AOND_MORE_5', {'timeout': _DEFAULT_AOGAS_NOTIFY_TIMEOUT}), ('RESET', {'timeout': _DEFAULT_AOGAS_NOTIFY_TIMEOUT})], instance=AttributeEnumItem) class AOGAS_NOTIFY_TIME(object): AOND_1 = 1 * TIME_MODIFER - 600 AOND_2 = 2 * TIME_MODIFER - 600 AOND_3 = AOGAS_TIME.REDUCED_GAIN AOND_5 = AOGAS_TIME.NO_GAIN class AOGAS_NOTIFY_PERIOD(object): AOND_START = 5 * TIME_MODIFER / 6 AOND_2_3 = 1 * TIME_MODIFER AOND_3_5 = 0.5 * TIME_MODIFER AOND_END = 0.25 * TIME_MODIFER
# Embedded file name: scripts/client/gui/BattleContext.py import BigWorld import Settings import constants from enumerations import AttributeEnumItem, Enumeration from gui import game_control from gui.shared.utils.gui_items import isVehicleObserver PLAYER_ENTITY_NAME = Enumeration('Player entity name in battle', [('ally', { 'isFriend': True, 'base': 'ally' }), ('teamKiller', { 'isFriend': True, 'base': 'ally' }), ('squadman', { 'isFriend': True, 'base': 'ally' }), ('enemy', { 'isFriend': False, 'base': 'enemy' })], instance=AttributeEnumItem) defNormalizePNameFunction = lambda pName: pName class _BattleContext(object): class FORMAT_MASK: NONE = 0 VEHICLE = 1
from enumerations import Enumeration INVITE_TYPES = Enumeration( 'InviteTypes', ['BARTER', 'TEAM', 'CLAN', 'TRAINING_ROOM', 'PREBATTLE']) _g_invitesConfig = { INVITE_TYPES.BARTER.index(): { 'TTL': 900, 'keepInArchive': 3600, 'checkIgnore': True }, INVITE_TYPES.TEAM.index(): { 'TTL': -1, 'keepInArchive': -1, 'checkIgnore': True }, INVITE_TYPES.CLAN.index(): { 'TTL': -1, 'keepInArchive': -1, 'checkIgnore': True }, INVITE_TYPES.TRAINING_ROOM.index(): { 'TTL': 900, 'keepInArchive': 3600, 'checkIgnore': True }, INVITE_TYPES.PREBATTLE.index(): { 'TTL': 900, 'keepInArchive': 3600, 'checkIgnore': True } }
# 2013.11.15 11:25:29 EST # Embedded file name: scripts/client/ConnectionManager.py import constants import json import hashlib import BigWorld from Event import Event from Singleton import Singleton from enumerations import Enumeration from debug_utils import * from predefined_hosts import g_preDefinedHosts from functools import partial import constants CONNECTION_STATUS = Enumeration( 'Connection status', ('disconnected', 'connected', 'connectionInProgress')) def getHardwareID(): import ResMgr, Settings up = Settings.g_instance.userPrefs loginInfo = None if up.has_key(Settings.KEY_LOGIN_INFO): loginInfo = up[Settings.KEY_LOGIN_INFO] else: loginInfo = up.write(Settings.KEY_LOGIN_INFO, '') prevSalt = loginInfo.readString('salt', '') newSalt = BigWorld.wg_cpsalt(prevSalt) loginInfo.writeString('salt', newSalt) return newSalt
SM_TYPE = Enumeration('System message type', ['Error', 'ErrorHeader', 'ErrorSimple', 'Warning', 'WarningHeader', 'Information', 'InformationHeader', 'GameGreeting', 'PowerLevel', 'FinancialTransactionWithGold', 'FinancialTransactionWithGoldHeader', 'FinancialTransactionWithCredits', 'FortificationStartUp', 'PurchaseForGold', 'DismantlingForGold', 'PurchaseForCredits', 'Selling', 'SellingForGold', 'Remove', 'MultipleSelling', 'Repair', 'CustomizationForGold', 'CustomizationForCredits', 'Restore', 'PurchaseForCrystal', 'PrimeTime', 'PeriodicBattlesNotSet', 'PeriodicBattlesAvailable', 'DismantlingForCredits', 'DismantlingForCrystal', 'OpenEventBoards', 'tokenWithMarkAcquired', 'PaymentMethodLink', 'PaymentMethodUnlink', 'RecruitGift', 'LootBoxes', 'LootBoxRewards', 'GiftSend', 'SkinCompensation', 'FeatureSwitcherOn', 'FeatureSwitcherOff', 'DismantlingForDemountKit', 'UpgradeForCredits', 'BattlePassInfo', 'BattlePassReward', 'BattlePassBuy', 'PurchaseForEventCoin', 'DismantlingForEventCoin', 'OfferGiftBonuses', 'NotSelectedDevicesReminder', 'PurchaseForBpcoin', 'DismantlingForBpcoin', 'PurchaseForMoney', 'PaymentMethodLinkWgnc', 'PaymentMethodUnlinkWgnc', 'BattlePassGameModeEnabled', 'ResearchVehiclePostProgressionSteps', 'BuyPostProgressionModForCredits', 'ChangeSlotCategory', 'MediumInfo', 'MessageHeader', 'NewYearEventStarted', 'NewYearVehicleBranchCredits', 'NewYearVehicleBranchGold', 'NewYearVehicleBranchBonus', 'NewYearVehicleBranchSetVehicle', 'NewYearLootboxResetStatsError', 'GiftSystemError'])
# Embedded file name: scripts/client/gui/SystemMessages.py from abc import ABCMeta, abstractmethod from enumerations import Enumeration from gui.shared.money import Currency SM_TYPE = Enumeration('System message type', [ 'Error', 'Warning', 'Information', 'GameGreeting', 'PowerLevel', 'FinancialTransactionWithGold', 'FinancialTransactionWithCredits', 'FortificationStartUp', 'PurchaseForGold', 'DismantlingForGold', 'PurchaseForCredits', 'Selling', 'Remove', 'Repair', 'CustomizationForGold', 'CustomizationForCredits', 'Restore' ]) CURRENCY_TO_SM_TYPE = { Currency.CREDITS: SM_TYPE.PurchaseForCredits, Currency.GOLD: SM_TYPE.PurchaseForGold } class BaseSystemMessages(object): __metaclass__ = ABCMeta @abstractmethod def init(self): pass @abstractmethod def destroy(self): pass @abstractmethod def pushMessage(self, text, type=SM_TYPE.Information): pass
from gui.shared.money import Currency from helpers import dependency from skeletons.gui.system_messages import ISystemMessages SM_TYPE = Enumeration('System message type', ['Error', 'ErrorHeader', 'ErrorSimple', 'Warning', 'WarningHeader', 'Information', 'GameGreeting', 'PowerLevel', 'FinancialTransactionWithGold', 'FinancialTransactionWithGoldHeader', 'FinancialTransactionWithCredits', 'FortificationStartUp', 'PurchaseForGold', 'DismantlingForGold', 'PurchaseForCredits', 'Selling', 'Remove', 'Repair', 'CustomizationForGold', 'CustomizationForCredits', 'Restore', 'PurchaseForCrystal', 'PrimeTime', 'RankedBattlesAvailable', 'DismantlingForCredits', 'DismantlingForCrystal']) CURRENCY_TO_SM_TYPE = {Currency.CREDITS: SM_TYPE.PurchaseForCredits, Currency.GOLD: SM_TYPE.PurchaseForGold, Currency.CRYSTAL: SM_TYPE.PurchaseForCrystal}
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/client/gui/SystemMessages.py from enumerations import Enumeration from gui.shared.money import Currency from helpers import dependency from skeletons.gui.system_messages import ISystemMessages SM_TYPE = Enumeration('System message type', [ 'Error', 'ErrorHeader', 'ErrorSimple', 'Warning', 'WarningHeader', 'Information', 'GameGreeting', 'PowerLevel', 'FinancialTransactionWithGold', 'FinancialTransactionWithGoldHeader', 'FinancialTransactionWithCredits', 'FortificationStartUp', 'PurchaseForGold', 'DismantlingForGold', 'PurchaseForCredits', 'Selling', 'SellingForGold', 'Remove', 'MultipleSelling', 'Repair', 'CustomizationForGold', 'CustomizationForCredits', 'Restore', 'PurchaseForCrystal', 'PrimeTime', 'RankedBattlesAvailable', 'DismantlingForCredits', 'DismantlingForCrystal', 'OpenEventBoards', 'tokenWithMarkAcquired', 'PaymentMethodLink', 'PaymentMethodUnlink', 'RecruitGift', 'RecruitReminder' ]) CURRENCY_TO_SM_TYPE = { Currency.CREDITS: SM_TYPE.PurchaseForCredits, Currency.GOLD: SM_TYPE.PurchaseForGold, Currency.CRYSTAL: SM_TYPE.PurchaseForCrystal } CURRENCY_TO_SM_TYPE_DISMANTLING = { Currency.CREDITS: SM_TYPE.DismantlingForCredits, Currency.GOLD: SM_TYPE.DismantlingForGold, Currency.CRYSTAL: SM_TYPE.DismantlingForCrystal }
class UserCommandProcessor(BaseChatCommandProcessor): _USER_BAN_TYPES = Enumeration('UserCommandBanTypes', {RESTRICTION_TYPE.BAN: 'game', RESTRICTION_TYPE.CHAT_BAN: 'chat'}) def __init__(self, command): BaseChatCommandProcessor.__init__(self, command)
# 2016.11.19 19:55:12 Støední Evropa (bìžný èas) # Embedded file name: scripts/common/chat_shared.py import time import constants import zlib import cPickle from Event import Event from functools import wraps from wotdecorators import noexcept from debug_utils import LOG_DEBUG, LOG_ERROR from constants import CHAT_LOG, RESTRICTION_TYPE from enumerations import Enumeration, AttributeEnumItem __all__ = ['CHAT_ACTIONS', 'CHAT_ACTION_RESPONSES'] NOTIFICATION_GROUP = Enumeration('Group of members for notification', ['All', 'None', 'Originator', 'ExceptOriginator']) def __notifyFilterAll(originatorId, entityId): return True def __notifyFilterNone(originatorId, entityId): return False def __notifyFilterOnlyOriginator(originatorId, entityId): return originatorId == entityId def __notifyFilterExceptOriginator(originatorId, entityId):
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/client/gui/Scaleform/managers/fade_manager.py import math import Event import GUI from adisp import async from enumerations import Enumeration from helpers.CallbackDelayer import CallbackDelayer, TimeDeltaMeter from gui.app_loader.decorators import sf_lobby _FADE_WINDOW_PATH = 'gui/flash/animations/ny/fadeWindow.swf' FadeState = Enumeration('FadeState', ['released', 'refused', 'destroying']) class FadeManager(CallbackDelayer, TimeDeltaMeter): FADE_TIME = 0.6 FADE_IN_ALPHA = 1.0 MAX_DT = 0.02 CALLBACK_TIME = 0.5 def __init__(self): CallbackDelayer.__init__(self) TimeDeltaMeter.__init__(self) self.onFadeUpdated = Event.Event() self.__fadeInCallback = None self.__fadeInTime = None self.__fadeWindow = None return def setup(self): self.__fadeWindow = _FadeWindow()
# Embedded file name: scripts/client/gui/SystemMessages.py from abc import ABCMeta, abstractmethod from enumerations import Enumeration SM_TYPE = Enumeration('System message type', [ 'Error', 'Warning', 'Information', 'GameGreeting', 'PowerLevel', 'FinancialTransactionWithGold', 'FinancialTransactionWithCredits', 'PurchaseForGold', 'PurchaseForCredits', 'Selling', 'Repair', 'Customization' ]) class BaseSystemMessages(object): __metaclass__ = ABCMeta @abstractmethod def init(self): pass @abstractmethod def destroy(self): pass @abstractmethod def pushMessage(self, text, type=SM_TYPE.Information): pass @abstractmethod def pushI18nMessage(self, key, *args, **kwargs): pass
SM_TYPE = Enumeration('System message type', ['Error', 'ErrorHeader', 'ErrorSimple', 'Warning', 'WarningHeader', 'Information', 'GameGreeting', 'PowerLevel', 'FinancialTransactionWithGold', 'FinancialTransactionWithGoldHeader', 'FinancialTransactionWithCredits', 'FortificationStartUp', 'PurchaseForGold', 'DismantlingForGold', 'PurchaseForCredits', 'Selling', 'SellingForGold', 'Remove', 'MultipleSelling', 'Repair', 'CustomizationForGold', 'CustomizationForCredits', 'Restore', 'PurchaseForCrystal', 'PrimeTime', 'RankedBattlesAvailable', 'RankedBattlesNotSet', 'DismantlingForCredits', 'DismantlingForCrystal', 'OpenEventBoards', 'tokenWithMarkAcquired', 'PaymentMethodLink', 'PaymentMethodUnlink', 'RecruitGift', 'RecruitReminder', 'LootBoxes', 'LootBoxRewards', 'SkinCompensation', 'FrontlineVehicleRewards', 'FeatureSwitcherOn', 'FeatureSwitcherOff', 'DismantlingForDemountKit', 'UpgradeForCredits', 'BattlePassInfo', 'BattlePassReward', 'PurchaseForEventCoin', 'DismantlingForEventCoin', 'OfferGiftBonuses'])