code
stringlengths
57
237k
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank22.png")] public class PremiumRankBitmaps_bitmapBigRank22 extends BitmapAsset { public function PremiumRankBitmaps_bitmapBigRank22() { super(); } } }
package projects.tanks.client.battlefield.models.bonus.bonuslight { public interface IBonusLightModelBase { } }
package alternativa.tanks.models.battle.facilities { import alternativa.math.Vector3; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class FacilityDispellEffectAdapt implements FacilityDispellEffect { private var object:IGameObject; private var impl:FacilityDispellEffect; public function FacilityDispellEffectAdapt(param1:IGameObject, param2:FacilityDispellEffect) { super(); this.object = param1; this.impl = param2; } public function createDispellEffects(param1:Vector3) : void { var position:Vector3 = param1; try { Model.object = this.object; this.impl.createDispellEffects(position); } finally { Model.popObject(); } } } }
package controls.cellrenderer { import mx.core.BitmapAsset; [ExcludeClass] public class CellUnavailable_normalCenter extends BitmapAsset { public function CellUnavailable_normalCenter() { super(); } } }
package alternativa.tanks.model.payment.shop.goldbox { import alternativa.tanks.gui.shop.shopitems.item.base.ShopButton; import alternativa.tanks.gui.shop.shopitems.item.garageitem.GoldBoxPackageButton; import alternativa.tanks.model.payment.shop.ShopItemView; import projects.tanks.client.panel.model.shop.goldboxpackage.GoldBoxPackageModelBase; import projects.tanks.client.panel.model.shop.goldboxpackage.IGoldBoxPackageModelBase; [ModelInfo] public class GoldBoxPackageModel extends GoldBoxPackageModelBase implements IGoldBoxPackageModelBase, GoldBoxPackage, ShopItemView { public function GoldBoxPackageModel() { super(); } public function getCount() : int { return getInitParam().count; } public function getButtonView() : ShopButton { return new GoldBoxPackageButton(object); } } }
package alternativa.tanks.gui { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.gui.buttons.GarageButton; import alternativa.tanks.gui.buttons.TimerButton; import alternativa.tanks.gui.buttons.TimerButtonEvent; import alternativa.tanks.gui.device.ItemInfoDevicesPanel; import alternativa.tanks.gui.effects.BlinkEffect; import alternativa.tanks.gui.effects.GlowEffect; import alternativa.tanks.gui.resistance.GarageResistancesIconsUtils; import alternativa.tanks.gui.tables.KitInfoTable; import alternativa.tanks.gui.upgrade.ItemPropertyUpgradeEvent; import alternativa.tanks.gui.upgrade.SelectUpgradeWindow; import alternativa.tanks.gui.upgrade.UpgradeButton; import alternativa.tanks.gui.upgrade.UpgradeColors; import alternativa.tanks.help.DateTimeHelper; import alternativa.tanks.model.item.fitting.ItemFitting; import alternativa.tanks.model.item.info.ItemActionPanel; import alternativa.tanks.model.item.kit.GarageKit; import alternativa.tanks.model.item.present.PresentImage; import alternativa.tanks.model.item.present.UserPresent; import alternativa.tanks.model.item.properties.ItemPropertyValue; import alternativa.tanks.model.item.resistance.view.MountedResistancesPanel; import alternativa.tanks.model.item.skins.AvailableSkins; import alternativa.tanks.model.item.temporary.ITemporaryItem; import alternativa.tanks.model.item.upgradable.UpgradableItem; import alternativa.tanks.model.item.upgradable.UpgradableItemParams; import alternativa.tanks.model.item.upgradable.UpgradableItemPropertyValue; import alternativa.tanks.service.delaymountcategory.IDelayMountCategoryService; import alternativa.tanks.service.device.DeviceService; import alternativa.tanks.service.item.ItemService; import alternativa.tanks.service.item3d.ITank3DViewer; import alternativa.tanks.service.itempropertyparams.ItemPropertyParams; import alternativa.tanks.service.itempropertyparams.ItemPropertyParamsService; import alternativa.tanks.service.money.IMoneyService; import alternativa.types.Long; import base.DiscreteSprite; import controls.Money; import controls.NumStepper; import controls.TankWindowInner; import controls.base.LabelBase; import controls.buttons.h50px.GreyBigButton; import controls.containers.VerticalStackPanel; import controls.timer.CountDownTimer; import fl.containers.ScrollPane; import fl.controls.ScrollPolicy; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.DisplayObject; import flash.display.Shape; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.filters.DropShadowFilter; import flash.geom.Point; import flash.geom.Rectangle; import flash.text.TextFormat; import flash.text.TextFormatAlign; import flash.utils.Dictionary; import forms.ColorConstants; import forms.TankWindowWithHeader; import platform.client.fp10.core.resource.Resource; import platform.client.fp10.core.resource.types.ImageResource; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.commons.types.ItemCategoryEnum; import projects.tanks.clients.flash.commons.services.payment.PaymentDisplayService; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.IBattleInfoService; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService; import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService; import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.garage.UserGarageActionsService; import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService; import projects.tanks.clients.fp10.libraries.tanksservices.utils.removeChildrenFrom; import projects.tanks.clients.fp10.libraries.tanksservices.utils.removeDisplayObject; import utils.ScrollStyleUtils; import utils.resource.IResourceLoadingComplete; import utils.resource.ResourceLoadingWrapper; public class ItemInfoPanel extends Sprite implements IResourceLoadingComplete { [Inject] public static var localeService:ILocaleService; [Inject] public static var userPropertiesService:IUserPropertiesService; [Inject] public static var itemService:ItemService; [Inject] public static var moneyService:IMoneyService; [Inject] public static var propertyService:ItemPropertyParamsService; [Inject] public static var dialogService:IDialogsService; [Inject] public static var lobbyLayoutService:ILobbyLayoutService; [Inject] public static var battleInfoService:IBattleInfoService; [Inject] public static var delayMountCategoryService:IDelayMountCategoryService; [Inject] public static var paymentDisplayService:PaymentDisplayService; [Inject] public static var userGarageActionsService:UserGarageActionsService; [Inject] public static var tank3dView:ITank3DViewer; [Inject] public static var deviceService:DeviceService; public static const INVENTORY_MAX_VALUE:int = 9999; private static const TOP_PREVIEW_WITH_NAME_PENETRATION_SIZE:int = 15; private static const BOTTOM_MARGIN:int = 64; private static const BUTTON_SIZE:Point = new Point(120,50); private static const ICON_SPACING_H:int = 10; private static const HORIZONTAL_MARGIN:int = 12; private static const VERTICAL_MARGIN:int = 9; private static const MODULE_SPACING:int = 3; private static const KIT_INFO_TOP_MARGIN:int = 10; public const margin:int = 11; public var size:Point; public var inventoryNumStepper:NumStepper; public var buyButton:GarageButton; public var equipButton:TimerButton; public var upgradeButton:UpgradeButton; public var deletePresentButton:GreyBigButton; private var fittingButton:GreyBigButton; private var itemNameLabel:LabelBase; private var descriptionCaptionLabel:LabelBase; private var itemDescriptionLabel:LabelBase; private var window:TankWindowWithHeader; private var inner:TankWindowInner; private var itemPreview:Bitmap; private var itemPreviewContainer:DiscreteSprite; private var kitFullImage:Bitmap; private var presentFullImage:Bitmap; private var propertiesParams:Vector.<ItemPropertyParams>; private var scrollPane:ScrollPane; private var scrollContainer:VerticalStackPanel; private var propertiesPanel:Sprite; private var propertiesPanelLeft:Bitmap; private var propertiesPanelCenter:Bitmap; private var propertiesPanelRight:Bitmap; private var area:Shape; private var areaRect:Rectangle; private var areaRect2:Rectangle; private var timeIndicator:LabelBase; private var modTable:ModTable; private var kitInfoTable:KitInfoTable; private var kitInfoPanel:Sprite; private var kitInfoPanelTopLeftCorner:Bitmap; private var kitInfoPanelCenterTopLine:Bitmap; private var kitInfoPanelTopRightCorner:Bitmap; private var kitInfoPanelLeftLine:Bitmap; private var kitInfoPanelRightLine:Bitmap; private var kitInfoPanelLeftLineSummary:Bitmap; private var kitInfoPanelRightLineSummary:Bitmap; private var kitInfoPanelLeftLineCenterSummary:Bitmap; private var kitInfoPanelRightLineCenterSummary:Bitmap; private var kitInfoPanelCenterMiddleLine:Bitmap; private var kitInfoPanelCenterBottomLine:Bitmap; private var kitInfoPanelLeftCenterLine:Bitmap; private var kitInfoPanelRightCenterLine:Bitmap; private var kitInfoPanelBackgroundUp:Shape; private var kitInfoPanelBackgroundBottom:Shape; private var isKit:Boolean; private var kitItemTopPreviewDiscount:LabelBase; private var item:IGameObject; private var itemCategory:ItemCategoryEnum; private var itemPrice:int; private var isCountable:Boolean = false; private var maxRankIndex:int; private var minRankIndex:int; private var previewLoadingId:Long; private var kitLoadingId:Long; private var presentLoadingId:Long; private var selectWindow:SelectUpgradeWindow; private var blinkEffects:Dictionary; private var enabledUpgrades:Boolean; private var presentInfoPanel:PresentInfoPanel; private var actionButtonsContainer:DiscreteSprite; private var oldActionButtonsContainer:DiscreteSprite; private var divicesPanelVisible:Boolean = false; private var devicesPanel:ItemInfoDevicesPanel; private var resistPanel:MountedResistancesPanel; public function ItemInfoPanel(param1:Boolean, param2:int) { var local4:TextFormat = null; this.propertiesParams = new Vector.<ItemPropertyParams>(); this.blinkEffects = new Dictionary(); this.actionButtonsContainer = new DiscreteSprite(); this.oldActionButtonsContainer = new DiscreteSprite(); super(); this.enabledUpgrades = param1; this.size = new Point(400,300); this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_INFORMATION,this.size.x,this.size.y); addChild(this.window); this.inner = new TankWindowInner(164,106,TankWindowInner.GREEN); this.inner.showBlink = true; addChild(this.inner); this.inner.x = this.margin; this.inner.y = this.margin; this.area = new Shape(); this.areaRect = new Rectangle(); this.areaRect2 = new Rectangle(HORIZONTAL_MARGIN,VERTICAL_MARGIN,0,0); this.areaRect.width = param2 - this.margin * 2 - 2; this.areaRect2.width = this.areaRect.width - HORIZONTAL_MARGIN * 2; this.scrollContainer = new VerticalStackPanel(); this.scrollContainer.x = this.margin + 1; this.scrollContainer.y = this.margin + 1; this.scrollContainer.addChild(this.area); this.scrollPane = new ScrollPane(); addChild(this.scrollPane); ScrollStyleUtils.setGreenStyle(this.scrollPane); this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; this.scrollPane.verticalScrollPolicy = ScrollPolicy.AUTO; this.scrollPane.source = this.scrollContainer; this.scrollPane.focusEnabled = false; this.scrollPane.x = this.margin + 1; this.scrollPane.y = this.margin + 1 + MODULE_SPACING; this.itemNameLabel = new LabelBase(); this.itemNameLabel.text = "A"; this.itemNameLabel.size = 18; this.itemNameLabel.color = ColorConstants.GREEN_TEXT; this.scrollContainer.addChild(this.itemNameLabel); this.itemNameLabel.x = HORIZONTAL_MARGIN - 3; this.itemNameLabel.y = VERTICAL_MARGIN - 7; this.devicesPanel = new ItemInfoDevicesPanel(); this.devicesPanel.x = HORIZONTAL_MARGIN; this.scrollContainer.addChild(this.devicesPanel); this.descriptionCaptionLabel = new LabelBase(); this.descriptionCaptionLabel.text = localeService.getText(TanksLocale.TEXT_DESCRIPTION); this.descriptionCaptionLabel.size = 18; this.descriptionCaptionLabel.color = ColorConstants.GREEN_TEXT; this.scrollContainer.addChild(this.descriptionCaptionLabel); this.descriptionCaptionLabel.x = HORIZONTAL_MARGIN - 3; this.itemDescriptionLabel = new LabelBase(); var local3:String = localeService.language; if(local3 == "cn") { local4 = this.itemDescriptionLabel.getTextFormat(); local4.leading = 3; this.itemDescriptionLabel.defaultTextFormat = local4; } this.itemDescriptionLabel.multiline = true; this.itemDescriptionLabel.wordWrap = true; this.itemDescriptionLabel.color = ColorConstants.GREEN_TEXT; this.itemDescriptionLabel.text = "Description"; this.itemDescriptionLabel.mouseWheelEnabled = false; this.scrollContainer.addChild(this.itemDescriptionLabel); this.itemDescriptionLabel.x = HORIZONTAL_MARGIN - 3; this.itemPreviewContainer = new DiscreteSprite(); this.scrollContainer.addChild(this.itemPreviewContainer); this.presentInfoPanel = new PresentInfoPanel(this.areaRect2.width); this.presentInfoPanel.x = 9; this.itemPreview = new Bitmap(); this.kitFullImage = new Bitmap(); this.presentFullImage = new Bitmap(); this.buyButton = new GarageButton(); this.upgradeButton = new UpgradeButton(); this.upgradeButton.addEventListener(MouseEvent.CLICK,this.onButtonUpgradeClick); this.equipButton = new TimerButton(); this.equipButton.label = localeService.getText(TanksLocale.TEXT_GARAGE_INFO_PANEL_BUTTON_EQUIP_TEXT); this.fittingButton = new GreyBigButton(); this.fittingButton.label = localeService.getText(TanksLocale.TEXT_FITTING_BUTTON_TEXT); this.fittingButton.visible = false; this.fittingButton.addEventListener(MouseEvent.CLICK,this.onFittingButtonClick); addChild(this.oldActionButtonsContainer); this.deletePresentButton = new GreyBigButton(); this.deletePresentButton.label = localeService.getText(TanksLocale.TEXT_DELETE_PRESENT_BUTTON); this.deletePresentButton.visible = false; this.oldActionButtonsContainer.addChild(this.deletePresentButton); this.buyButton.visible = false; this.upgradeButton.visible = false; this.equipButton.visible = false; this.oldActionButtonsContainer.addChild(this.buyButton); this.oldActionButtonsContainer.addChild(this.upgradeButton); this.oldActionButtonsContainer.addChild(this.equipButton); this.oldActionButtonsContainer.addChild(this.fittingButton); addChild(this.actionButtonsContainer); this.inventoryNumStepper = new NumStepper(); this.oldActionButtonsContainer.addChild(this.inventoryNumStepper); this.inventoryNumStepper.value = 1; this.inventoryNumStepper.minValue = 1; this.inventoryNumStepper.maxValue = INVENTORY_MAX_VALUE; this.inventoryNumStepper.visible = false; this.inventoryNumStepper.mouseEnabled = false; this.inventoryNumStepper.addEventListener(Event.CHANGE,this.inventoryNumChanged); this.propertiesPanel = new Sprite(); this.propertiesPanelLeft = new Bitmap(ItemInfoPanelBitmaps.propertiesLeft); this.propertiesPanel.addChild(this.propertiesPanelLeft); this.propertiesPanelCenter = new Bitmap(ItemInfoPanelBitmaps.propertiesCenter); this.propertiesPanel.addChild(this.propertiesPanelCenter); this.propertiesPanelRight = new Bitmap(ItemInfoPanelBitmaps.propertiesRight); this.propertiesPanel.addChild(this.propertiesPanelRight); this.propertiesPanelCenter.x = this.propertiesPanelLeft.width; this.propertiesPanel.x = HORIZONTAL_MARGIN; this.propertiesPanel.y = Math.round(VERTICAL_MARGIN * 2 + this.itemNameLabel.textHeight - 7); this.getResistPanel().visible = false; addChild(this.getResistPanel()); this.addKitInfoPanel(); addEventListener(ItemPropertyUpgradeEvent.SELECT_WINDOW_OPENED,this.openUpgradeWindow); this.timeIndicator = new LabelBase(); this.timeIndicator.size = 18; this.timeIndicator.color = ColorConstants.GREEN_TEXT; this.modTable = new ModTable(this.areaRect2.width); this.modTable.x = HORIZONTAL_MARGIN; this.kitItemTopPreviewDiscount = new LabelBase(); this.kitItemTopPreviewDiscount.color = 16777215; this.kitItemTopPreviewDiscount.align = TextFormatAlign.CENTER; this.kitItemTopPreviewDiscount.size = 23; this.kitItemTopPreviewDiscount.bold = true; if(local3 == "cn") { this.kitItemTopPreviewDiscount.size = 20; } } public static function getRequiredRank(param1:int, param2:int) : int { var local3:int = int(userPropertiesService.rank); var local4:int = param1; if(local3 < param1) { local4 = -param1; } else if(local3 > param2) { local4 = -param2; } return local4; } public function getResistPanel() : MountedResistancesPanel { if(this.resistPanel == null) { this.resistPanel = new MountedResistancesPanel(); this.resistPanel.visible = false; } return this.resistPanel; } private function addKitInfoPanel() : void { this.kitInfoPanel = new Sprite(); this.kitInfoPanelTopLeftCorner = new Bitmap(ItemInfoPanelBitmaps.leftTopCornerTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelTopLeftCorner); this.kitInfoPanelCenterTopLine = new Bitmap(ItemInfoPanelBitmaps.centerTopTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelCenterTopLine); this.kitInfoPanelTopRightCorner = new Bitmap(ItemInfoPanelBitmaps.rightTopCornerTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelTopRightCorner); this.kitInfoPanelCenterTopLine.x = this.kitInfoPanelTopLeftCorner.width; this.kitInfoPanelLeftLine = new Bitmap(ItemInfoPanelBitmaps.leftLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelLeftLine); this.kitInfoPanelRightLine = new Bitmap(ItemInfoPanelBitmaps.rightLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelRightLine); this.kitInfoPanelLeftCenterLine = new Bitmap(ItemInfoPanelBitmaps.leftCenterTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelLeftCenterLine); this.kitInfoPanelRightCenterLine = new Bitmap(ItemInfoPanelBitmaps.rightCenterTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelRightCenterLine); this.kitInfoPanelCenterMiddleLine = new Bitmap(ItemInfoPanelBitmaps.centerTopTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelCenterMiddleLine); this.kitInfoPanelLeftLineSummary = new Bitmap(ItemInfoPanelBitmaps.leftBottomLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelLeftLineSummary); this.kitInfoPanelRightLineSummary = new Bitmap(ItemInfoPanelBitmaps.rightBottomLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelRightLineSummary); this.kitInfoPanelCenterBottomLine = new Bitmap(ItemInfoPanelBitmaps.centerBottomLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelCenterBottomLine); this.kitInfoPanelLeftLineCenterSummary = new Bitmap(ItemInfoPanelBitmaps.leftLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelLeftLineCenterSummary); this.kitInfoPanelRightLineCenterSummary = new Bitmap(ItemInfoPanelBitmaps.rightLineTableKit); this.kitInfoPanel.addChild(this.kitInfoPanelRightLineCenterSummary); this.kitInfoPanelBackgroundUp = new Shape(); this.kitInfoPanel.addChild(this.kitInfoPanelBackgroundUp); this.kitInfoPanelBackgroundBottom = new Shape(); this.kitInfoPanel.addChild(this.kitInfoPanelBackgroundBottom); this.kitInfoPanel.x = HORIZONTAL_MARGIN; this.kitInfoTable = new KitInfoTable(this.areaRect2.width); this.kitInfoTable.x = HORIZONTAL_MARGIN; } public function destroy() : void { this.window = null; this.inner = null; this.itemPreviewContainer = null; this.itemPreview = null; this.kitFullImage = null; this.presentFullImage = null; this.item = null; this.itemNameLabel = null; this.itemDescriptionLabel = null; if(this.resistPanel != null) { this.resistPanel.destroy(); this.resistPanel = null; } this.scrollPane = null; this.scrollContainer = null; this.propertiesPanel = null; this.propertiesPanelLeft = null; this.propertiesPanelCenter = null; this.propertiesPanelRight = null; this.kitInfoPanel = null; this.kitInfoPanelTopLeftCorner = null; this.kitInfoPanelCenterTopLine = null; this.kitInfoPanelTopRightCorner = null; this.kitInfoPanelLeftLine = null; this.area = null; this.areaRect = null; this.areaRect2 = null; this.oldActionButtonsContainer = null; this.buyButton = null; this.fittingButton.removeEventListener(MouseEvent.CLICK,this.onFittingButtonClick); this.fittingButton = null; if(this.equipButton != null) { this.equipButton.removeEventListener(TimerButtonEvent.TIME_ON_COMPLETE_TIMER_BUTTON,this.onCompletedTimer); this.equipButton.hideTime(); this.equipButton = null; } if(this.upgradeButton != null) { this.upgradeButton.removeEventListener(MouseEvent.CLICK,this.onButtonUpgradeClick); this.upgradeButton = null; } removeEventListener(ItemPropertyUpgradeEvent.SELECT_WINDOW_OPENED,this.openUpgradeWindow); if(this.devicesPanel != null) { this.devicesPanel.destroy(); this.devicesPanel = null; } this.previewLoadingId = null; this.stopBlinkEffects(); this.blinkEffects = null; if(Boolean(this.selectWindow)) { this.selectWindow.destroy(); this.selectWindow = null; } this.presentInfoPanel.destroy(); this.presentInfoPanel = null; this.actionButtonsContainer = null; } private function onFittingButtonClick(param1:MouseEvent) : void { ItemFitting(this.item.adapt(ItemFitting)).fit(); this.fittingButton.enabled = false; } private function stopBlinkEffects() : void { var local1:BlinkEffect = null; for each(local1 in this.blinkEffects) { local1.stop(); } } private function hideIcons() : void { var local1:ItemPropertyParams = null; for each(local1 in this.propertiesParams) { if(this.propertiesPanel.contains(local1.icon)) { this.propertiesPanel.removeChild(local1.icon); } } } private function showIcons() : void { var local1:ItemPropertyParams = null; for each(local1 in this.propertiesParams) { if(!this.propertiesPanel.contains(local1.icon)) { this.propertiesPanel.addChild(local1.icon); } } } public function onLoadingComplete(param1:Resource) : void { if(this.previewLoadingId == param1.id) { if(!this.isKit && !itemService.isGivenPresent(this.item)) { this.itemPreview.bitmapData = ImageResource(param1).data; this.resize(this.size.x,this.size.y); } } if(this.kitLoadingId == param1.id) { if(this.isKit) { this.kitFullImage.bitmapData = ImageResource(param1).data; this.showBitmap(this.kitFullImage); this.resize(this.size.x,this.size.y); } } if(this.presentLoadingId == param1.id) { if(itemService.isGivenPresent(this.item)) { this.presentFullImage.bitmapData = ImageResource(param1).data; this.showBitmap(this.presentFullImage); this.resize(this.size.x,this.size.y); } } } public function showItemInfo(param1:IGameObject, param2:Boolean) : void { var local4:UserPresent = null; this.itemCategory = itemService.getCategory(param1); this.itemPrice = itemService.getPrice(param1); this.isCountable = itemService.isCountable(param1); this.divicesPanelVisible = param1.hasModel(AvailableSkins); if(this.divicesPanelVisible) { this.devicesPanel.init(param1); } if(!param2 && !itemService.isGivenPresent(param1)) { this.updateUpgradeButton(param1); } removeChildrenFrom(this.itemPreviewContainer); removeChildrenFrom(this.actionButtonsContainer); this.updateFittingButton(param2,this.item,param1); if(this.item != param1) { tank3dView.closePreview(); this.item = param1; } this.itemNameLabel.text = itemService.getName(param1); this.itemDescriptionLabel.visible = !itemService.isGivenPresent(param1); this.descriptionCaptionLabel.visible = this.divicesPanelVisible && Boolean(this.itemDescriptionLabel.visible); if(this.itemDescriptionLabel.visible) { this.itemDescriptionLabel.htmlText = itemService.getDescription(param1); } this.loadAndSetupImageResources(param1); this.maxRankIndex = itemService.getMaxRankIndex(param1); this.minRankIndex = itemService.getMinRankIndex(param1); this.hideIcons(); if(itemService.isGivenPresent(param1)) { local4 = UserPresent(param1.adapt(UserPresent)); this.presentInfoPanel.update(local4.getPresenterId(),local4.getDate(),local4.getText()); this.itemPreviewContainer.addChild(this.presentInfoPanel); } else { this.presentInfoPanel.destroyPresenterLabel(); } if(itemService.isKit(param1)) { this.isKit = true; this.showKitInfoTable(param1); } else { this.isKit = false; this.hideKitInfoTable(); if(this.scrollContainer.contains(this.kitItemTopPreviewDiscount)) { this.scrollContainer.removeChild(this.kitItemTopPreviewDiscount); } } var local3:Vector.<IGameObject> = !!itemService.isModificationItem(param1) ? itemService.getModifications(param1) : null; this.showItemProperties(param1,param2,local3); this.setButtonsVisibility(param1,param2,local3); this.updateStepperAndBuyButton(param1,param2); this.updateBlinkEffect(); this.setButtonsPosition(); this.updateEquipButton(); this.setupRemainingTimer(param1,param2); if(!(this.oldActionButtonsContainer.visible = !param1.hasModel(ItemActionPanel))) { ItemActionPanel(param1.event(ItemActionPanel)).updateActionElements(this.actionButtonsContainer,this); } } private function showEquippedPanel(param1:TankWindowInner) : Number { var local2:MountedResistancesPanel = this.getResistPanel(); local2.visible = this.itemCategory == ItemCategoryEnum.RESISTANCE_MODULE; if(local2.visible) { param1.height -= local2.height + VERTICAL_MARGIN / 2; local2.resize(param1.width); } return param1.height; } private function loadAndSetupImageResources(param1:IGameObject) : void { var local2:ImageResource = null; var local3:ImageResource = null; var local4:ImageResource = null; this.kitFullImage.bitmapData = null; this.presentFullImage.bitmapData = null; this.itemPreview.bitmapData = null; if(itemService.isKit(param1)) { local2 = GarageKit(param1.adapt(GarageKit)).getImage(); this.kitLoadingId = local2.id; if(Boolean(local2.isLazy) && !local2.isLoaded) { local2.loadLazyResource(new ResourceLoadingWrapper(this)); } this.kitFullImage.bitmapData = local2.data; if(this.kitFullImage.bitmapData != null) { this.showBitmap(this.kitFullImage); } else { removeDisplayObject(this.kitFullImage); } } else if(itemService.isGivenPresent(param1)) { local3 = PresentImage(param1.adapt(PresentImage)).getImage(); this.presentLoadingId = local3.id; if(Boolean(local3.isLazy) && !local3.isLoaded) { local3.loadLazyResource(new ResourceLoadingWrapper(this)); } this.presentFullImage.bitmapData = local3.data; if(this.presentFullImage.bitmapData != null) { this.showBitmap(this.presentFullImage); } else { removeDisplayObject(this.presentFullImage); } } else { local4 = itemService.getPreviewResource(param1); this.previewLoadingId = local4.id; if(Boolean(local4.isLazy) && !local4.isLoaded) { local4.loadLazyResource(new ResourceLoadingWrapper(this)); } this.itemPreview.bitmapData = local4.data; } } private function setupRemainingTimer(param1:IGameObject, param2:Boolean) : void { if(!param2 && Boolean(param1.hasModel(ITemporaryItem))) { if(!this.scrollContainer.contains(this.timeIndicator)) { this.scrollContainer.addChild(this.timeIndicator); } this.setTimeRemaining(param1); } else if(this.scrollContainer.contains(this.timeIndicator)) { this.scrollContainer.removeChild(this.timeIndicator); } } private function updateStepperAndBuyButton(param1:IGameObject, param2:Boolean) : void { var local3:int = 0; var local4:int = 0; var local5:int = 0; var local6:int = 0; var local7:IGameObject = null; var local8:int = 0; if(this.buyButton.visible) { local3 = getRequiredRank(itemService.getMinRankIndex(param1),itemService.getMaxRankIndex(param1)); local4 = 1; if(this.isCountable) { this.inventoryNumStepper.visible = true; local6 = Math.min(INVENTORY_MAX_VALUE,Math.floor(moneyService.crystal / this.itemPrice)); if(local3 > 0) { if(local6 > 0) { this.inventoryNumStepper.enabled = true; this.inventoryNumStepper.alpha = 1; } else { this.inventoryNumStepper.enabled = false; this.inventoryNumStepper.alpha = 0.7; } } else { this.inventoryNumStepper.enabled = false; this.inventoryNumStepper.alpha = 0.7; this.inventoryNumStepper.value = 1; } local5 = int(itemService.getPrice(param1)); local4 = int(this.inventoryNumStepper.value); } else if(!param2 && Boolean(itemService.isModificationItem(param1))) { this.inventoryNumStepper.visible = false; this.inventoryNumStepper.enabled = false; local7 = itemService.getMaxAvailableOrNextNotAvailableModification(param1); local5 = int(itemService.getPrice(local7)); local8 = int(itemService.getMinRankIndex(local7)); local3 = userPropertiesService.rank >= local8 ? local8 : int(-local8); } else { local5 = int(itemService.getPrice(param1)); this.inventoryNumStepper.visible = false; this.inventoryNumStepper.enabled = false; } this.updateBuyButtonText(param1,param2); this.buyButton.setInfo(local5,local4,local3,itemService.isPremiumItem(param1)); } else { this.inventoryNumStepper.visible = false; } } private function setButtonsVisibility(param1:IGameObject, param2:Boolean, param3:Vector.<IGameObject>) : void { if(itemService.isGivenPresent(param1)) { this.deletePresentButton.visible = true; this.buyButton.visible = false; this.equipButton.visible = false; } else { this.deletePresentButton.visible = false; if(param2) { this.buyButton.visible = true; this.equipButton.visible = false; } else if(this.itemCategory == ItemCategoryEnum.INVENTORY) { this.buyButton.visible = true; this.equipButton.visible = false; } else { this.buyButton.visible = false; if(this.itemCategory == ItemCategoryEnum.PLUGIN || this.itemCategory == ItemCategoryEnum.EMBLEM || this.itemCategory == ItemCategoryEnum.LICENSE) { this.equipButton.visible = false; } else { this.equipButton.visible = true; if(itemService.isModificationItem(param1)) { this.buyButton.visible = itemService.getModificationIndex(param1) < 3 && param3.length > 1; } } } } this.devicesPanel.visible = this.divicesPanelVisible; } private function showItemProperties(param1:IGameObject, param2:Boolean, param3:Vector.<IGameObject>) : void { var local6:Boolean = false; var local7:int = 0; var local8:ItemPropertyValue = null; var local9:ItemPropertyParams = null; var local10:int = 0; var local11:int = 0; var local12:IGameObject = null; var local13:ModInfoRow = null; var local14:UpgradableItemParams = null; var local15:Vector.<UpgradableItemPropertyValue> = null; var local4:Boolean = !itemService.isModificationItem(param1); var local5:Vector.<ItemPropertyValue> = itemService.getPropertiesForInfoWindow(param1); if(local5 != null && local5.length > 0) { this.propertiesParams.length = local5.length; local6 = Boolean(itemService.isUpgradableItem(param1)) && itemService.getUpgradableItemParams(param1).getLevelsCount() > 0; local7 = 0; while(local7 < local5.length) { local8 = local5[local7]; local9 = propertyService.getParams(local8.getProperty()); this.propertiesParams[local7] = local9; if(local4) { local10 = UpgradeColors.getColorForItem(param1,local8); local9.icon.setValue(itemService.getCurrentValue(param1,local8),local10); } else { local9.icon.removeValue(); } local7++; } this.upgradeButton.visible = this.enabledUpgrades && !param2 && local6; this.showIcons(); if(!this.scrollContainer.contains(this.propertiesPanel)) { this.scrollContainer.addChild(this.propertiesPanel); } } else { this.upgradeButton.visible = false; this.propertiesParams.length = 0; if(this.scrollContainer.contains(this.propertiesPanel)) { this.scrollContainer.removeChild(this.propertiesPanel); } } if(itemService.isModificationItem(param1)) { this.propertiesPanelLeft.bitmapData = ItemInfoPanelBitmaps.upgradeTableLeft; this.propertiesPanelCenter.bitmapData = ItemInfoPanelBitmaps.upgradeTableCenter; this.propertiesPanelRight.bitmapData = ItemInfoPanelBitmaps.upgradeTableRight; this.showModTable(); if(param2) { this.modTable.resetSelection(); } else { this.modTable.select(itemService.getModificationIndex(param1)); } local11 = 0; while(local11 < this.modTable.rows.length) { local13 = ModInfoRow(this.modTable.rows[local11]); local13.visible = param3.length != 1 || local11 == 0; local11++; } local11 = 0; while(local11 < param3.length) { local12 = param3[local11]; local13 = ModInfoRow(this.modTable.rows[local11]); local13.upgradeIndicator.visible = param3.length != 1; local13.costLabel.text = Money.numToString(itemService.getPriceWithoutDiscount(local12),false); this.modTable.maxCostWidth = local13.costLabel.width; local13.rankIcon.setDefaultAccount(itemService.getMinRankIndex(local12)); local14 = itemService.getUpgradableItemParams(local12); local15 = local14.visibleProperties; local13.setLabelsNum(local5.length); local13.setLabelsText(local14,local15); local11++; } this.modTable.correctNonintegralValues(); } else { this.propertiesPanelLeft.bitmapData = ItemInfoPanelBitmaps.propertiesLeft; this.propertiesPanelCenter.bitmapData = ItemInfoPanelBitmaps.propertiesCenter; this.propertiesPanelRight.bitmapData = ItemInfoPanelBitmaps.propertiesRight; this.hideModTable(); } } private function updateBuyButtonText(param1:IGameObject, param2:Boolean) : void { var local4:IGameObject = null; var local3:String = localeService.getText(TanksLocale.TEXT_GARAGE_INFO_PANEL_BUTTON_BUY_TEXT); if(itemService.isModificationItem(param1)) { if(param2) { local4 = itemService.getMaxAvailableModification(param1); if(local4 == null) { local4 = param1; } } else { local4 = itemService.getMaxAvailableOrNextNotAvailableModification(param1); } this.buyButton.setText(local3 + " M" + itemService.getModificationIndex(local4)); } else { this.buyButton.setText(local3); } } private function showKitInfoTable(param1:IGameObject) : void { if(!this.scrollContainer.contains(this.kitInfoPanel)) { this.scrollContainer.addChild(this.kitInfoPanel); } if(!this.scrollContainer.contains(this.kitInfoTable)) { this.scrollContainer.addChild(this.kitInfoTable); } this.kitInfoTable.show(param1); } private function hideKitInfoTable() : void { if(this.scrollContainer.contains(this.kitInfoPanel)) { this.scrollContainer.removeChild(this.kitInfoPanel); } if(this.scrollContainer.contains(this.kitInfoTable)) { this.scrollContainer.removeChild(this.kitInfoTable); } } public function updateEquipButton() : void { this.updateLabelEquipButton(); if(Boolean(lobbyLayoutService.inBattle()) && !battleInfoService.reArmorEnabled && itemService.getCategory(this.item) != ItemCategoryEnum.PAINT) { this.equipButton.enabled = false; return; } if(this.itemCouldBeMounted()) { this.controlTimerEquipButton(); } else { this.equipButton.enabled = false; this.equipButton.hideTime(); } } private function updateLabelEquipButton() : void { if(this.itemCouldBeMounted()) { this.equipButton.label = localeService.getText(TanksLocale.TEXT_GARAGE_INFO_PANEL_BUTTON_EQUIP_TEXT); } else { this.equipButton.label = localeService.getText(TanksLocale.TEXT_GARAGE_EQUIPPED_TEXT); } } private function itemCouldBeMounted() : Boolean { return Boolean(itemService.isMountable(this.item)) && Boolean(itemService.hasItem(this.item)) && !itemService.isMounted(this.item); } private function updateFittingButton(param1:Boolean, param2:IGameObject, param3:IGameObject) : void { if(param1 && itemService.getCategory(param3) == ItemCategoryEnum.PAINT && !battleInfoService.isInBattle()) { this.fittingButton.visible = true; if(param2 != param3) { this.fittingButton.enabled = true; } } else { this.fittingButton.visible = false; } } private function controlTimerEquipButton() : void { var local1:CountDownTimer = delayMountCategoryService.getDownTimer(this.item); if(itemService.getCategory(this.item) != ItemCategoryEnum.PAINT && Boolean(lobbyLayoutService.inBattle()) && local1.getRemainingSeconds() > 0 && !itemService.isMounted(this.item)) { this.equipButton.startTimer(local1); this.equipButton.addEventListener(TimerButtonEvent.TIME_ON_COMPLETE_TIMER_BUTTON,this.onCompletedTimer); } else { this.equipButton.hideTime(); this.equipButton.enabled = true; } } private function onCompletedTimer(param1:TimerButtonEvent) : void { this.equipButton.enabled = true; this.equipButton.removeEventListener(TimerButtonEvent.TIME_ON_COMPLETE_TIMER_BUTTON,this.onCompletedTimer); } public function upgradeSelectedItem() : void { userGarageActionsService.upgradeItem(this.item); dispatchEvent(new ItemPropertyUpgradeEvent(ItemPropertyUpgradeEvent.SELECT_WINDOW_OPENED)); } private function openUpgradeWindow(param1:ItemPropertyUpgradeEvent) : * { var local2:UpgradableItemParams = itemService.getUpgradableItemParams(this.item); this.showSelectUpgradeWindow(local2); } private function onButtonUpgradeClick(param1:MouseEvent) : void { this.upgradeSelectedItem(); } public function onMountItem() : void { if(this.item == null) { return; } if(!this.oldActionButtonsContainer.visible) { ItemActionPanel(this.item.event(ItemActionPanel)).updateActionElements(this.actionButtonsContainer,this); } else { this.updateEquipButton(); } } private function showSelectUpgradeWindow(param1:UpgradableItemParams) : void { this.selectWindow = new SelectUpgradeWindow(param1); this.selectWindow.addEventListener(ItemPropertyUpgradeEvent.SELECT_WINDOW_CLOSED,this.onSelectWindowClosed); this.selectWindow.addEventListener(ItemPropertyUpgradeEvent.SPEED_UP,this.onSpeedUp); this.selectWindow.addEventListener(ItemPropertyUpgradeEvent.UPGRADE_STARTED,this.onUpgradeStarted); this.selectWindow.addEventListener(ItemPropertyUpgradeEvent.FLUSH_UPGRADES,this.onFlushUpgrades); this.selectWindow.openDialog(); } private function onSelectWindowClosed(param1:Event) : void { this.selectWindow.removeEventListener(ItemPropertyUpgradeEvent.SELECT_WINDOW_CLOSED,this.onSelectWindowClosed); this.selectWindow.removeEventListener(ItemPropertyUpgradeEvent.SPEED_UP,this.onSpeedUp); this.selectWindow.removeEventListener(ItemPropertyUpgradeEvent.UPGRADE_STARTED,this.onUpgradeStarted); this.selectWindow.removeEventListener(ItemPropertyUpgradeEvent.FLUSH_UPGRADES,this.onFlushUpgrades); dialogService.removeDialog(this.selectWindow); this.selectWindow = null; this.updateEquipButton(); } private function updateUpgradeButton(param1:IGameObject) : void { var local2:UpgradableItem = null; if(param1.hasModel(UpgradableItem)) { local2 = UpgradableItem(param1.adapt(UpgradableItem)); if(local2.isUpgrading()) { this.upgradeButton.setUpgradingButton(local2.getCountDownTimer(),local2.hasSpeedUpDiscount()); } else if(itemService.isFullUpgraded(param1)) { this.upgradeButton.setUpgradedButton(); } else { this.upgradeButton.setUpgradeButton(local2.hasUpgradeDiscount()); } } } private function onFlushUpgrades(param1:ItemPropertyUpgradeEvent) : void { dispatchEvent(new ItemPropertyUpgradeEvent(param1.type)); } private function onSpeedUp(param1:ItemPropertyUpgradeEvent) : void { var local2:UpgradableItem = UpgradableItem(this.item.adapt(UpgradableItem)); dispatchEvent(new ItemPropertyUpgradeEvent(param1.type,local2.getCountDownTimer(),param1.getPrice())); } private function onUpgradeStarted(param1:ItemPropertyUpgradeEvent) : void { var local2:UpgradableItem = UpgradableItem(this.item.adapt(UpgradableItem)); this.upgradeButton.setUpgradingButton(param1.getTimer(),local2.hasSpeedUpDiscount()); dispatchEvent(new ItemPropertyUpgradeEvent(param1.type,param1.getTimer(),param1.getPrice())); this.startBlinkEffects(); if(!this.oldActionButtonsContainer.visible) { this.item.event(ItemActionPanel).updateActionElements(this.actionButtonsContainer,this); } } private function setButtonsPosition() : void { var local1:int = int(this.actionButtonsContainer.y); if(this.buyButton.visible) { this.buyButton.y = local1; if(this.isCountable) { this.inventoryNumStepper.x = -7; this.inventoryNumStepper.y = this.buyButton.y + (BUTTON_SIZE.y - this.inventoryNumStepper.height >> 1); this.buyButton.x = this.inventoryNumStepper.x + this.inventoryNumStepper.width + 10; } else { this.buyButton.x = this.margin; } } if(this.equipButton.visible) { this.equipButton.y = local1; this.equipButton.x = this.size.x - this.margin - BUTTON_SIZE.x; } if(this.fittingButton.visible) { this.fittingButton.y = local1; this.fittingButton.x = this.size.x - this.margin - BUTTON_SIZE.x; } this.upgradeButton.y = local1; this.upgradeButton.x = this.margin + BUTTON_SIZE.x + 15; this.deletePresentButton.x = this.margin; this.deletePresentButton.y = local1; this.equipButton.y = this.actionButtonsContainer.y; this.fittingButton.y = this.actionButtonsContainer.y; this.upgradeButton.y = this.actionButtonsContainer.y; this.buyButton.y = this.actionButtonsContainer.y; } public function resize(param1:int, param2:int) : void { var local3:int = 0; var local9:int = 0; var local10:int = 0; var local11:int = 0; var local12:int = 0; var local13:int = 0; var local14:ItemPropertyIcon = null; var local15:ModInfoRow = null; var local16:Vector.<Number> = null; var local17:BitmapData = null; this.scrollPane.update(); this.size.x = param1; this.size.y = param2; this.window.width = param1; this.window.height = param2; this.inner.width = param1 - this.margin * 2; this.inner.height = param2 - this.margin - BOTTOM_MARGIN; this.areaRect.width = param1 - this.margin * 2 - 2; this.areaRect2.width = this.areaRect.width - HORIZONTAL_MARGIN * 2; this.itemDescriptionLabel.x = HORIZONTAL_MARGIN - 3; this.itemDescriptionLabel.width = this.areaRect2.width; var local4:int = int(this.propertiesParams.length); if(local4 > 0) { local3 = this.propertiesPanel.y + this.propertiesPanel.height + VERTICAL_MARGIN; this.propertiesPanelRight.x = this.areaRect2.width - this.propertiesPanelRight.width; this.propertiesPanelCenter.width = this.propertiesPanelRight.x - this.propertiesPanelCenter.x; local9 = 6; local10 = ItemInfoPanelBitmaps.armor.width * local4 + ICON_SPACING_H * (local4 - 1); local11 = local10; if(this.scrollContainer.contains(this.modTable)) { local11 += this.modTable.constWidth; } local12 = this.propertiesPanel.width - local11 >> 1; if(!itemService.isModificationItem(this.item)) { local13 = 0; while(local13 < local4) { local14 = this.propertiesParams[local13].icon; local14.x = local12 + local13 * (ItemInfoPanelBitmaps.armor.width + ICON_SPACING_H); local14.y = local9; local13++; } } else { for each(local15 in this.modTable.rows) { local15.updatePositions(); } local16 = local15.getPositions(); local13 = 0; while(local13 < local16.length) { local14 = this.propertiesParams[local13].icon; local14.x = local16[local13] - local14.width / 2; local14.y = local9; local13++; } this.modTable.y = this.propertiesPanel.y + local14.height + 2; } this.itemDescriptionLabel.y = this.propertiesPanel.y + this.propertiesPanel.height + VERTICAL_MARGIN - 4; } else { this.itemDescriptionLabel.y = this.areaRect2.y + 24 - 7; } if(this.divicesPanelVisible) { this.devicesPanel.y = this.itemDescriptionLabel.y; this.itemDescriptionLabel.y += this.devicesPanel.height + 5; if(this.descriptionCaptionLabel.visible) { this.descriptionCaptionLabel.y = this.itemDescriptionLabel.y; this.itemDescriptionLabel.y += this.descriptionCaptionLabel.height + 5; } } if(this.kitFullImage.bitmapData != null) { this.kitFullImage.y = this.itemNameLabel.y + this.itemNameLabel.height + VERTICAL_MARGIN - TOP_PREVIEW_WITH_NAME_PENETRATION_SIZE; this.kitFullImage.x = this.scrollContainer.width - this.kitFullImage.width >> 1; this.itemDescriptionLabel.y += this.kitFullImage.bitmapData.height + VERTICAL_MARGIN - TOP_PREVIEW_WITH_NAME_PENETRATION_SIZE; } if(this.presentFullImage.bitmapData != null) { this.presentFullImage.y = this.itemNameLabel.y + this.itemNameLabel.height + VERTICAL_MARGIN - TOP_PREVIEW_WITH_NAME_PENETRATION_SIZE; this.presentFullImage.x = this.scrollContainer.width - this.presentFullImage.width >> 1; this.itemDescriptionLabel.y += this.presentFullImage.bitmapData.height + VERTICAL_MARGIN - TOP_PREVIEW_WITH_NAME_PENETRATION_SIZE; } local3 += VERTICAL_MARGIN + this.itemDescriptionLabel.textHeight - 4; var local5:int = local3; var local6:Boolean = this.itemPreview.bitmapData != null; if(local6) { this.itemPreview.x = this.margin; this.itemPreview.y = this.itemDescriptionLabel.y; this.itemDescriptionLabel.x = this.itemPreview.x + this.itemPreview.width + 5; this.itemDescriptionLabel.width = this.areaRect2.width - this.itemDescriptionLabel.x + this.margin; local3 = Math.max(this.itemDescriptionLabel.y + 3 + this.itemDescriptionLabel.textHeight + VERTICAL_MARGIN,this.itemPreview.y + this.itemPreview.height + VERTICAL_MARGIN); } else { local3 = this.itemDescriptionLabel.y + 3 + this.itemDescriptionLabel.textHeight + VERTICAL_MARGIN; } var local7:* = this.showEquippedPanel(this.inner) - 2 - MODULE_SPACING * 2; var local8:int = Math.max(local3,local7); this.areaRect.height = local8; this.areaRect2.height = this.area.height - VERTICAL_MARGIN * 2; if(local8 > param2 - this.margin - BOTTOM_MARGIN - 2 - MODULE_SPACING * 2) { local6 = false; this.itemDescriptionLabel.x = HORIZONTAL_MARGIN - 3; this.itemDescriptionLabel.width = this.areaRect2.width; local3 = local5; local8 = Math.max(local3,local7); this.areaRect.height = local8; this.areaRect2.height = this.inner.height - VERTICAL_MARGIN * 2; } if(this.isKit) { this.updateKitPreview(this.kitFullImage); this.kitInfoPanel.y = this.kitFullImage.bitmapData != null && Boolean(this.scrollContainer.contains(this.kitFullImage)) ? int(this.kitFullImage.height + this.itemNameLabel.height + KIT_INFO_TOP_MARGIN * 2) : int(this.itemNameLabel.height) + KIT_INFO_TOP_MARGIN; this.kitInfoTable.y = this.kitInfoPanel.y; this.itemDescriptionLabel.y = this.kitInfoPanel.y + this.kitInfoTable.getFullTableHeight() + 10; this.kitInfoPanelTopRightCorner.x = this.areaRect2.width - this.kitInfoPanelTopRightCorner.width; this.kitInfoPanelCenterTopLine.width = this.kitInfoPanelTopRightCorner.x - this.kitInfoPanelCenterTopLine.x; this.kitInfoPanelLeftLine.y = this.kitInfoPanelTopLeftCorner.height; this.kitInfoPanelLeftLine.height = this.kitInfoTable.getTopPartTableHeight(); this.kitInfoPanelRightLine.y = this.kitInfoPanelTopRightCorner.height; this.kitInfoPanelRightLine.height = this.kitInfoPanelLeftLine.height; this.kitInfoPanelRightLine.x = this.areaRect2.width - this.kitInfoPanelRightLine.width; this.kitInfoPanelLeftCenterLine.y = this.kitInfoPanelLeftLine.height + this.kitInfoPanelTopLeftCorner.height; this.kitInfoPanelRightCenterLine.y = this.kitInfoPanelLeftCenterLine.y; this.kitInfoPanelRightCenterLine.x = this.kitInfoPanelRightLine.x; this.kitInfoPanelCenterMiddleLine.x = this.kitInfoPanelLeftCenterLine.width; this.kitInfoPanelCenterMiddleLine.y = this.kitInfoPanelRightCenterLine.y; this.kitInfoPanelCenterMiddleLine.width = this.kitInfoPanelRightCenterLine.x - this.kitInfoPanelCenterMiddleLine.x; this.kitInfoPanelLeftLineCenterSummary.y = this.kitInfoPanelCenterMiddleLine.y + this.kitInfoPanelCenterMiddleLine.height; this.kitInfoPanelLeftLineCenterSummary.height = this.kitInfoTable.getBottomPartTableHeight(); this.kitInfoPanelRightLineCenterSummary.y = this.kitInfoPanelLeftLineCenterSummary.y; this.kitInfoPanelRightLineCenterSummary.height = this.kitInfoPanelLeftLineCenterSummary.height; this.kitInfoPanelRightLineCenterSummary.x = this.kitInfoPanelRightLine.x; this.kitInfoPanelLeftLineSummary.y = this.kitInfoPanelLeftLineCenterSummary.y + this.kitInfoPanelLeftLineCenterSummary.height; this.kitInfoPanelRightLineSummary.y = this.kitInfoPanelLeftLineSummary.y; this.kitInfoPanelRightLineSummary.x = this.kitInfoPanelRightCenterLine.x; this.kitInfoPanelCenterBottomLine.y = this.kitInfoPanelLeftLineSummary.y + this.kitInfoPanelLeftLineSummary.height - this.kitInfoPanelCenterBottomLine.height; this.kitInfoPanelCenterBottomLine.x = this.kitInfoPanelLeftLineSummary.width; this.kitInfoPanelCenterBottomLine.width = this.kitInfoPanelCenterTopLine.width; local17 = ItemInfoPanelBitmaps.backgroundPixelTableKit; this.kitInfoPanelBackgroundUp.graphics.clear(); this.kitInfoPanelBackgroundUp.graphics.beginBitmapFill(local17); this.kitInfoPanelBackgroundUp.graphics.drawRect(this.kitInfoPanelTopLeftCorner.width,this.kitInfoPanelTopLeftCorner.height,this.kitInfoPanelCenterTopLine.width,this.kitInfoPanelLeftLine.height); this.kitInfoPanelBackgroundBottom.graphics.clear(); this.kitInfoPanelBackgroundBottom.graphics.beginBitmapFill(local17); this.kitInfoPanelBackgroundBottom.graphics.drawRect(this.kitInfoPanelLeftCenterLine.width,this.kitInfoPanelLeftCenterLine.y + this.kitInfoPanelLeftCenterLine.height,this.kitInfoPanelCenterBottomLine.width,this.kitInfoPanelLeftLineCenterSummary.height); } if(Boolean(this.item) && Boolean(itemService.isGivenPresent(this.item))) { this.presentInfoPanel.y = this.presentFullImage.bitmapData != null && Boolean(this.scrollContainer.contains(this.presentFullImage)) ? this.presentFullImage.height + this.itemNameLabel.height + 20 : this.itemNameLabel.height + 10; this.presentInfoPanel.setMessageWidth(this.areaRect2.width); } this.area.graphics.clear(); this.area.graphics.beginFill(16711680,0); this.area.graphics.drawRect(this.areaRect.x,this.areaRect.y,this.areaRect.width,this.areaRect.height); if(local6) { if(this.item != null && this.itemPreview != null && this.itemPreview.parent == null) { this.showBitmap(this.itemPreview); GarageResistancesIconsUtils.addIconsToParent(this.itemPreview,this.item); } } else { removeDisplayObject(this.itemPreview); } this.actionButtonsContainer.y = this.size.y - this.margin - BUTTON_SIZE.y + 1; this.setButtonsPosition(); if(this.resistPanel.visible) { this.resistPanel.y = this.actionButtonsContainer.y - this.resistPanel.height - VERTICAL_MARGIN / 2; this.resistPanel.x = this.inner.x; } this.scrollPane.setSize(param1 - this.margin * 2 - 2 + 6,local7); this.scrollPane.update(); this.resizeTimeIndicator(); } private function resizeTimeIndicator() : void { if(this.scrollContainer.contains(this.timeIndicator)) { this.timeIndicator.x = this.areaRect2.x + this.areaRect2.width - this.timeIndicator.width + 3; this.timeIndicator.y = this.areaRect2.y - 7; } } public function hideModTable() : void { if(this.scrollContainer.contains(this.modTable)) { this.scrollContainer.removeChild(this.modTable); } } public function showModTable() : void { if(!this.scrollContainer.contains(this.modTable)) { this.scrollContainer.addChild(this.modTable); } } private function updateKitPreview(param1:Bitmap) : void { if(this.kitFullImage.height > 0) { param1.y += KIT_INFO_TOP_MARGIN; this.kitItemTopPreviewDiscount.text = "-" + itemService.getDiscount(this.item) + "%"; this.kitItemTopPreviewDiscount.filters = [new DropShadowFilter(1,45,0,0.7,1,1,1)]; this.kitItemTopPreviewDiscount.x = 302; this.kitItemTopPreviewDiscount.y = int(this.itemNameLabel.height + KIT_INFO_TOP_MARGIN) + 168; if(localeService.language == "cn") { this.kitItemTopPreviewDiscount.x = 300; } if(!this.scrollContainer.contains(this.kitItemTopPreviewDiscount)) { this.scrollContainer.addChild(this.kitItemTopPreviewDiscount); } else { this.scrollContainer.removeChild(this.kitItemTopPreviewDiscount); this.scrollContainer.addChild(this.kitItemTopPreviewDiscount); } } } private function showBitmap(param1:Bitmap) : void { if(param1.bitmapData != null && !this.itemPreviewContainer.contains(param1)) { this.itemPreviewContainer.addChild(param1); } } private function setTimeRemaining(param1:IGameObject) : void { var local2:ITemporaryItem = ITemporaryItem(param1.adapt(ITemporaryItem)); var local3:Date = local2.getStopDate(); this.timeIndicator.text = DateTimeHelper.formatDateTimeWithExpiredLabel(local3); this.resizeTimeIndicator(); } private function inventoryNumChanged(param1:Event = null) : void { var local2:int = getRequiredRank(this.minRankIndex,this.maxRankIndex); var local3:int = this.isCountable ? int(this.inventoryNumStepper.value) : 1; userGarageActionsService.chooseItemCount(this.item); this.buyButton.setInfo(itemService.getPrice(this.item),local3,local2,itemService.isPremiumItem(this.item)); this.setButtonsPosition(); } public function itemUpgraded() : void { if(this.selectWindow != null) { this.selectWindow.itemUpgraded(); } this.showItemInfo(this.item,false); this.resize(this.size.x,this.size.y); this.stopBlinkEffects(); this.doSomethingForEachLabel(this.showGlowEffect); } private function showGlowEffect(param1:int, param2:LabelBase) : void { GlowEffect.glow(param2,param2.textColor); } private function updateBlinkEffect() : void { if(itemService.isUpgrading(this.item)) { this.startBlinkEffects(); } else { this.stopBlinkEffects(); } } private function startBlinkEffects() : void { this.doSomethingForEachLabel(this.startBlinkEffect); } private function doSomethingForEachLabel(param1:Function) : void { var local4:int = 0; var local5:ModInfoRow = null; var local6:int = 0; var local7:int = 0; var local8:LabelBase = null; var local2:Vector.<UpgradableItemPropertyValue> = itemService.getUpgradableItemParams(this.item).visibleProperties; var local3:uint = local2.length; if(itemService.isModificationItem(this.item)) { local4 = int(itemService.getModificationIndex(this.item)); local5 = this.modTable.rows[local4]; local6 = 0; while(local6 < local3) { if(local2[local6].isUpgradable()) { param1(local6,local5.labels[local6]); } local6++; } } else { local7 = 0; while(local7 < local2.length) { if(local2[local7].isUpgradable()) { local8 = propertyService.getParams(local2[local7].getProperty()).icon.getLabel(); param1(local7,local8); } local7++; } } } private function startBlinkEffect(param1:int, param2:DisplayObject) : void { if(this.blinkEffects[param1] == null) { this.blinkEffects[param1] = new BlinkEffect(); } BlinkEffect(this.blinkEffects[param1]).start(param2); } } }
package alternativa.tanks.model.matchmaking.notify { import alternativa.tanks.model.matchmaking.invitewindow.InviteWindowService; import alternativa.tanks.view.mainview.groupinvite.GroupInviteWindow; import alternativa.tanks.view.matchmaking.group.invite.GroupInviteNotification; import alternativa.tanks.view.matchmaking.group.invite.ResponseGroupInviteNotification; import alternativa.types.Long; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectUnloadListener; import projects.tanks.client.battleselect.model.matchmaking.grouplifecycle.invite.IMatchmakingGroupInviteModelBase; import projects.tanks.client.battleselect.model.matchmaking.grouplifecycle.invite.MatchmakingGroupInviteModelBase; import projects.tanks.clients.flash.commons.services.notification.INotificationService; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.groupinvite.GroupInviteService; import projects.tanks.clients.fp10.libraries.tanksservices.service.groupinvite.GroupInviteServiceEvent; import projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup.MatchmakingGroupMembersEvent; import projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup.MatchmakingGroupService; [ModelInfo] public class MatchmakingGroupInviteModel extends MatchmakingGroupInviteModelBase implements IMatchmakingGroupInviteModelBase, ObjectLoadListener, ObjectUnloadListener { [Inject] public static var notificationService:INotificationService; [Inject] public static var matchmakingGroupService:MatchmakingGroupService; [Inject] public static var inviteService:GroupInviteService; [Inject] public static var groupInviteWindowService:InviteWindowService; public function MatchmakingGroupInviteModel() { super(); } public function objectLoaded() : void { matchmakingGroupService.addEventListener(MatchmakingGroupMembersEvent.INVITE,getFunctionWrapper(this.onInviteToGroup)); inviteService.addEventListener(GroupInviteServiceEvent.ACCEPT,getFunctionWrapper(this.onAccept)); inviteService.addEventListener(GroupInviteServiceEvent.REJECT,getFunctionWrapper(this.onReject)); } public function objectUnloaded() : void { matchmakingGroupService.removeEventListener(MatchmakingGroupMembersEvent.INVITE,getFunctionWrapper(this.onInviteToGroup)); inviteService.removeEventListener(GroupInviteServiceEvent.ACCEPT,getFunctionWrapper(this.onAccept)); inviteService.removeEventListener(GroupInviteServiceEvent.REJECT,getFunctionWrapper(this.onReject)); } private function onInviteToGroup(param1:MatchmakingGroupMembersEvent) : void { server.sendInvite(param1.getUserId()); } private function onAccept(param1:GroupInviteServiceEvent) : void { server.accept(param1.sender); } private function onReject(param1:GroupInviteServiceEvent) : void { server.reject(param1.sender); } public function sendInvite(param1:Long) : void { notificationService.addNotification(new GroupInviteNotification(param1)); } public function accepted(param1:Long) : void { var local2:GroupInviteWindow = groupInviteWindowService.getInviteWindow(); if(local2 != null) { local2.removeUser(param1); } notificationService.addNotification(new ResponseGroupInviteNotification(param1,TanksLocale.TEXT_GROUP_INVITE_RESPONSE_ACCEPT)); } public function rejected(param1:Long) : void { notificationService.addNotification(new ResponseGroupInviteNotification(param1,TanksLocale.TEXT_GROUP_INVITE_RESPONSE_DECLINE)); } public function rejectInvitationToGroupDisabled(param1:Long) : void { notificationService.addNotification(new ResponseGroupInviteNotification(param1,TanksLocale.TEXT_GROUP_INVITE_RESPONSE_INVITATIONS_DISABLED)); } public function rejectUserAlreadyInGroup(param1:Long) : void { notificationService.addNotification(new ResponseGroupInviteNotification(param1,TanksLocale.TEXT_GROUP_INVITE_RESPONSE_USER_IN_OTHER_GROUP)); } public function rejectUserAlreadyInBattle(param1:Long) : void { notificationService.addNotification(new ResponseGroupInviteNotification(param1,TanksLocale.TEXT_GROUP_INVITE_RESPONSE_USER_IN_BATTLE)); } public function rejectUserOffline(param1:Long) : void { notificationService.addNotification(new ResponseGroupInviteNotification(param1,TanksLocale.TEXT_GROUP_INVITE_RESPONSE_USER_OFFLINE)); } } }
package alternativa.tanks.models.sfx.shoot { import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Object3D; import alternativa.math.Vector3; import alternativa.object.ClientObject; import alternativa.tanks.sfx.EffectsPair; public interface ICommonShootSFX { function createShotEffects(param1:ClientObject, param2:Vector3, param3:Object3D, param4:Camera3D) : EffectsPair; function createExplosionEffects(param1:ClientObject, param2:Vector3, param3:Camera3D, param4:Number) : EffectsPair; } }
package { import flash.display.Sprite; import flash.system.Security; [ExcludeClass] public class _b6e8e2163fd2450e53cc27f738c9a3fc4c1bc5473d3803096eee3b816b56797f_flash_display_Sprite extends Sprite { public function _b6e8e2163fd2450e53cc27f738c9a3fc4c1bc5473d3803096eee3b816b56797f_flash_display_Sprite() { super(); } public function allowDomainInRSL(... rest) : void { Security.allowDomain.apply(null,rest); } public function allowInsecureDomainInRSL(... rest) : void { Security.allowInsecureDomain.apply(null,rest); } } }
package controls.buttons { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.buttons.H50ButtonSkin_middleClass.png")] public class H50ButtonSkin_middleClass extends BitmapAsset { public function H50ButtonSkin_middleClass() { super(); } } }
package alternativa.tanks.servermodels.emailconfirm { import alternativa.tanks.service.IEntranceClientFacade; import projects.tanks.client.entrance.model.entrance.emailconfirm.ConfirmEmailStatus; import projects.tanks.client.entrance.model.entrance.emailconfirm.EmailConfirmModelBase; import projects.tanks.client.entrance.model.entrance.emailconfirm.IEmailConfirmModelBase; [ModelInfo] public class EmailConfirmModel extends EmailConfirmModelBase implements IEmailConfirmModelBase, IEmailConfirm { [Inject] public static var clientFacade:IEntranceClientFacade; public function EmailConfirmModel() { super(); } public function confirmEmailStatus(param1:ConfirmEmailStatus) : void { clientFacade.confirmEmailStatus(param1); } public function startEmailConfirm(param1:String, param2:String) : void { server.confirmEmail(param2,param1); } } }
package alternativa.tanks.sfx { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.materials.TextureMaterial; import alternativa.math.Matrix4; import alternativa.math.Vector3; import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.utils.objectpool.Pool; import alternativa.tanks.utils.objectpool.PooledObject; public class PlaneMuzzleFlashEffect extends PooledObject implements GraphicEffect { private static const gunDirection:Vector3 = new Vector3(); private static const globalMuzzlePosition:Vector3 = new Vector3(); private static const turretMatrix:Matrix4 = new Matrix4(); private var plane:SimplePlane; private var timetoLive:int; private var turret:Object3D; private var localMuzzlePosition:Vector3 = new Vector3(); private var container:Scene3DContainer; public function PlaneMuzzleFlashEffect(param1:Pool) { super(param1); this.plane = new SimplePlane(1,1,0.5,0); this.plane.setUVs(0,0,0,1,1,1,1,0); this.plane.shadowMapAlphaThreshold = 2; this.plane.depthMapAlphaThreshold = 2; this.plane.useShadowMap = false; this.plane.useLight = false; } public function init(param1:Vector3, param2:Object3D, param3:TextureMaterial, param4:int, param5:Number, param6:Number) : void { this.localMuzzlePosition.copy(param1); this.turret = param2; this.timetoLive = param4; this.plane.setMaterialToAllFaces(param3); this.plane.width = param5; this.plane.length = param6; } public function play(param1:int, param2:GameCamera) : Boolean { if(this.timetoLive < 0) { return false; } this.timetoLive -= param1; turretMatrix.setMatrix(this.turret.x,this.turret.y,this.turret.z,this.turret.rotationX,this.turret.rotationY,this.turret.rotationZ); turretMatrix.transformVector(this.localMuzzlePosition,globalMuzzlePosition); turretMatrix.getAxis(1,gunDirection); SFXUtils.alignObjectPlaneToView(this.plane,globalMuzzlePosition,gunDirection,param2.position); return true; } public function destroy() : void { this.container.removeChild(this.plane); this.container = null; this.turret = null; recycle(); } public function kill() : void { this.timetoLive = -1; } public function addedToScene(param1:Scene3DContainer) : void { this.container = param1; param1.addChild(this.plane); } } }
package projects.tanks.client.battlefield.models.user.reloader { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class TankReloaderModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function TankReloaderModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.services.battleinput { public final class MouseLockLockType { public static const BATTLE_STATS:MouseLockLockType = new MouseLockLockType(1); private var _bit:int; public function MouseLockLockType(param1:int) { super(); this._bit = param1; } public function get bit() : int { return this._bit; } } }
package forms.buttons { import mx.core.BitmapAsset; [ExcludeClass] public class MainPanelDonateButton_normalBtn extends BitmapAsset { public function MainPanelDonateButton_normalBtn() { super(); } } }
package alternativa.tanks.model.matchmaking { [ModelInterface] public interface MatchmakingQueue { function registrationSuccessful() : void; function registrationCancelled() : void; } }
package projects.tanks.client.tanksservices.model.proabonementnotifier { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; public class ProBattleNotifierModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ProBattleNotifierModelServer; private var client:IProBattleNotifierModelBase = IProBattleNotifierModelBase(this); private var modelId:Long = Long.getLong(1634466802,-928935342); private var _setRemainingAbonementTimeSecId:Long = Long.getLong(1929134425,15611068); private var _setRemainingAbonementTimeSec_remainingTimeCodec:ICodec; public function ProBattleNotifierModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ProBattleNotifierModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ProAbonementNotifierCC,false))); this._setRemainingAbonementTimeSec_remainingTimeCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } protected function getInitParam() : ProAbonementNotifierCC { return ProAbonementNotifierCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._setRemainingAbonementTimeSecId: this.client.setRemainingAbonementTimeSec(int(this._setRemainingAbonementTimeSec_remainingTimeCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package controls.scroller.blue { import controls.scroller.ScrollThumbSkin; public class ScrollThumbSkinBlue extends ScrollThumbSkin { public function ScrollThumbSkinBlue() { super(); } override public function initSkin() : void { toppng = new ScrollSkinBlue.thumbTop().bitmapData; midpng = new ScrollSkinBlue.thumbMiddle().bitmapData; } } }
package alternativa.tanks.models.battle.facilities { import platform.client.fp10.core.resource.types.MultiframeTextureResource; import platform.client.fp10.core.resource.types.TextureResource; import projects.tanks.clients.flash.commons.models.coloring.IColoring; internal class DefaultColoring implements IColoring { private var textureResource:TextureResource; public function DefaultColoring(param1:TextureResource) { super(); this.textureResource = param1; } public function getColoring() : TextureResource { return this.textureResource; } public function getAnimatedColoring() : MultiframeTextureResource { return null; } public function isAnimated() : Boolean { return false; } } }
package alternativa.tanks.loader { public interface IModalLoaderService { function show() : void; function hideForcibly() : void; function isVisible() : Boolean; } }
package _codec.projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.cc { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.cc.MachineGunCC; public class VectorCodecMachineGunCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecMachineGunCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(MachineGunCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<MachineGunCC> = new Vector.<MachineGunCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = MachineGunCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:MachineGunCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<MachineGunCC> = Vector.<MachineGunCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package projects.tanks.client.garage.models.item.category { public interface IItemCategoryModelBase { } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapSmallRank12.png")] public class DefaultRanksBitmaps_bitmapSmallRank12 extends BitmapAsset { public function DefaultRanksBitmaps_bitmapSmallRank12() { super(); } } }
package alternativa.tanks.gui.friends.list.renderer { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.friends.list.renderer.ClanMembersListRenderer_gradientGreenIconClass.png")] public class ClanMembersListRenderer_gradientGreenIconClass extends BitmapAsset { public function ClanMembersListRenderer_gradientGreenIconClass() { super(); } } }
package alternativa.tanks.model.userproperties { import alternativa.types.Long; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class IUserPropertiesAdapt implements IUserProperties { private var object:IGameObject; private var impl:IUserProperties; public function IUserPropertiesAdapt(param1:IGameObject, param2:IUserProperties) { super(); this.object = param1; this.impl = param2; } public function getId() : Long { var result:Long = null; try { Model.object = this.object; result = this.impl.getId(); } finally { Model.popObject(); } return result; } public function getName() : String { var result:String = null; try { Model.object = this.object; result = this.impl.getName(); } finally { Model.popObject(); } return result; } public function getScore() : int { var result:int = 0; try { Model.object = this.object; result = int(this.impl.getScore()); } finally { Model.popObject(); } return result; } public function getRank() : int { var result:int = 0; try { Model.object = this.object; result = int(this.impl.getRank()); } finally { Model.popObject(); } return result; } public function getNextScore() : int { var result:int = 0; try { Model.object = this.object; result = int(this.impl.getNextScore()); } finally { Model.popObject(); } return result; } public function getPlace() : int { var result:int = 0; try { Model.object = this.object; result = int(this.impl.getPlace()); } finally { Model.popObject(); } return result; } } }
package alternativa.init { import mx.core.FontAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.init.TanksFontsActivator_IRANSansWebB.ttf", fontName="IRANSans", fontFamily="IRANSansWeb", mimeType="application/x-font", fontWeight="bold", fontStyle="normal", unicodeRange="U+0000,U+0020-007E,U+00A0-00BF,U+00C6-00C6,U+00D7-00D8,U+00DE-00DF,U+00E6-00E6,U+00F7-00F8,U+02BC-02BC,U+02C6-02C7,U+02C9-02C9,U+02D8-02DD,U+02F3-02F3,U+0300-0301,U+0303-0303,U+0309-0309,U+030F-030F,U+0323-0323,U+060C-060C,U+0615-0615,U+061B-061B,U+061F-061F,U+0621-063A,U+0640-0656,U+0660-0671,U+0679-0679,U+067E-067E,U+0686-0686,U+0688-0688,U+0691-0691,U+0698-0698,U+06A9-06A9,U+06AF-06AF,U+06BA-06BA,U+06BE-06BE,U+06C0-06C3,U+06CC-06CC,U+06D2-06D3,U+06D5-06D5,U+06F0-06F9,U+2000-2011,U+2013-2015,U+2017-201E,U+2020-2022,U+2025-2027,U+2030-2030,U+2032-2033,U+2039-203A,U+203C-203C,U+2044-2044,U+2202-2202,U+2206-2206,U+220F-220F,U+2211-2212,U+221A-221A,U+221E-221E,U+222B-222B,U+2248-2248,U+2260-2260,U+2264-2265,U+FB50-FB51,U+FB56-FB59,U+FB66-FB6D,U+FB7A-FB7D,U+FB88-FB95,U+FB9E-FB9F,U+FBA4-FBB1,U+FBE8-FBE9,U+FBFC-FBFF,U+FC5E-FC63,U+FD3E-FD3F,U+FDF2-FDF2,U+FDFC-FDFC,U+FE70-FE70,U+FE72-FE72,U+FE74-FE74,U+FE76-FE76,U+FE78-FE78,U+FE7A-FE7A,U+FE7C-FE7C,U+FE7E-FE7E,U+FE80-FEF1", advancedAntiAliasing="true", embedAsCFF="false" )] public class TanksFontsActivator_IRANSansWebB extends FontAsset { public function TanksFontsActivator_IRANSansWebB() { super(); } } }
package alternativa.tanks.gui.shop.shopitems.item.base { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.shop.shopitems.item.base.RedShopItemSkin_overStateClass.png")] public class RedShopItemSkin_overStateClass extends BitmapAsset { public function RedShopItemSkin_overStateClass() { super(); } } }
package _codec.projects.tanks.client.clans.clan.clanfriends { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.clans.clan.clanfriends.ClanFriendsCC; public class VectorCodecClanFriendsCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecClanFriendsCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ClanFriendsCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<ClanFriendsCC> = new Vector.<ClanFriendsCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ClanFriendsCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ClanFriendsCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ClanFriendsCC> = Vector.<ClanFriendsCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package projects.tanks.client.battlefield.models.tankparts.weapon.laser { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Float; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.types.Vector3d; public class LaserPointerModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:LaserPointerModelServer; private var client:ILaserPointerModelBase = ILaserPointerModelBase(this); private var modelId:Long = Long.getLong(1691794381,-1794202080); private var _aimRemoteAtTankId:Long = Long.getLong(2087187664,-1594727181); private var _aimRemoteAtTank_targetTankCodec:ICodec; private var _aimRemoteAtTank_localSpotPositionCodec:ICodec; private var _hideRemoteId:Long = Long.getLong(1056602643,1332983261); private var _updateRemoteDirectionId:Long = Long.getLong(1740337189,-128463099); private var _updateRemoteDirection_projectionOnVerticalAxisCodec:ICodec; public function LaserPointerModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new LaserPointerModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(LaserPointerCC,false))); this._aimRemoteAtTank_targetTankCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._aimRemoteAtTank_localSpotPositionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false)); this._updateRemoteDirection_projectionOnVerticalAxisCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false)); } protected function getInitParam() : LaserPointerCC { return LaserPointerCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._aimRemoteAtTankId: this.client.aimRemoteAtTank(IGameObject(this._aimRemoteAtTank_targetTankCodec.decode(param2)),Vector3d(this._aimRemoteAtTank_localSpotPositionCodec.decode(param2))); break; case this._hideRemoteId: this.client.hideRemote(); break; case this._updateRemoteDirectionId: this.client.updateRemoteDirection(Number(this._updateRemoteDirection_projectionOnVerticalAxisCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.clients.flash.commons.models.externalauth { import flash.external.ExternalInterface; import flash.utils.Dictionary; import projects.tanks.client.commons.models.externalauth.ExternalAuthApiModelBase; import projects.tanks.client.commons.models.externalauth.ExternalAuthParameters; import projects.tanks.client.commons.models.externalauth.IExternalAuthApiModelBase; [ModelInfo] public class ExternalAuthApiModel extends ExternalAuthApiModelBase implements IExternalAuthApiModelBase, ExternalAuthApi { private static const CALLBACK_NAME:String = "authorizeLoginParams"; private static const LOGIN_METHOD_NAME:String = "loginViaExternal"; public function ExternalAuthApiModel() { super(); } private function authorize(param1:String, param2:Object) : void { var local4:String = null; var local5:String = null; var local3:Dictionary = new Dictionary(); for(local4 in param2) { local5 = param2[local4]; local3[local4] = local5; } server.authorize(param1,new ExternalAuthParameters(local3)); ExternalInterface.addCallback(CALLBACK_NAME,null); } public function initLogin(param1:String) : void { if(ExternalInterface.available) { ExternalInterface.addCallback(CALLBACK_NAME,getFunctionWrapper(this.authorize)); ExternalInterface.call(LOGIN_METHOD_NAME,param1); } } } }
package projects.tanks.client.partners.impl.miniplay { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class MiniplayPaymentModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:MiniplayPaymentModelServer; private var client:IMiniplayPaymentModelBase = IMiniplayPaymentModelBase(this); private var modelId:Long = Long.getLong(922991279,696481140); private var _receivePaymentDataId:Long = Long.getLong(1973287099,901106954); private var _receivePaymentData_priceCodec:ICodec; private var _receivePaymentData_descriptionCodec:ICodec; private var _receivePaymentData_orderIdCodec:ICodec; private var _receivePaymentData_signCodec:ICodec; public function MiniplayPaymentModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new MiniplayPaymentModelServer(IModel(this)); this._receivePaymentData_priceCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); this._receivePaymentData_descriptionCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._receivePaymentData_orderIdCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._receivePaymentData_signCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._receivePaymentDataId: this.client.receivePaymentData(int(this._receivePaymentData_priceCodec.decode(param2)),String(this._receivePaymentData_descriptionCodec.decode(param2)),String(this._receivePaymentData_orderIdCodec.decode(param2)),String(this._receivePaymentData_signCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package alternativa.tanks.models.bonus.notification { import platform.client.fp10.core.resource.types.SoundResource; import projects.tanks.client.battlefield.models.bonus.bonus.notification.BonusNotificationModelBase; import projects.tanks.client.battlefield.models.bonus.bonus.notification.IBonusNotificationModelBase; [ModelInfo] public class BonusNotificationModel extends BonusNotificationModelBase implements IBonusNotificationModelBase, BonusNotification { public function BonusNotificationModel() { super(); } public function getMessage() : String { return getInitParam().notificationMessage; } public function getMessageContainsUid() : String { return getInitParam().notificationMessageContainsUid; } public function getSoundNotification() : SoundResource { return getInitParam().soundNotification; } } }
package alternativa.tanks.gui { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.constants.TextConst; import controls.DefaultButton; import controls.Label; import controls.TankWindowInner; import flash.display.Bitmap; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.navigateToURL; import forms.TankWindowWithHeader; public class SocialNetworksWindow extends Sprite { [Embed(source="1186.png")] private static const iconBitmap:Class; private var window:TankWindowWithHeader; private var innerWindow:TankWindowInner; public var closeBtn:DefaultButton; public var discordBtn:DefaultButton; public var vkBtn:DefaultButton; public var forumBtn:DefaultButton; private var bitmap:Bitmap; private var discordUrl:String; private var vkUrl:String; private var forumUrl:String; private var descText:Label; public var windowWidth; public var windowHeight; public function SocialNetworksWindow() { this.window = TankWindowWithHeader.createWindow("SOCIAL NETWORKS"); this.innerWindow = new TankWindowInner(0,0,TankWindowInner.GREEN); this.closeBtn = new DefaultButton(); this.discordBtn = new DefaultButton(); this.vkBtn = new DefaultButton(); this.forumBtn = new DefaultButton(); this.bitmap = new Bitmap(new iconBitmap().bitmapData); this.descText = new Label(); super(); this.window.width = 340; this.windowWidth = 340; this.window.height = 370; this.windowHeight = 370; addChild(this.window); this.innerWindow.width = this.window.width - 30; this.innerWindow.height = this.window.height - 65; this.innerWindow.x = 15; this.innerWindow.y = 15; addChild(this.innerWindow); this.closeBtn.x = this.window.width - this.closeBtn.width - 15; this.closeBtn.y = this.window.height - this.closeBtn.height - 15; this.closeBtn.label = ILocaleService(Main.osgi.getService(ILocaleService)).getText(TextConst.FREE_BONUSES_WINDOW_BUTTON_CLOSE_TEXT); addChild(this.closeBtn); this.parseLinks(); this.initButtons(); this.initText(); } private function initButtons() : void { this.discordBtn.x = this.innerWindow.x + 5; this.discordBtn.y = this.innerWindow.y + 5; this.discordBtn.label = "DISCORD"; this.discordBtn.addEventListener(MouseEvent.CLICK,this.openUrl); addChild(this.discordBtn); this.vkBtn.x = this.discordBtn.x + this.discordBtn.width + 5; this.vkBtn.y = this.innerWindow.y + 5; this.vkBtn.label = "VK GROUP"; this.vkBtn.addEventListener(MouseEvent.CLICK,this.openUrl); addChild(this.vkBtn); this.forumBtn.x = this.vkBtn.x + this.vkBtn.width + 5; this.forumBtn.y = this.innerWindow.y + 5; this.forumBtn.label = "FORUM"; this.forumBtn.addEventListener(MouseEvent.CLICK,this.openUrl); addChild(this.forumBtn); } private function initText() : void { this.descText.color = 5898034; this.descText.text = "Социальная сеть — онлайн-платформа, которая\nиспользуется для общения, знакомств,\nсоздания социальных отношений между танкистами,\nкоторые имеют схожие интересы, а также для\nразвлечения и работы"; this.descText.x = 5; this.descText.y = this.discordBtn.y + 20; this.innerWindow.addChild(this.descText); this.bitmap.x = this.innerWindow.width / 2 - this.bitmap.width / 2; this.bitmap.y = this.descText.y + this.descText.height + 10; this.innerWindow.addChild(this.bitmap); } private function parseLinks() : void { var urlLoader:URLLoader = null; urlLoader = new URLLoader(); urlLoader.addEventListener(Event.COMPLETE,function():void { discordUrl = JSON.parse(urlLoader.data).discordUrl; vkUrl = JSON.parse(urlLoader.data).vkUrl; forumUrl = JSON.parse(urlLoader.data).forumUrl; }); urlLoader.load(new URLRequest("socialNetworksUrl.json")); } private function openUrl(e:MouseEvent) : void { var target:DefaultButton = null; if(e.currentTarget as DefaultButton != null) { target = e.currentTarget as DefaultButton; switch(target.label) { case "DISCORD": navigateToURL(new URLRequest(this.discordUrl),"_self"); break; case "VK GROUP": navigateToURL(new URLRequest(this.vkUrl),"_self"); break; case "FORUM": navigateToURL(new URLRequest(this.forumUrl),"_self"); } } } } }
package alternativa.tanks.model.quest.common.gui.window.navigatepanel { import alternativa.tanks.model.quest.common.gui.QuestChangesIndicator; import alternativa.tanks.model.quest.common.notification.QuestNotificationEvent; import alternativa.tanks.model.quest.common.notification.QuestNotifierService; import controls.buttons.CategoryButtonSkin; import controls.buttons.FixedHeightButton; import controls.buttons.h30px.H30ButtonSkin; import projects.tanks.client.panel.model.quest.QuestTypeEnum; public class QuestTabButton extends FixedHeightButton { [Inject] public static var questNotifierService:QuestNotifierService; private static const INDICATOR_X_OFFSET:int = -16; private static const INDICATOR_Y_OFFSET:int = -4; private var questType:QuestTypeEnum; private var indicator:QuestChangesIndicator; public function QuestTabButton(param1:QuestTypeEnum, param2:String) { super(new CategoryButtonSkin()); this.questType = param1; labelSize = H30ButtonSkin.DEFAULT_LABEL_SIZE; labelHeight = H30ButtonSkin.DEFAULT_LABEL_HEIGHT; labelPositionY = H30ButtonSkin.DEFAULT_LABEL_Y; this.label = param2; buttonMode = true; useHandCursor = true; this.indicator = new QuestChangesIndicator(); questNotifierService.addEventListener(QuestNotificationEvent.SHOW_NOTIFICATION,this.onShowNotification); questNotifierService.addEventListener(QuestNotificationEvent.HIDE_NOTIFICATION,this.onHideNotification); addChild(this.indicator); this.indicator.visible = questNotifierService.hasChange(param1); this.indicator.x = width + INDICATOR_X_OFFSET; this.indicator.y = INDICATOR_Y_OFFSET; } public function getQuestType() : QuestTypeEnum { return this.questType; } private function onShowNotification(param1:QuestNotificationEvent) : void { if(param1.questType == this.questType) { this.indicator.visible = true; } } private function onHideNotification(param1:QuestNotificationEvent) : void { if(param1.questType == this.questType) { this.indicator.visible = false; } } } }
package _codec.projects.tanks.client.battlefield.models.effects.effectlevel { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.effects.effectlevel.EffectLevelCC; public class CodecEffectLevelCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_effectLevel:ICodec; public function CodecEffectLevelCC() { super(); } public function init(param1:IProtocol) : void { this.codec_effectLevel = param1.getCodec(new TypeCodecInfo(int,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:EffectLevelCC = new EffectLevelCC(); local2.effectLevel = this.codec_effectLevel.decode(param1) as int; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:EffectLevelCC = EffectLevelCC(param2); this.codec_effectLevel.encode(param1,local3.effectLevel); } } }
package alternativa.tanks.gui.confirm { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.gui.resistance.GarageResistancesIconsUtils; import alternativa.tanks.service.item.ItemService; import assets.Diamond; import assets.icons.IconGarageMod; import controls.Money; import controls.TankWindow; import controls.TankWindowInner; import controls.ValidationIcon; import controls.base.DefaultButtonBase; import controls.base.LabelBase; import flash.display.Bitmap; import flash.display.BitmapData; import flash.events.Event; import flash.events.MouseEvent; import flash.geom.Point; import platform.client.fp10.core.resource.types.ImageResource; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.commons.types.ItemCategoryEnum; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow; import utils.preview.IImageResource; import utils.preview.ImageResourceLoadingWrapper; public class ConfirmAlert extends DialogWindow implements IImageResource { [Inject] public static var localeService:ILocaleService; [Inject] public static var itemService:ItemService; private var upgradeIndicator:IconGarageMod; protected var previewInner:TankWindowInner; private var confirmButton:DefaultButtonBase; private var cancelButton:DefaultButtonBase; protected const WINDOW_MARGIN:int = 11; protected const SPACE_MODULE:int = 7; protected const PREVIEW_SIZE:Point = new Point(164,106); protected const BUTTON_SIZE:Point = new Point(104,33); protected var windowWidth:int; protected var nameLabel:LabelBase = new LabelBase(); private var cost:int; private var previewLoadingIcon:ValidationIcon; private var previewLoadingWrapper:ImageResourceLoadingWrapper; private var preview:ImageResource; private var item:IGameObject; public function ConfirmAlert(param1:IGameObject, param2:int, param3:int = -1) { super(); this.preview = itemService.getPreviewResource(param1); this.item = param1; var local4:String = this.getItemName(param1); var local5:int = int(itemService.getModificationIndex(param1)); this.windowWidth = Math.max(this.BUTTON_SIZE.x * 2 + this.WINDOW_MARGIN * 2 + this.SPACE_MODULE,this.PREVIEW_SIZE.x + this.WINDOW_MARGIN * 4); var local6:TankWindow = new TankWindow(this.windowWidth,this.getWindowHeight()); addChild(local6); this.previewInner = new TankWindowInner(0,0,TankWindowInner.GREEN); this.previewInner.x = this.WINDOW_MARGIN; this.previewInner.y = this.WINDOW_MARGIN; this.previewInner.width = this.windowWidth - this.WINDOW_MARGIN * 2; this.previewInner.height = this.PREVIEW_SIZE.y + this.WINDOW_MARGIN * 2; addChild(this.previewInner); this.loadAndAddPreview(); if(local5 != -1) { this.upgradeIndicator = new IconGarageMod(); addChild(this.upgradeIndicator); this.upgradeIndicator.x = this.windowWidth - this.WINDOW_MARGIN - this.SPACE_MODULE - this.upgradeIndicator.width + 2; this.upgradeIndicator.y = this.WINDOW_MARGIN + this.SPACE_MODULE - 1; this.upgradeIndicator.mod = local5; } var local7:LabelBase = new LabelBase(); addChild(local7); local7.text = this.getQuestion(); local7.x = this.windowWidth - local7.width >> 1; local7.width = this.windowWidth - this.WINDOW_MARGIN * 2; local7.y = this.previewInner.y + this.PREVIEW_SIZE.y + this.WINDOW_MARGIN * 2 + this.SPACE_MODULE; addChild(this.nameLabel); if(local5 > 0) { this.nameLabel.text = "\"" + local4 + "\" " + localeService.getText(TanksLocale.TEXT_GARAGE_CONFIRM_ALERT_COST_PREFIX); } else { this.nameLabel.text = "\"" + local4 + "\" " + (param3 > 1 ? "(" + param3 + ") " : "") + localeService.getText(TanksLocale.TEXT_GARAGE_CONFIRM_ALERT_COST_PREFIX); } var local8:Diamond = new Diamond(); addChild(local8); var local9:LabelBase = new LabelBase(); addChild(local9); local9.text = Money.numToString(param2,false); var local10:int = this.nameLabel.width + local9.width + local8.width + 2; var local11:int = this.windowWidth - local10 >> 1; this.nameLabel.x = local11; this.nameLabel.y = local7.y + local7.height + this.WINDOW_MARGIN; local8.x = this.nameLabel.x + this.nameLabel.width + 2; local8.y = this.nameLabel.y + 5; local9.x = local8.x + local8.width; local9.y = this.nameLabel.y; this.cancelButton = new DefaultButtonBase(); addChild(this.cancelButton); this.cancelButton.label = localeService.getText(TanksLocale.TEXT_GARAGE_CONFIRM_ALERT_CANCEL_BUTTON_TEXT); this.cancelButton.x = this.windowWidth - this.BUTTON_SIZE.x - 3; this.cancelButton.y = this.getWindowHeight() - this.WINDOW_MARGIN - this.BUTTON_SIZE.y + 2; this.confirmButton = new DefaultButtonBase(); addChild(this.confirmButton); this.confirmButton.label = localeService.getText(TanksLocale.TEXT_GARAGE_CONFIRM_ALERT_CONFIRM_BUTTON_TEXT); this.confirmButton.x = this.WINDOW_MARGIN; this.confirmButton.y = this.getWindowHeight() - this.WINDOW_MARGIN - this.BUTTON_SIZE.y + 2; this.cancelButton.addEventListener(MouseEvent.CLICK,this.onClickCancel); this.confirmButton.addEventListener(MouseEvent.CLICK,this.onClickConfirm); dialogService.addDialog(this); this.cost = param2; } private function loadAndAddPreview() : void { if(this.preview.isLoaded) { this.addPreview(this.preview.data); } else { this.addAndStartLoadingIcon(); this.previewLoadingWrapper = new ImageResourceLoadingWrapper(this); this.preview.loadLazyResource(this.previewLoadingWrapper); } } private function addAndStartLoadingIcon() : void { this.previewLoadingIcon = new ValidationIcon(); addChild(this.previewLoadingIcon); this.previewLoadingIcon.x = this.windowWidth - this.previewLoadingIcon.width >> 1; this.previewLoadingIcon.y = this.WINDOW_MARGIN + (this.previewInner.height - this.previewLoadingIcon.height >> 1); this.previewLoadingIcon.startProgress(); } private function addPreview(param1:BitmapData) : void { var local2:Bitmap = new Bitmap(param1); addChild(local2); local2.x = this.previewInner.x + (this.previewInner.width - param1.width >> 1); local2.y = this.previewInner.y + (this.previewInner.height - param1.height >> 1); if(itemService.getCategory(this.item) == ItemCategoryEnum.RESISTANCE_MODULE) { GarageResistancesIconsUtils.addIconsToParent(local2,this.item); } } public function setPreviewResource(param1:ImageResource) : void { this.previewLoadingWrapper = null; this.previewLoadingIcon.turnOff(); this.addPreview(param1.data); } protected function getWindowHeight() : int { return 240; } protected function getQuestion() : String { return localeService.getText(TanksLocale.TEXT_GARAGE_CONFIRM_ALERT_BUY_QEUSTION_TEXT); } protected function getItemName(param1:IGameObject) : String { return itemService.getName(param1); } override protected function cancelKeyPressed() : void { this.onClickCancel(); } private function onClickCancel(param1:MouseEvent = null) : void { this.hide(); dispatchEvent(new Event(Event.CANCEL)); } private function hide() : void { if(Boolean(this.previewLoadingWrapper)) { this.preview.removeLazyListener(this.previewLoadingWrapper); } this.cancelButton.removeEventListener(MouseEvent.CLICK,this.onClickCancel); this.confirmButton.removeEventListener(MouseEvent.CLICK,this.onClickConfirm); dialogService.removeDialog(this); } override protected function confirmationKeyPressed() : void { this.onClickConfirm(); } private function onClickConfirm(param1:MouseEvent = null) : void { this.hide(); dispatchEvent(new ConfirmAlertEvent(this.cost)); } } }
package alternativa.tanks.models.weapon.turret { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class TurretStateSenderEvents implements TurretStateSender { private var object:IGameObject; private var impl:Vector.<Object>; public function TurretStateSenderEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function sendTurretState() : void { var i:int = 0; var m:TurretStateSender = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = TurretStateSender(this.impl[i]); m.sendTurretState(); i++; } } finally { Model.popObject(); } } } }
package forms.buttons { import mx.core.BitmapAsset; [ExcludeClass] public class MainPanelRatingButton_iconN extends BitmapAsset { public function MainPanelRatingButton_iconN() { super(); } } }
package controls { import controls.base.BigButtonBase; import controls.buttons.ButtonStates; public class TypeBattleButton extends BigButtonBase { private var _data:Object; public function TypeBattleButton() { super(); _label.multiline = true; _label.wordWrap = true; _label.height = 45; } override protected function onDisable() : void { super.onDisable(); setState(ButtonStates.DOWN); this.align(); } override protected function onEnable() : void { super.onEnable(); this.align(); } override public function set label(param1:String) : void { super.label = param1; this.align(); } override protected function onStateChanged() : void { super.onStateChanged(); this.align(); } private function align() : void { var local1:int = getState() == ButtonStates.DOWN ? 1 : 0; _label.y = int(25 - _label.textHeight / 2) + local1; _info.y = 24 + local1; } public function get data() : Object { return this._data; } public function set data(param1:Object) : void { this._data = param1; } } }
package alternativa.resource { import alternativa.types.Long; import alternativa.types.LongFactory; public class ResourceWrapper implements IResource { private var library:Object; public function ResourceWrapper(library:Object) { super(); this.library = library; } public function load(url:String) : void { this.library.load(url); } public function unload() : void { this.library.unload(); } public function get name() : String { return this.library.name; } public function get id() : Long { return LongFactory.getLong(0,this.library.id); } public function set id(value:Long) : void { this.library.id = value.low; } public function set version(value:int) : void { this.library.version = value; } public function get version() : int { return this.library.version; } public function close() : void { } } }
package alternativa.tanks.view.battlecreate { import alternativa.osgi.service.locale.ILocaleService; import projects.tanks.client.battleservice.model.map.params.MapTheme; import projects.tanks.clients.fp10.libraries.TanksLocale; public class CreateBattleFormLabels { [Inject] public static var localeService:ILocaleService; public function CreateBattleFormLabels() { super(); } public static function get mapNameLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_MAP_TYPE_LABEL); } public static function get themeMapNameLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_MAP_THEME_LABEL); } public static function get stepperMaxPlayersLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_STEPPER_MAX_PLAYERS); } public static function get stepperMaxTeamPlayersLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_STEPPER_MAX_TEAM_SIZE); } public static function get stepperTimeLimitLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_STEPPER_TIME_LIMIT); } public static function get stepperKillsLimitLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_STEPPER_KILLS_LIMIT); } public static function get stepperFlagsLimitLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_STEPPER_FLAG_LIMIT); } public static function get checkBoxAutoBalanceLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_CHECKBOX_AUTOBALANCE); } public static function get checkBoxFriendlyFireLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_CHECKBOX_FRIENDLY_FIRE); } public static function get checkBoxDronesLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_DRONES); } public static function get checkBoxNoSuppliesLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_SUPPLIES_TEXT); } public static function get checkBoxDependentCooldownLabel() : String { return localeService.getText(TanksLocale.TEXT_SMART_SUPPLIES); } public static function get checkBoxBonusesLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_BONUS_BOX_TEXT); } public static function get checkBoxGoldBoxesLabel() : String { return localeService.getText(TanksLocale.TEXT_CREATE_BATTLE_PANEL_GOLD_BOXES); } public static function get checkBoxUpgradesLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_UPGRADES_TEXT); } public static function get checkBoxPrivateBattleLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_CHECKBOX_PRIVATE_BATTLE); } public static function get startButtonLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_BUTTON_START); } public static function get deathMatchButtonLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_BUTTON_DEATHMATCH); } public static function get teamDeathMatchButtonLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_BUTTON_TEAM_DEATHMATCH); } public static function get captureTheFlagButtonLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_BUTTON_CAPTURE_THE_FLAG); } public static function get dominationButtonLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_BUTTON_CONTROL_THE_POINT); } public static function get deathMatchButtonShortLabel() : String { return localeService.getText(TanksLocale.TEXT_DM_SHORT_NAME); } public static function get teamDeathMatchButtonShortLabel() : String { return localeService.getText(TanksLocale.TEXT_TDM_SHORT_NAME); } public static function get captureTheFlagButtonShortLabel() : String { return localeService.getText(TanksLocale.TEXT_CTF_SHORT_NAME); } public static function get dominationButtonShortLabel() : String { return localeService.getText(TanksLocale.TEXT_CP_SHORT_NAME); } public static function get stepperDominationLimitLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_STEPPER_TEAM_SCORE_LIMIT); } public static function get checkBoxReArmorLabel() : String { return localeService.getText(TanksLocale.TEXT_REARM_OPTION_TEXT); } public static function get checkBoxAutoCompletionLabel() : String { return localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_CHECKBOX_AUTO_COMPLETION); } public static function get checkBoxDevicesLabel() : String { return localeService.getText(TanksLocale.TEXT_DEVICES); } public static function get checkBoxClanLabel() : String { return localeService.getText(TanksLocale.TEXT_CLAN_VS_CLAN); } public static function get checkBoxUltimatesLabel() : String { return localeService.getText(TanksLocale.TEXT_ULTIMATES); } public static function getThemeName(param1:MapTheme) : String { switch(param1.value) { case MapTheme.SUMMER.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_SUMMER); case MapTheme.WINTER.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_WINTER); case MapTheme.SPACE.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_SPACE); case MapTheme.DAY.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_DAY); case MapTheme.NIGHT.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_NIGHT); case MapTheme.SUMMER_DAY.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_SUMMER_DAY); case MapTheme.SUMMER_NIGHT.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_SUMMER_NIGHT); case MapTheme.WINTER_DAY.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_WINTER_DAY); case MapTheme.WINTER_NIGHT.value: return localeService.getText(TanksLocale.TEXT_MAP_THEME_NAME_WINTER_NIGHT); default: return null; } } } }
package alternativa.tanks.models.effects.common { import alternativa.tanks.bonuses.Bonus; import alternativa.types.Long; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class IBonusCommonModelEvents implements IBonusCommonModel { private var object:IGameObject; private var impl:Vector.<Object>; public function IBonusCommonModelEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getBonus(param1:Long) : Bonus { var result:Bonus = null; var i:int = 0; var m:IBonusCommonModel = null; var bonusInstanceId:Long = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = IBonusCommonModel(this.impl[i]); result = m.getBonus(bonusInstanceId); i++; } } finally { Model.popObject(); } return result; } } }
package _codec.projects.tanks.client.entrance.model.entrance.logging { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.entrance.model.entrance.logging.RegistrationUXScreen; public class CodecRegistrationUXScreen implements ICodec { public function CodecRegistrationUXScreen() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:RegistrationUXScreen = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = RegistrationUXScreen.MAIN; break; case 1: local2 = RegistrationUXScreen.VK; break; case 2: local2 = RegistrationUXScreen.FACEBOOK; break; case 3: local2 = RegistrationUXScreen.GOOGLE; break; case 4: local2 = RegistrationUXScreen.PARTNER; break; case 5: local2 = RegistrationUXScreen.LOGIN; break; case 6: local2 = RegistrationUXScreen.SITE; break; case 7: local2 = RegistrationUXScreen.TUTORIAL; break; case 8: local2 = RegistrationUXScreen.STANDALONE; } return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:int = int(param2.value); param1.writer.writeInt(local3); } } }
package alternativa.tanks.display.usertitle { import mx.core.BitmapAsset; [ExcludeClass] public class ProgressBarSkin_weaponRightCls extends BitmapAsset { public function ProgressBarSkin_weaponRightCls() { super(); } } }
package alternativa.engine3d.core { import alternativa.gfx.agal.FragmentShader; import alternativa.gfx.agal.SamplerDim; import alternativa.gfx.agal.SamplerFilter; import alternativa.gfx.agal.SamplerMipMap; import alternativa.gfx.agal.SamplerRepeat; public class ShadowMapFragmentShader extends FragmentShader { public function ShadowMapFragmentShader(param1:Boolean) { super(); if(param1) { tex(ft0,v1,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.LINEAR).mipmap(SamplerMipMap.NONE)); sub(ft0.w,ft0,v1); kil(ft0.w); } frc(ft0,v0.z); sub(ft0.x,v0.z,ft0); mul(ft0.x,ft0,fc[0]); mov(ft0.zw,fc[0]); mov(oc,ft0); } } }
package utils { public class FontParamsUtil { public static const SHARPNESS_LABEL_BASE:int = 40; public static const THICKNESS_LABEL_BASE:int = 70; public static const SHARPNESS_TANK_INPUT_BASE:int = -210; public static const THICKNESS_TANK_INPUT_BASE:int = 50; public function FontParamsUtil() { super(); } } }
package alternativa.tanks.models.battle.battlefield.keyboard { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_supercumulativeIconClass.png")] public class DeviceIcons_supercumulativeIconClass extends BitmapAsset { public function DeviceIcons_supercumulativeIconClass() { super(); } } }
package _codec.projects.tanks.client.garage.models.item.upgradeable.types { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.garage.models.item.upgradeable.types.PropertyData; public class VectorCodecPropertyDataLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecPropertyDataLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(PropertyData,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<PropertyData> = new Vector.<PropertyData>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = PropertyData(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:PropertyData = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<PropertyData> = Vector.<PropertyData>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package forms.userlabel { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.userlabel.ChatUserLabel_eventSilverStatusIconClass.png")] public class ChatUserLabel_eventSilverStatusIconClass extends BitmapAsset { public function ChatUserLabel_eventSilverStatusIconClass() { super(); } } }
package projects.tanks.client.partners.impl.vkontakte { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class VkontaktePaymentModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:VkontaktePaymentModelServer; private var client:IVkontaktePaymentModelBase = IVkontaktePaymentModelBase(this); private var modelId:Long = Long.getLong(982237961,270527442); private var _receivePaymentTransactionId:Long = Long.getLong(780155353,1879122584); private var _receivePaymentTransaction_transactionIdCodec:ICodec; public function VkontaktePaymentModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new VkontaktePaymentModelServer(IModel(this)); this._receivePaymentTransaction_transactionIdCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._receivePaymentTransactionId: this.client.receivePaymentTransaction(String(this._receivePaymentTransaction_transactionIdCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package controls.scroller.green { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.scroller.green.ScrollSkinGreen_trackBottom.png")] public class ScrollSkinGreen_trackBottom extends BitmapAsset { public function ScrollSkinGreen_trackBottom() { super(); } } }
package alternativa.engine3d.loaders.collada { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.animation.AnimationClip; import alternativa.engine3d.animation.keys.NumberTrack; import alternativa.engine3d.animation.keys.Track; import alternativa.engine3d.animation.keys.TransformTrack; import alternativa.engine3d.containers.LODContainer; import alternativa.engine3d.core.Light3D; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.Object3DContainer; import alternativa.engine3d.core.Sorting; import alternativa.engine3d.objects.BSP; import alternativa.engine3d.objects.Mesh; import alternativa.engine3d.objects.Skin; import alternativa.engine3d.objects.Sprite3D; import flash.geom.Matrix3D; import flash.geom.Vector3D; use namespace collada; use namespace alternativa3d; use namespace daeAlternativa3DInstance; public class DaeNode extends DaeElement { public var scene:DaeVisualScene; public var parent:DaeNode; public var skinOrTopmostJoint:Boolean = false; public var rootJoint:DaeNode = null; private var channels:Vector.<DaeChannel>; private var instanceControllers:Vector.<DaeInstanceController>; public var nodes:Vector.<DaeNode>; public var objects:Vector.<DaeObject>; public var skins:Vector.<DaeObject>; public function DaeNode(param1:XML, param2:DaeDocument, param3:DaeVisualScene = null, param4:DaeNode = null) { super(param1,param2); this.scene = param3; this.parent = param4; this.constructNodes(); } public function get animName() : String { var local1:String = this.name; return local1 == null ? this.id : local1; } private function constructNodes() : void { var local4:DaeNode = null; var local1:XMLList = data.node; var local2:int = int(local1.length()); this.nodes = new Vector.<DaeNode>(local2); var local3:int = 0; while(local3 < local2) { local4 = new DaeNode(local1[local3],document,this.scene,this); if(local4.id != null) { document.nodes[local4.id] = local4; } this.nodes[local3] = local4; local3++; } } internal function registerInstanceControllers() : void { var local2:int = 0; var local4:XML = null; var local5:DaeInstanceController = null; var local6:Vector.<DaeNode> = null; var local7:int = 0; var local8:DaeNode = null; var local9:int = 0; var local1:XMLList = data.instance_controller; var local3:int = int(local1.length()); local2 = 0; while(local2 < local3) { this.skinOrTopmostJoint = true; local4 = local1[local2]; local5 = new DaeInstanceController(local4,document,this); if(local5.parse()) { local6 = local5.topmostJoints; local7 = int(local6.length); if(local7 > 0) { local8 = local6[0]; local8.addInstanceController(local5); if(this.rootJoint == null) { this.rootJoint = local8; } local9 = 0; while(local9 < local7) { local6[local9].skinOrTopmostJoint = true; local9++; } } } local2++; } local3 = int(this.nodes.length); local2 = 0; while(local2 < local3) { this.nodes[local2].registerInstanceControllers(); local2++; } } public function addChannel(param1:DaeChannel) : void { if(this.channels == null) { this.channels = new Vector.<DaeChannel>(); } this.channels.push(param1); } public function addInstanceController(param1:DaeInstanceController) : void { if(this.instanceControllers == null) { this.instanceControllers = new Vector.<DaeInstanceController>(); } this.instanceControllers.push(param1); } override protected function parseImplementation() : Boolean { this.skins = this.parseSkins(); this.objects = this.parseObjects(); return true; } private function parseInstanceMaterials(param1:XML) : Object { var local6:DaeInstanceMaterial = null; var local2:Object = new Object(); var local3:XMLList = param1.bind_material.technique_common.instance_material; var local4:int = 0; var local5:int = int(local3.length()); while(local4 < local5) { local6 = new DaeInstanceMaterial(local3[local4],document); local2[local6.symbol] = local6; local4++; } return local2; } public function getNodeBySid(param1:String) : DaeNode { var local5:int = 0; var local6:Vector.<Vector.<DaeNode>> = null; var local7:Vector.<DaeNode> = null; var local8:int = 0; var local9:int = 0; var local10:DaeNode = null; if(param1 == this.sid) { return this; } var local2:Vector.<Vector.<DaeNode>> = new Vector.<Vector.<DaeNode>>(); var local3:Vector.<Vector.<DaeNode>> = new Vector.<Vector.<DaeNode>>(); local2.push(this.nodes); var local4:int = int(local2.length); while(local4 > 0) { local5 = 0; while(local5 < local4) { local7 = local2[local5]; local8 = int(local7.length); local9 = 0; while(local9 < local8) { local10 = local7[local9]; if(local10.sid == param1) { return local10; } if(local10.nodes.length > 0) { local3.push(local10.nodes); } local9++; } local5++; } local6 = local2; local2 = local3; local3 = local6; local3.length = 0; local4 = int(local2.length); } return null; } public function parseSkins() : Vector.<DaeObject> { var local4:DaeInstanceController = null; var local5:DaeObject = null; var local6:Skin = null; var local7:BSP = null; var local8:DaeObject = null; if(this.instanceControllers == null) { return null; } var local1:Vector.<DaeObject> = new Vector.<DaeObject>(); var local2:int = 0; var local3:int = int(this.instanceControllers.length); while(local2 < local3) { local4 = this.instanceControllers[local2]; local4.parse(); local5 = local4.parseSkin(this.parseInstanceMaterials(local4.data)); if(local5 != null) { local6 = Skin(local5.object); local6.name = local4.node.name; if(this.isAlternativa3DObject(local4.node)) { this.updateAlternativa3DMesh(local4.node,local6,local5); if(local6.sorting == 3) { local7 = new BSP(); local7.name = local6.name; local7.splitAnalysis = local6.alternativa3d::transformId > 0; local7.createTree(local6,true); local8 = this.applyAnimation(this.applyTransformations(local7)); local8.isSplitter = local5.isSplitter; local8.isStaticGeometry = local5.isStaticGeometry; local1.push(local8); } else { if(local6.sorting == Sorting.DYNAMIC_BSP && local6.alternativa3d::transformId > 0) { local6.optimizeForDynamicBSP(); } local1.push(local5); } } else { local1.push(local5); } } local2++; } return local1.length > 0 ? local1 : null; } public function parseObjects() : Vector.<DaeObject> { var local3:int = 0; var local4:int = 0; var local5:DaeObject = null; var local6:XML = null; var local7:DaeLight = null; var local8:DaeGeometry = null; var local9:Light3D = null; var local10:Matrix3D = null; var local11:Mesh = null; var local12:DaeObject = null; var local13:BSP = null; var local1:Vector.<DaeObject> = new Vector.<DaeObject>(); if(this.isAlternativa3DObject(this)) { local5 = this.parseAlternativa3DObject(); if(local5 != null) { local1.push(local5); } } var local2:XMLList = data.children(); local3 = 0; local4 = int(local2.length()); while(local3 < local4) { local6 = local2[local3]; switch(local6.localName()) { case "instance_light": local7 = document.findLight(local6.@url[0]); if(local7 != null) { local9 = local7.parseLight(); if(local9 != null) { local9.name = name; if(local7.revertDirection) { local10 = new Matrix3D(); local10.appendRotation(180,Vector3D.X_AXIS); local1.push(new DaeObject(this.applyTransformations(local9,local10))); } else { local1.push(this.applyAnimation(this.applyTransformations(local9))); } } } else { document.logger.logNotFoundError(local6.@url[0]); } break; case "instance_geometry": local8 = document.findGeometry(local6.@url[0]); if(local8 != null) { local8.parse(); local11 = local8.parseMesh(this.parseInstanceMaterials(local6)); if(local11 != null) { local11.name = name; local12 = this.applyAnimation(this.applyTransformations(local11)); if(this.isAlternativa3DObject(this)) { this.updateAlternativa3DMesh(this,local11,local12); if(local11.sorting == 3) { local13 = new BSP(); local13.splitAnalysis = local11.alternativa3d::transformId > 0; local13.createTree(local11,true); local13.name = local11.name; local13.matrix = local11.matrix; local12.object = local13; } else if(local11.sorting == Sorting.DYNAMIC_BSP && local11.alternativa3d::transformId > 0) { local11.optimizeForDynamicBSP(); } } local1.push(local12); } } else { document.logger.logNotFoundError(local6.@url[0]); } break; case "instance_node": document.logger.logInstanceNodeError(local6); break; } local3++; } return local1.length > 0 ? local1 : null; } private function getMatrix(param1:Matrix3D = null) : Matrix3D { var local3:Array = null; var local6:XML = null; var local7:XML = null; var local2:Matrix3D = param1 == null ? new Matrix3D() : param1; var local4:XMLList = data.children(); var local5:int = local4.length() - 1; for(; local5 >= 0; local5--) { local6 = local4[local5]; local7 = local6.@sid[0]; if(local7 != null && local7.toString() == "post-rotationY") { continue; } switch(local6.localName()) { case "scale": local3 = parseNumbersArray(local6); local2.appendScale(local3[0],local3[1],local3[2]); break; case "rotate": local3 = parseNumbersArray(local6); local2.appendRotation(local3[3],new Vector3D(local3[0],local3[1],local3[2])); break; case "translate": local3 = parseNumbersArray(local6); local2.appendTranslation(local3[0],local3[1],local3[2]); break; case "matrix": local3 = parseNumbersArray(local6); local2.append(new Matrix3D(Vector.<Number>([local3[0],local3[4],local3[8],local3[12],local3[1],local3[5],local3[9],local3[13],local3[2],local3[6],local3[10],local3[14],local3[3],local3[7],local3[11],local3[15]]))); break; case "lookat": break; case "skew": document.logger.logSkewError(local6); break; } } return local2; } public function applyTransformations(param1:Object3D, param2:Matrix3D = null, param3:Matrix3D = null) : Object3D { var local4:Matrix3D = null; if(param3 != null) { local4 = this.getMatrix(param2); local4.append(param3); param1.matrix = local4; } else { param1.matrix = this.getMatrix(param2); } return param1; } private function isAlternativa3DObject(param1:DaeNode) : Boolean { var node:DaeNode = param1; return node.data.extra.technique.(@profile == "Alternativa3D")[0] != null; } private function parseAlternativa3DObject() : DaeObject { var techniqueXML:XML = null; var profile:XML = null; var containerXML:XML = null; var spriteXML:XML = null; var lodXML:XML = null; var daeContainer:DaeAlternativa3DObject = null; var container:Object3DContainer = null; var daeSprite:DaeAlternativa3DObject = null; var sprite:Sprite3D = null; var material:DaeMaterial = null; var daeLod:DaeAlternativa3DObject = null; var lod:LODContainer = null; techniqueXML = data.extra.technique.(@profile == "Alternativa3D")[0]; profile = techniqueXML.instance[0]; if(profile != null) { containerXML = profile.instance_container[0]; if(containerXML != null) { daeContainer = document.findAlternativa3DObject(containerXML.@url[0]); if(daeContainer != null) { container = daeContainer.parseContainer(name); return container != null ? this.applyAnimation(this.applyTransformations(container)) : null; } document.logger.logNotFoundError(containerXML.@url[0]); } spriteXML = profile.instance_sprite[0]; if(spriteXML != null) { daeSprite = document.findAlternativa3DObject(spriteXML.@url[0]); if(daeSprite != null) { material = document.findMaterial(spriteXML.instance_material.@target[0]); if(material != null) { material.parse(); material.used = true; sprite = daeSprite.parseSprite3D(name,material.material); } else { sprite = daeSprite.parseSprite3D(name); } return sprite != null ? this.applyAnimation(this.applyTransformations(sprite)) : null; } document.logger.logNotFoundError(spriteXML.@url[0]); } lodXML = profile.instance_lod[0]; if(lodXML != null) { daeLod = document.findAlternativa3DObject(lodXML.@url[0]); if(daeLod != null) { lod = daeLod.parseLOD(name,this); return lod != null ? this.applyAnimation(this.applyTransformations(lod)) : null; } document.logger.logNotFoundError(lodXML.@url[0]); } } return null; } private function updateAlternativa3DMesh(param1:DaeNode, param2:Mesh, param3:DaeObject) : void { var techniqueXML:XML = null; var profile:XML = null; var meshXML:XML = null; var daeMesh:DaeAlternativa3DObject = null; var node:DaeNode = param1; var mesh:Mesh = param2; var daeObject:DaeObject = param3; techniqueXML = node.data.extra.technique.(@profile == "Alternativa3D")[0]; profile = techniqueXML.instance[0]; if(profile != null) { meshXML = profile.instance_mesh[0]; if(meshXML != null) { daeMesh = document.findAlternativa3DObject(meshXML.@url[0]); daeMesh.parse(); if(daeMesh != null) { daeMesh.applyA3DMeshProperties(mesh); daeObject.isSplitter = daeMesh.isSplitter; daeObject.isStaticGeometry = daeMesh.isBaseGeometry; } else { document.logger.logNotFoundError(meshXML.@url[0]); } } } } public function applyAnimation(param1:Object3D) : DaeObject { var local2:AnimationClip = this.parseAnimation(param1); if(local2 == null) { return new DaeObject(param1); } param1.name = this.animName; local2.attach(param1,false); return new DaeObject(param1,local2); } public function parseAnimation(param1:Object3D = null) : AnimationClip { if(this.channels == null || !this.hasTransformationAnimation()) { return null; } var local2:DaeChannel = this.getChannel(DaeChannel.PARAM_MATRIX); if(local2 != null) { return this.createClip(local2.tracks); } var local3:AnimationClip = new AnimationClip(); var local4:Vector.<Vector3D> = param1 != null ? null : this.getMatrix().decompose(); local2 = this.getChannel(DaeChannel.PARAM_TRANSLATE); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local2 = this.getChannel(DaeChannel.PARAM_TRANSLATE_X); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("x",param1 == null ? local4[0].x : param1.x)); } local2 = this.getChannel(DaeChannel.PARAM_TRANSLATE_Y); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("y",param1 == null ? local4[0].y : param1.y)); } local2 = this.getChannel(DaeChannel.PARAM_TRANSLATE_Z); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("z",param1 == null ? local4[0].z : param1.z)); } } local2 = this.getChannel(DaeChannel.PARAM_ROTATION_X); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("rotationX",param1 == null ? local4[1].x : param1.rotationX)); } local2 = this.getChannel(DaeChannel.PARAM_ROTATION_Y); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("rotationY",param1 == null ? local4[1].y : param1.rotationY)); } local2 = this.getChannel(DaeChannel.PARAM_ROTATION_Z); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("rotationZ",param1 == null ? local4[1].z : param1.rotationZ)); } local2 = this.getChannel(DaeChannel.PARAM_SCALE); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local2 = this.getChannel(DaeChannel.PARAM_SCALE_X); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("scaleX",param1 == null ? local4[2].x : param1.scaleX)); } local2 = this.getChannel(DaeChannel.PARAM_SCALE_Y); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("scaleY",param1 == null ? local4[2].y : param1.scaleY)); } local2 = this.getChannel(DaeChannel.PARAM_SCALE_Z); if(local2 != null) { this.addTracksToClip(local3,local2.tracks); } else { local3.addTrack(this.createValueStaticTrack("scaleZ",param1 == null ? local4[2].z : param1.scaleZ)); } } if(local3.numTracks > 0) { return local3; } return null; } private function createClip(param1:Vector.<Track>) : AnimationClip { var local2:AnimationClip = new AnimationClip(); var local3:int = 0; var local4:int = int(param1.length); while(local3 < local4) { local2.addTrack(param1[local3]); local3++; } return local2; } private function addTracksToClip(param1:AnimationClip, param2:Vector.<Track>) : void { var local3:int = 0; var local4:int = int(param2.length); while(local3 < local4) { param1.addTrack(param2[local3]); local3++; } } private function hasTransformationAnimation() : Boolean { var local3:DaeChannel = null; var local4:Boolean = false; var local1:int = 0; var local2:int = int(this.channels.length); while(local1 < local2) { local3 = this.channels[local1]; local3.parse(); local4 = local3.animatedParam == DaeChannel.PARAM_MATRIX; local4 ||= local3.animatedParam == DaeChannel.PARAM_TRANSLATE; local4 ||= local3.animatedParam == DaeChannel.PARAM_TRANSLATE_X; local4 ||= local3.animatedParam == DaeChannel.PARAM_TRANSLATE_Y; local4 ||= local3.animatedParam == DaeChannel.PARAM_TRANSLATE_Z; local4 ||= local3.animatedParam == DaeChannel.PARAM_ROTATION_X; local4 ||= local3.animatedParam == DaeChannel.PARAM_ROTATION_Y; local4 ||= local3.animatedParam == DaeChannel.PARAM_ROTATION_Z; local4 ||= local3.animatedParam == DaeChannel.PARAM_SCALE; local4 ||= local3.animatedParam == DaeChannel.PARAM_SCALE_X; local4 ||= local3.animatedParam == DaeChannel.PARAM_SCALE_Y; local4 ||= local3.animatedParam == DaeChannel.PARAM_SCALE_Z; if(local4) { return true; } local1++; } return false; } private function getChannel(param1:String) : DaeChannel { var local4:DaeChannel = null; var local2:int = 0; var local3:int = int(this.channels.length); while(local2 < local3) { local4 = this.channels[local2]; local4.parse(); if(local4.animatedParam == param1) { return local4; } local2++; } return null; } private function concatTracks(param1:Vector.<Track>, param2:Vector.<Track>) : void { var local3:int = 0; var local4:int = int(param1.length); while(local3 < local4) { param2.push(param1[local3]); local3++; } } private function createValueStaticTrack(param1:String, param2:Number) : Track { var local3:NumberTrack = new NumberTrack(this.animName,param1); local3.addKey(0,param2); return local3; } public function createStaticTransformTrack() : TransformTrack { var local1:TransformTrack = new TransformTrack(this.animName); local1.addKey(0,this.getMatrix()); return local1; } public function get layer() : String { var local1:XML = data.@layer[0]; return local1 == null ? null : local1.toString(); } } }
package alternativa.tanks.battle.scene3d { import alternativa.engine3d.objects.Decal; public class DecalEntry { public var decal:Decal; public var startTime:int; public function DecalEntry(param1:Decal, param2:int) { super(); this.decal = param1; this.startTime = param2; } } }
package alternativa.tanks.models.battle.battlefield.keyboard { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_tripleshotIconClass.png")] public class DeviceIcons_tripleshotIconClass extends BitmapAsset { public function DeviceIcons_tripleshotIconClass() { super(); } } }
package alternativa.engine3d.core { public class Sorting { public static const NONE:int = 0; public static const AVERAGE_Z:int = 1; public static const DYNAMIC_BSP:int = 2; public function Sorting() { super(); } } }
package com.lorentz.SVG.utils { import flash.geom.Point; public class ArcUtils { /** * Function from degrafa * com.degrafa.geometry.utilities.ArcUtils **/ public static function computeSvgArc(rx:Number, ry:Number,angle:Number,largeArcFlag:Boolean,sweepFlag:Boolean, x:Number,y:Number,LastPointX:Number, LastPointY:Number):Object { //store before we do anything with it var xAxisRotation:Number = angle; // Compute the half distance between the current and the final point var dx2:Number = (LastPointX - x) / 2.0; var dy2:Number = (LastPointY - y) / 2.0; // Convert angle from degrees to radians angle = MathUtils.degressToRadius(angle); var cosAngle:Number = Math.cos(angle); var sinAngle:Number = Math.sin(angle); //Compute (x1, y1) var x1:Number = (cosAngle * dx2 + sinAngle * dy2); var y1:Number = (-sinAngle * dx2 + cosAngle * dy2); // Ensure radii are large enough rx = Math.abs(rx); ry = Math.abs(ry); var Prx:Number = rx * rx; var Pry:Number = ry * ry; var Px1:Number = x1 * x1; var Py1:Number = y1 * y1; // check that radii are large enough var radiiCheck:Number = Px1/Prx + Py1/Pry; if (radiiCheck > 1) { rx = Math.sqrt(radiiCheck) * rx; ry = Math.sqrt(radiiCheck) * ry; Prx = rx * rx; Pry = ry * ry; } //Compute (cx1, cy1) var sign:Number = (largeArcFlag == sweepFlag) ? -1 : 1; var sq:Number = ((Prx*Pry)-(Prx*Py1)-(Pry*Px1)) / ((Prx*Py1)+(Pry*Px1)); sq = (sq < 0) ? 0 : sq; var coef:Number = (sign * Math.sqrt(sq)); var cx1:Number = coef * ((rx * y1) / ry); var cy1:Number = coef * -((ry * x1) / rx); //Compute (cx, cy) from (cx1, cy1) var sx2:Number = (LastPointX + x) / 2.0; var sy2:Number = (LastPointY + y) / 2.0; var cx:Number = sx2 + (cosAngle * cx1 - sinAngle * cy1); var cy:Number = sy2 + (sinAngle * cx1 + cosAngle * cy1); //Compute the angleStart (angle1) and the angleExtent (dangle) var ux:Number = (x1 - cx1) / rx; var uy:Number = (y1 - cy1) / ry; var vx:Number = (-x1 - cx1) / rx; var vy:Number = (-y1 - cy1) / ry; var p:Number var n:Number //Compute the angle start n = Math.sqrt((ux * ux) + (uy * uy)); p = ux; sign = (uy < 0) ? -1.0 : 1.0; var angleStart:Number = MathUtils.radiusToDegress(sign * Math.acos(p / n)); // Compute the angle extent n = Math.sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy)); p = ux * vx + uy * vy; sign = (ux * vy - uy * vx < 0) ? -1.0 : 1.0; var angleExtent:Number = MathUtils.radiusToDegress(sign * Math.acos(p / n)); if(!sweepFlag && angleExtent > 0) { angleExtent -= 360; } else if (sweepFlag && angleExtent < 0) { angleExtent += 360; } angleExtent %= 360; angleStart %= 360; return Object({x:LastPointX,y:LastPointY,startAngle:angleStart,arc:angleExtent,radius:rx,yRadius:ry,xAxisRotation:xAxisRotation, cx:cx,cy:cy}); } public static function convertToCurves(x:Number, y:Number, startAngle:Number, arcAngle:Number, xRadius:Number, yRadius:Number, xAxisRotation:Number=0):Array { var curves:Array = []; // Circumvent drawing more than is needed if (Math.abs(arcAngle)>360) { arcAngle = 360; } // Draw in a maximum of 45 degree segments. First we calculate how many // segments are needed for our arc. var segs:Number = Math.ceil(Math.abs(arcAngle)/45); // Now calculate the sweep of each segment var segAngle:Number = arcAngle/segs; var theta:Number = MathUtils.degressToRadius(segAngle); var angle:Number = MathUtils.degressToRadius(startAngle); // Draw as 45 degree segments if (segs>0) { var beta:Number = MathUtils.degressToRadius(xAxisRotation); var sinbeta:Number = Math.sin(beta); var cosbeta:Number = Math.cos(beta); var cx:Number; var cy:Number; var x1:Number; var y1:Number; // Loop for drawing arc segments for (var i:int = 0; i<segs; i++) { angle += theta; var sinangle:Number = Math.sin(angle-(theta/2)); var cosangle:Number = Math.cos(angle-(theta/2)); var div:Number = Math.cos(theta/2); cx= x + (xRadius * cosangle * cosbeta - yRadius * sinangle * sinbeta)/div; //Why divide by Math.cos(theta/2)? cy= y + (xRadius * cosangle * sinbeta + yRadius * sinangle * cosbeta)/div; //Why divide by Math.cos(theta/2)? sinangle = Math.sin(angle); cosangle = Math.cos(angle); x1 = x + (xRadius * cosangle * cosbeta - yRadius * sinangle * sinbeta); y1 = y + (xRadius * cosangle * sinbeta + yRadius * sinangle * cosbeta); curves.push( { s: new Point(x, y), c: new Point(cx, cy), p: new Point(x1, y1) } ); } } return curves; } } }
package alternativa.tanks.models.weapons.stream { import alternativa.math.Vector3; import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.TargetHit; [ModelInterface] public interface StreamWeaponListener { function onStart() : void; function onStop() : void; function onTargetsUpdated(param1:Vector3, param2:Vector.<TargetHit>) : void; } }
package alternativa.tanks.models.weapon.shaft.sfx { import flash.display.BitmapData; import flash.display.Shape; import flash.geom.Matrix; public class Indicator extends Shape { private static const matrix:Matrix = new Matrix(); public function Indicator() { super(); } public function set bitmapData(param1:BitmapData) : void { matrix.tx = -param1.width / 2; graphics.clear(); graphics.beginBitmapFill(param1,matrix,false,true); graphics.drawRect(matrix.tx,0,param1.width,param1.height); graphics.endFill(); } } }
package com.lorentz.SVG.display.base { import com.lorentz.SVG.data.text.SVGDrawnText; import com.lorentz.SVG.data.text.SVGTextToDraw; import com.lorentz.SVG.display.SVGText; import com.lorentz.SVG.text.ISVGTextDrawer; import com.lorentz.SVG.utils.SVGColorUtils; import com.lorentz.SVG.utils.SVGUtil; import com.lorentz.SVG.utils.TextUtils; import flash.display.DisplayObject; public class SVGTextContainer extends SVGGraphicsElement { private var _svgX:String; private var _svgY:String; private var _textOwner:SVGText; protected var _renderObjects:Vector.<DisplayObject>; public function SVGTextContainer(tagName:String) { super(tagName); if(this is SVGText) _textOwner = this as SVGText; } public function get svgX():String { return _svgX; } public function set svgX(value:String):void { if(_svgX != value){ _svgX = value; invalidateRender(); } } public function get svgY():String { return _svgY; } public function set svgY(value:String):void { if(_svgY != value){ _svgY = value; invalidateRender(); } } protected function get textOwner():SVGText { return _textOwner; } override protected function setParentElement(value:SVGElement):void { super.setParentElement(value); if(value is SVGText) setTextOwner(value as SVGText); else if(value is SVGTextContainer) setTextOwner((value as SVGTextContainer).textOwner); else setTextOwner(this as SVGText); } private function setTextOwner(value:SVGText):void { if(_textOwner != value){ _textOwner = value; for each(var element:Object in _textElements){ if(element is SVGTextContainer) (element as SVGTextContainer).setTextOwner(value); } } } private var _textElements:Vector.<Object> = new Vector.<Object>(); public function addTextElement(element:Object):void { addTextElementAt(element, numTextElements); } public function addTextElementAt(element:Object, index:int):void { _textElements.splice(index, 0, element); if(element is SVGElement) attachElement(element as SVGElement); invalidateRender(); } public function getTextElementAt(index:int):Object { return _textElements[index]; } public function get numTextElements():int { return _textElements.length; } public function removeTextElementAt(index:int):void { if(index < 0 || index >= numTextElements) return; var element:Object = _textElements[index]; if(element is SVGElement) detachElement(element as SVGElement); invalidateRender(); } override public function invalidateRender():void { super.invalidateRender(); if(textOwner && textOwner != this) textOwner.invalidateRender(); } override protected function onStyleChanged(styleName:String, oldValue:String, newValue:String):void { super.onStyleChanged(styleName, oldValue, newValue); switch(styleName){ case "font-size" : case "font-family" : case "font-weight" : invalidateRender(); break; } } protected function createTextSprite(text:String, textDrawer:ISVGTextDrawer):SVGDrawnText { //Gest last bidiLevel considering overrides var direction:String = TextUtils.getParagraphDirection(text); //Patch text adding direction chars, this will ensure spaces around texts will work properly if(direction == "rl") text = String.fromCharCode(0x200F) + text + String.fromCharCode(0x200F); else if(direction == "lr") text = String.fromCharCode(0x200E) + text + String.fromCharCode(0x200E); //Setup text format, to pass to the TextDrawer var textToDraw:SVGTextToDraw = new SVGTextToDraw(); textToDraw.text = text; textToDraw.useEmbeddedFonts = document.useEmbeddedFonts; textToDraw.parentFontSize = parentElement ? parentElement.currentFontSize : currentFontSize; textToDraw.fontSize = currentFontSize; textToDraw.fontFamily = String(finalStyle.getPropertyValue("font-family") || document.defaultFontName); textToDraw.fontWeight = finalStyle.getPropertyValue("font-weight") || "normal"; textToDraw.fontStyle = finalStyle.getPropertyValue("font-style") || "normal"; textToDraw.baselineShift = finalStyle.getPropertyValue("baseline-shift") || "baseline"; var letterSpacing:String = finalStyle.getPropertyValue("letter-spacing") || "normal"; if(letterSpacing && letterSpacing.toLowerCase() != "normal") textToDraw.letterSpacing = SVGUtil.getUserUnit(letterSpacing, currentFontSize, viewPortWidth, viewPortHeight, SVGUtil.FONT_SIZE); if(document.textDrawingInterceptor != null) document.textDrawingInterceptor(textToDraw); //If need to draw in right color, pass color inside format if(!hasComplexFill) textToDraw.color = getFillColor(); //Use configured textDrawer to draw text on a displayObject var drawnText:SVGDrawnText = textDrawer.drawText(textToDraw); //Change drawnText alpha if needed if(!hasComplexFill){ if(hasFill) drawnText.displayObject.alpha = getFillOpacity(); else drawnText.displayObject.alpha = 0; } //Adds direction to drawnTextInformation drawnText.direction = direction; return drawnText; } protected function get hasComplexFill():Boolean { var fill:String = finalStyle.getPropertyValue("fill"); return fill && fill.indexOf("url") != -1; } private function getFillColor():uint { var fill:String = finalStyle.getPropertyValue("fill"); if(fill == null || fill.indexOf("url") > -1) return 0x000000; else return SVGColorUtils.parseToUint(fill); } private function getFillOpacity():Number { return Number(finalStyle.getPropertyValue("fill-opacity") || 1); } protected function getDirectionFromStyles():String { var direction:String = finalStyle.getPropertyValue("direction"); if(direction){ switch(direction){ case "ltr" : return "lr"; case "tlr" : return "rl"; } } var writingMode:String = finalStyle.getPropertyValue("writing-mode"); switch(writingMode){ case "lr" : case "lr-tb" : return "lr"; case "rl" : case "rl-tb" : return "rl"; case "tb" : case "tb-rl" : return "tb"; } return null; } public function doAnchorAlign(direction:String, textStartX:Number, textEndX:Number):void { var textAnchor:String = finalStyle.getPropertyValue("text-anchor") || "start"; var anchorX:Number = getViewPortUserUnit(svgX, SVGUtil.WIDTH); var offsetX:Number = 0; if(direction == "lr"){ if(textAnchor == "start") offsetX += anchorX - textStartX; if(textAnchor == "middle") offsetX += anchorX - (textEndX + textStartX)/2; else if(textAnchor == "end") offsetX += anchorX - textEndX; } else { if(textAnchor == "start") offsetX += anchorX - textEndX; if(textAnchor == "middle") offsetX += anchorX - (textEndX + textStartX)/2; else if(textAnchor == "end") offsetX += anchorX - textStartX; } offset(offsetX); } public function offset(offsetX:Number):void { if(_renderObjects == null) return; for each(var renderedText:DisplayObject in _renderObjects) { if(renderedText is SVGTextContainer){ var textContainer:SVGTextContainer = renderedText as SVGTextContainer; if(!textContainer.svgX) textContainer.offset(offsetX); } else { renderedText.x += offsetX; } } } public function hasOwnFill():Boolean { return style.getPropertyValue("fill") != null && style.getPropertyValue("fill") != "" && style.getPropertyValue("fill") != "none"; } override public function clone():Object { var c:SVGTextContainer = super.clone() as SVGTextContainer; for(var i:int = 0; i < this.numTextElements; i++){ var textElement:Object = this.getTextElementAt(i); if(textElement is SVGElement) c.addTextElement((textElement as SVGElement).clone()); else c.addTextElement(textElement); } return c; } } }
package projects.tanks.client.battlefield.models.coloradjust { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; public class ColorAdjustModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ColorAdjustModelServer; private var client:IColorAdjustModelBase = IColorAdjustModelBase(this); private var modelId:Long = Long.getLong(1389685079,-1009241415); public function ColorAdjustModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ColorAdjustModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ColorAdjustCC,false))); } protected function getInitParam() : ColorAdjustCC { return ColorAdjustCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.clients.flash.resources.osgi { import alternativa.osgi.OSGi; import alternativa.osgi.bundle.IBundleActivator; import alternativa.types.Long; import platform.client.fp10.core.registry.ResourceRegistry; import projects.tanks.clients.flash.resources.resource.MapResource; import projects.tanks.clients.flash.resources.resource.PropLibResource; import projects.tanks.clients.flash.resources.resource.RawDataResource; import projects.tanks.clients.flash.resources.resource.Tanks3DSResource; public class Activator implements IBundleActivator { public var resourceRegistry:ResourceRegistry; public function Activator() { super(); } public function start(param1:OSGi) : void { this.resourceRegistry = ResourceRegistry(param1.getService(ResourceRegistry)); this.resourceRegistry.registerTypeClasses(MapResource.TYPE,MapResource); this.resourceRegistry.registerTypeClasses(PropLibResource.TYPE,PropLibResource); this.resourceRegistry.registerTypeClasses(Tanks3DSResource.TYPE,Tanks3DSResource); this.resourceRegistry.registerTypeClasses(RawDataResource.TYPE,RawDataResource); } public function stop(param1:OSGi) : void { this.resourceRegistry.unregisterResource(Long(PropLibResource.TYPE)); this.resourceRegistry.unregisterResource(Long(MapResource.TYPE)); } } }
package alternativa.engine3d.objects { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Debug; import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.RayIntersectionData; import alternativa.engine3d.core.VG; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.core.Wrapper; import alternativa.engine3d.lights.OmniLight; import alternativa.engine3d.lights.SpotLight; import alternativa.engine3d.lights.TubeLight; import alternativa.engine3d.materials.Material; import alternativa.engine3d.materials.TextureMaterial; import flash.display.BitmapData; import flash.geom.Vector3D; import flash.utils.Dictionary; use namespace alternativa3d; public class Sprite3D extends Object3D { public var material:Material; public var originX:Number = 0.5; public var originY:Number = 0.5; public var sorting:int = 0; public var clipping:int = 2; public var rotation:Number = 0; public var autoSize:Boolean = false; public var width:Number; public var height:Number; public var perspectiveScale:Boolean = true; public var topLeftU:Number = 0; public var topLeftV:Number = 0; public var bottomRightU:Number = 1; public var bottomRightV:Number = 1; public var depthTest:Boolean = true; alternativa3d var lightConst:Vector.<Number> = Vector.<Number>([0,0,0,1]); alternativa3d var lighted:Boolean; public function Sprite3D(param1:Number, param2:Number, param3:Material = null) { super(); this.width = param1; this.height = param2; this.material = param3; shadowMapAlphaThreshold = 100; } override public function intersectRay(param1:Vector3D, param2:Vector3D, param3:Dictionary = null, param4:Camera3D = null) : RayIntersectionData { var local5:RayIntersectionData = null; var local24:Vertex = null; var local25:Number = NaN; var local26:Number = NaN; var local27:Number = NaN; var local28:Number = NaN; var local29:Number = NaN; var local30:Vector3D = null; if(param4 == null || param3 != null && param3[this]) { return null; } param4.alternativa3d::composeCameraMatrix(); var local6:Object3D = param4; while(local6.alternativa3d::_parent != null) { local6 = local6.alternativa3d::_parent; local6.alternativa3d::composeMatrix(); param4.alternativa3d::appendMatrix(local6); } param4.alternativa3d::invertMatrix(); alternativa3d::composeMatrix(); local6 = this; while(local6.alternativa3d::_parent != null) { local6 = local6.alternativa3d::_parent; local6.alternativa3d::composeMatrix(); alternativa3d::appendMatrix(local6); } alternativa3d::appendMatrix(param4); alternativa3d::calculateInverseMatrix(); var local7:Number = param4.nearClipping; var local8:Number = param4.farClipping; param4.nearClipping = -Number.MAX_VALUE; param4.farClipping = Number.MAX_VALUE; alternativa3d::culling = 0; var local9:Face = this.calculateFace(param4); param4.nearClipping = local7; param4.farClipping = local8; var local10:Wrapper = local9.alternativa3d::wrapper; while(local10 != null) { local24 = local10.alternativa3d::vertex; local24.x = alternativa3d::ima * local24.alternativa3d::cameraX + alternativa3d::imb * local24.alternativa3d::cameraY + alternativa3d::imc * local24.alternativa3d::cameraZ + alternativa3d::imd; local24.y = alternativa3d::ime * local24.alternativa3d::cameraX + alternativa3d::imf * local24.alternativa3d::cameraY + alternativa3d::img * local24.alternativa3d::cameraZ + alternativa3d::imh; local24.z = alternativa3d::imi * local24.alternativa3d::cameraX + alternativa3d::imj * local24.alternativa3d::cameraY + alternativa3d::imk * local24.alternativa3d::cameraZ + alternativa3d::iml; local10 = local10.alternativa3d::next; } var local11:Wrapper = local9.alternativa3d::wrapper; var local12:Vertex = local11.alternativa3d::vertex; local11 = local11.alternativa3d::next; var local13:Vertex = local11.alternativa3d::vertex; local11 = local11.alternativa3d::next; var local14:Vertex = local11.alternativa3d::vertex; local11 = local11.alternativa3d::next; var local15:Vertex = local11.alternativa3d::vertex; local12.u = this.topLeftU; local12.v = this.topLeftV; local13.u = this.topLeftU; local13.v = this.bottomRightV; local14.u = this.bottomRightU; local14.v = this.bottomRightV; local15.u = this.bottomRightU; local15.v = this.topLeftV; var local16:Number = local13.x - local12.x; var local17:Number = local13.y - local12.y; var local18:Number = local13.z - local12.z; var local19:Number = local14.x - local12.x; var local20:Number = local14.y - local12.y; var local21:Number = local14.z - local12.z; local9.alternativa3d::normalX = local21 * local17 - local20 * local18; local9.alternativa3d::normalY = local19 * local18 - local21 * local16; local9.alternativa3d::normalZ = local20 * local16 - local19 * local17; var local22:Number = 1 / Math.sqrt(local9.alternativa3d::normalX * local9.alternativa3d::normalX + local9.alternativa3d::normalY * local9.alternativa3d::normalY + local9.alternativa3d::normalZ * local9.alternativa3d::normalZ); local9.alternativa3d::normalX *= local22; local9.alternativa3d::normalY *= local22; local9.alternativa3d::normalZ *= local22; local9.alternativa3d::offset = local12.x * local9.alternativa3d::normalX + local12.y * local9.alternativa3d::normalY + local12.z * local9.alternativa3d::normalZ; var local23:Number = param2.x * local9.alternativa3d::normalX + param2.y * local9.alternativa3d::normalY + param2.z * local9.alternativa3d::normalZ; if(local23 < 0) { local25 = param1.x * local9.alternativa3d::normalX + param1.y * local9.alternativa3d::normalY + param1.z * local9.alternativa3d::normalZ - local9.alternativa3d::offset; if(local25 > 0) { local26 = -local25 / local23; local27 = param1.x + param2.x * local26; local28 = param1.y + param2.y * local26; local29 = param1.z + param2.z * local26; local10 = local9.alternativa3d::wrapper; while(local10 != null) { local12 = local10.alternativa3d::vertex; local13 = local10.alternativa3d::next != null ? local10.alternativa3d::next.alternativa3d::vertex : local9.alternativa3d::wrapper.alternativa3d::vertex; local16 = local13.x - local12.x; local17 = local13.y - local12.y; local18 = local13.z - local12.z; local19 = local27 - local12.x; local20 = local28 - local12.y; local21 = local29 - local12.z; if((local21 * local17 - local20 * local18) * local9.alternativa3d::normalX + (local19 * local18 - local21 * local16) * local9.alternativa3d::normalY + (local20 * local16 - local19 * local17) * local9.alternativa3d::normalZ < 0) { break; } local10 = local10.alternativa3d::next; } if(local10 == null) { local30 = new Vector3D(local27,local28,local29); local5 = new RayIntersectionData(); local5.object = this; local5.face = null; local5.point = local30; local5.uv = local9.getUV(local30); local5.time = local26; } } } param4.alternativa3d::deferredDestroy(); return local5; } override public function clone() : Object3D { var local1:Sprite3D = new Sprite3D(this.width,this.height); local1.clonePropertiesFrom(this); return local1; } override protected function clonePropertiesFrom(param1:Object3D) : void { super.clonePropertiesFrom(param1); var local2:Sprite3D = param1 as Sprite3D; this.width = local2.width; this.height = local2.height; this.autoSize = local2.autoSize; this.material = local2.material; this.clipping = local2.clipping; this.sorting = local2.sorting; this.originX = local2.originX; this.originY = local2.originY; this.topLeftU = local2.topLeftU; this.topLeftV = local2.topLeftV; this.bottomRightU = local2.bottomRightU; this.bottomRightV = local2.bottomRightV; this.rotation = local2.rotation; this.perspectiveScale = local2.perspectiveScale; } override alternativa3d function draw(param1:Camera3D) : void { var local2:int = 0; if(this.material == null) { return; } var local3:Face = this.calculateFace(param1); if(local3 != null) { this.alternativa3d::lighted = false; if(useLight && !param1.view.alternativa3d::constrained && param1.deferredLighting && param1.deferredLightingStrength > 0) { this.calculateLight(param1); } if(param1.debug && (local2 = int(param1.alternativa3d::checkInDebug(this))) > 0) { if(Boolean(local2 & Debug.EDGES)) { Debug.alternativa3d::drawEdges(param1,local3,16777215); } if(Boolean(local2 & Debug.BOUNDS)) { Debug.alternativa3d::drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ); } } param1.alternativa3d::addTransparent(local3,this); } } override alternativa3d function getVG(param1:Camera3D) : VG { if(this.material == null) { return null; } var local2:Face = this.calculateFace(param1); if(local2 != null) { this.alternativa3d::lighted = false; if(useLight && !param1.view.alternativa3d::constrained && param1.deferredLighting && param1.deferredLightingStrength > 0) { this.calculateLight(param1); } local2.alternativa3d::normalX = 0; local2.alternativa3d::normalY = 0; local2.alternativa3d::normalZ = -1; local2.alternativa3d::offset = -alternativa3d::ml; return VG.alternativa3d::create(this,local2,this.sorting,param1.debug ? int(param1.alternativa3d::checkInDebug(this)) : 0,true); } return null; } private function calculateLight(param1:Camera3D) : void { var local4:int = 0; var local5:Number = NaN; var local6:Number = NaN; var local7:Number = NaN; var local8:Number = NaN; var local9:Number = NaN; var local10:Number = NaN; var local11:Number = NaN; var local12:Number = NaN; var local20:OmniLight = null; var local21:SpotLight = null; var local22:Number = NaN; var local23:Number = NaN; var local24:TubeLight = null; var local25:Number = NaN; var local26:Number = NaN; var local27:Number = NaN; var local28:Number = NaN; var local29:Number = NaN; var local30:Number = NaN; var local2:Number = param1.alternativa3d::viewSizeX / param1.alternativa3d::focalLength; var local3:Number = param1.alternativa3d::viewSizeY / param1.alternativa3d::focalLength; if(!param1.view.alternativa3d::constrained && (param1.directionalLight != null && param1.directionalLightStrength > 0 || param1.shadowMap != null && param1.shadowMapStrength > 0)) { this.alternativa3d::lightConst[0] = 0; this.alternativa3d::lightConst[1] = 0; this.alternativa3d::lightConst[2] = 0; } else { this.alternativa3d::lightConst[0] = 1; this.alternativa3d::lightConst[1] = 1; this.alternativa3d::lightConst[2] = 1; } var local13:Number = alternativa3d::md * local2; var local14:Number = alternativa3d::mh * local3; var local15:Number = Number(alternativa3d::ml); var local16:Number = Math.sqrt(local13 * local13 + local14 * local14 + local15 * local15); var local17:Number = -local13 / local16; var local18:Number = -local14 / local16; var local19:Number = -local15 / local16; local4 = 0; while(local4 < param1.alternativa3d::omniesCount) { local20 = param1.alternativa3d::omnies[local4]; local5 = local20.alternativa3d::cmd * local2; local6 = local20.alternativa3d::cmh * local3; local7 = Number(local20.alternativa3d::cml); local8 = local20.attenuationEnd; if(local5 - local8 < local13 && local5 + local8 > local13 && local6 - local8 < local14 && local6 + local8 > local14 && local7 - local8 < local15 && local7 + local8 > local15) { local5 -= local13; local6 -= local14; local7 -= local15; local16 = Math.sqrt(local5 * local5 + local6 * local6 + local7 * local7); if(local16 > 0 && local16 < local8) { local5 /= local16; local6 /= local16; local7 /= local16; local9 = (local8 - local16) / (local20.attenuationEnd - local20.attenuationBegin); if(local9 > 1) { local9 = 1; } if(local9 < 0) { local9 = 0; } local9 *= local9; local11 = local5 * local17 + local6 * local18 + local7 * local19; local11 *= 0.5; local11 += 0.5; local12 = local9 * local11 * local20.intensity * 2 * param1.deferredLightingStrength; this.alternativa3d::lightConst[0] += local12 * (local20.color >> 16 & 0xFF) / 255; this.alternativa3d::lightConst[1] += local12 * (local20.color >> 8 & 0xFF) / 255; this.alternativa3d::lightConst[2] += local12 * (local20.color & 0xFF) / 255; this.alternativa3d::lighted = true; } } local4++; } local4 = 0; while(local4 < param1.alternativa3d::spotsCount) { local21 = param1.alternativa3d::spots[local4]; local5 = local21.alternativa3d::cmd * local2; local6 = local21.alternativa3d::cmh * local3; local7 = Number(local21.alternativa3d::cml); local8 = local21.attenuationEnd; if(local5 - local8 < local13 && local5 + local8 > local13 && local6 - local8 < local14 && local6 + local8 > local14 && local7 - local8 < local15 && local7 + local8 > local15) { local5 -= local13; local6 -= local14; local7 -= local15; local16 = Math.sqrt(local5 * local5 + local6 * local6 + local7 * local7); if(local16 > 0 && local16 < local8) { local5 /= local16; local6 /= local16; local7 /= local16; local22 = -local5 * local21.alternativa3d::cmc * local2 - local6 * local21.alternativa3d::cmg * local3 - local7 * local21.alternativa3d::cmk; local23 = Math.cos(local21.falloff * 0.5); if(local22 > local23) { local11 = local5 * local17 + local6 * local18 + local7 * local19; local11 *= 0.5; local11 += 0.5; local9 = (local8 - local16) / (local21.attenuationEnd - local21.attenuationBegin); if(local9 > 1) { local9 = 1; } if(local9 < 0) { local9 = 0; } local9 *= local9; local10 = (local22 - local23) / (Math.cos(local21.hotspot * 0.5) - local23); if(local10 > 1) { local10 = 1; } if(local10 < 0) { local10 = 0; } local10 *= local10; local12 = local9 * local10 * local11 * local21.intensity * 2 * param1.deferredLightingStrength; this.alternativa3d::lightConst[0] += local12 * (local21.color >> 16 & 0xFF) / 255; this.alternativa3d::lightConst[1] += local12 * (local21.color >> 8 & 0xFF) / 255; this.alternativa3d::lightConst[2] += local12 * (local21.color & 0xFF) / 255; this.alternativa3d::lighted = true; } } } local4++; } local4 = 0; while(local4 < param1.alternativa3d::tubesCount) { local24 = param1.alternativa3d::tubes[local4]; local25 = local24.length * 0.5; local26 = local25 + local24.falloff; local27 = local24.alternativa3d::cmc * local2; local28 = local24.alternativa3d::cmg * local2; local29 = Number(local24.alternativa3d::cmk); local5 = local24.alternativa3d::cmd * local2 + local27 * local25; local6 = local24.alternativa3d::cmh * local3 + local28 * local25; local7 = local24.alternativa3d::cml + local29 * local25; local30 = local27 * (local13 - local5) + local28 * (local14 - local6) + local29 * (local15 - local7); if(local30 > -local26 && local30 < local26) { local5 += local27 * local30 - local13; local6 += local28 * local30 - local14; local7 += local29 * local30 - local15; local16 = Math.sqrt(local5 * local5 + local6 * local6 + local7 * local7); if(local16 > 0 && local16 < local24.attenuationEnd) { local5 /= local16; local6 /= local16; local7 /= local16; local11 = local5 * local17 + local6 * local18 + local7 * local19; local11 *= 0.5; local11 += 0.5; local9 = (local24.attenuationEnd - local16) / (local24.attenuationEnd - local24.attenuationBegin); if(local9 > 1) { local9 = 1; } if(local9 < 0) { local9 = 0; } local9 *= local9; if(local30 < 0) { local30 = -local30; } local10 = (local26 - local30) / (local26 - local25); if(local10 > 1) { local10 = 1; } if(local10 < 0) { local10 = 0; } local10 *= local10; local12 = local9 * local10 * local11 * local24.intensity * 2 * param1.deferredLightingStrength; this.alternativa3d::lightConst[0] += local12 * (local24.color >> 16 & 0xFF) / 255; this.alternativa3d::lightConst[1] += local12 * (local24.color >> 8 & 0xFF) / 255; this.alternativa3d::lightConst[2] += local12 * (local24.color & 0xFF) / 255; this.alternativa3d::lighted = true; } } local4++; } } private function calculateFace(param1:Camera3D) : Face { var local3:Number = NaN; var local4:Number = NaN; var local5:Number = NaN; var local6:Number = NaN; var local7:Number = NaN; var local8:Number = NaN; var local9:Number = NaN; var local10:Number = NaN; var local11:Vertex = null; var local12:Vertex = null; var local22:Number = NaN; var local25:BitmapData = null; var local26:Number = NaN; var local27:Number = NaN; var local28:Number = NaN; var local29:Number = NaN; var local30:Number = NaN; var local31:Number = NaN; var local32:Number = NaN; var local33:Number = NaN; alternativa3d::culling &= 60; var local2:Number = Number(alternativa3d::ml); if(local2 <= param1.nearClipping || local2 >= param1.farClipping) { return null; } var local13:Number = this.width; var local14:Number = this.height; var local15:Number = this.bottomRightU - this.topLeftU; var local16:Number = this.bottomRightV - this.topLeftV; if(this.autoSize && this.material is TextureMaterial) { local25 = (this.material as TextureMaterial).texture; if(local25 != null) { local13 = local25.width * local15; local14 = local25.height * local16; } } var local17:Number = param1.alternativa3d::viewSizeX / local2; var local18:Number = param1.alternativa3d::viewSizeY / local2; var local19:Number = param1.alternativa3d::focalLength / local2; var local20:Number = param1.alternativa3d::focalLength / param1.alternativa3d::viewSizeX; var local21:Number = param1.alternativa3d::focalLength / param1.alternativa3d::viewSizeY; local3 = alternativa3d::ma / local20; local4 = alternativa3d::me / local21; local22 = Math.sqrt(local3 * local3 + local4 * local4 + alternativa3d::mi * alternativa3d::mi); local3 = alternativa3d::mb / local20; local4 = alternativa3d::mf / local21; local22 += Math.sqrt(local3 * local3 + local4 * local4 + alternativa3d::mj * alternativa3d::mj); local3 = alternativa3d::mc / local20; local4 = alternativa3d::mg / local21; local22 += Math.sqrt(local3 * local3 + local4 * local4 + alternativa3d::mk * alternativa3d::mk); local22 /= 3; if(!this.perspectiveScale) { local22 /= local19; } if(this.rotation == 0) { local26 = local22 * local13 * local20; local27 = local22 * local14 * local21; local3 = alternativa3d::md - this.originX * local26; local4 = alternativa3d::mh - this.originY * local27; local7 = local3 + local26; local8 = local4 + local27; if(alternativa3d::culling > 0 && (local3 > local2 || local4 > local2 || local7 < -local2 || local8 < -local2)) { return null; } local11 = Vertex.alternativa3d::createList(4); local12 = local11; local12.alternativa3d::cameraX = local3; local12.alternativa3d::cameraY = local4; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.topLeftV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3; local12.alternativa3d::cameraY = local8; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local7; local12.alternativa3d::cameraY = local8; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local7; local12.alternativa3d::cameraY = local4; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.topLeftV; } else { local28 = -Math.sin(this.rotation) * local22; local29 = Math.cos(this.rotation) * local22; local30 = local29 * local13 * local20; local31 = -local28 * local13 * local21; local32 = local28 * local14 * local20; local33 = local29 * local14 * local21; local3 = alternativa3d::md - this.originX * local30 - this.originY * local32; local4 = alternativa3d::mh - this.originX * local31 - this.originY * local33; local5 = local3 + local32; local6 = local4 + local33; local7 = local3 + local30 + local32; local8 = local4 + local31 + local33; local9 = local3 + local30; local10 = local4 + local31; if(alternativa3d::culling > 0) { if(this.clipping == 1) { if(alternativa3d::culling & 4 && local2 <= -local3 && local2 <= -local5 && local2 <= -local7 && local2 <= -local9) { return null; } if(alternativa3d::culling & 8 && local2 <= local3 && local2 <= local5 && local2 <= local7 && local2 <= local9) { return null; } if(alternativa3d::culling & 0x10 && local2 <= -local4 && local2 <= -local6 && local2 <= -local8 && local2 <= -local10) { return null; } if(alternativa3d::culling & 0x20 && local2 <= local4 && local2 <= local6 && local2 <= local8 && local2 <= local10) { return null; } local11 = Vertex.alternativa3d::createList(4); local12 = local11; local12.alternativa3d::cameraX = local3; local12.alternativa3d::cameraY = local4; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.topLeftV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local32; local12.alternativa3d::cameraY = local4 + local33; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local30 + local32; local12.alternativa3d::cameraY = local4 + local31 + local33; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local30; local12.alternativa3d::cameraY = local4 + local31; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.topLeftV; } else { if(Boolean(alternativa3d::culling & 4)) { if(local2 <= -local3 && local2 <= -local5 && local2 <= -local7 && local2 <= -local9) { return null; } if(local2 > -local3 && local2 > -local5 && local2 > -local7 && local2 > -local9) { alternativa3d::culling &= 59; } } if(Boolean(alternativa3d::culling & 8)) { if(local2 <= local3 && local2 <= local5 && local2 <= local7 && local2 <= local9) { return null; } if(local2 > local3 && local2 > local5 && local2 > local7 && local2 > local9) { alternativa3d::culling &= 55; } } if(Boolean(alternativa3d::culling & 0x10)) { if(local2 <= -local4 && local2 <= -local6 && local2 <= -local8 && local2 <= -local10) { return null; } if(local2 > -local4 && local2 > -local6 && local2 > -local8 && local2 > -local10) { alternativa3d::culling &= 47; } } if(Boolean(alternativa3d::culling & 0x20)) { if(local2 <= local4 && local2 <= local6 && local2 <= local8 && local2 <= local10) { return null; } if(local2 > local4 && local2 > local6 && local2 > local8 && local2 > local10) { alternativa3d::culling &= 31; } } local11 = Vertex.alternativa3d::createList(4); local12 = local11; local12.alternativa3d::cameraX = local3; local12.alternativa3d::cameraY = local4; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.topLeftV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local32; local12.alternativa3d::cameraY = local4 + local33; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local30 + local32; local12.alternativa3d::cameraY = local4 + local31 + local33; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local30; local12.alternativa3d::cameraY = local4 + local31; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.topLeftV; } } else { local11 = Vertex.alternativa3d::createList(4); local12 = local11; local12.alternativa3d::cameraX = local3; local12.alternativa3d::cameraY = local4; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.topLeftV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local32; local12.alternativa3d::cameraY = local4 + local33; local12.alternativa3d::cameraZ = local2; local12.u = this.topLeftU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local30 + local32; local12.alternativa3d::cameraY = local4 + local31 + local33; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.bottomRightV; local12 = local12.alternativa3d::next; local12.alternativa3d::cameraX = local3 + local30; local12.alternativa3d::cameraY = local4 + local31; local12.alternativa3d::cameraZ = local2; local12.u = this.bottomRightU; local12.v = this.topLeftV; } } param1.alternativa3d::lastVertex.alternativa3d::next = local11; param1.alternativa3d::lastVertex = local12; var local23:Face = Face.alternativa3d::create(); local23.material = this.material; param1.alternativa3d::lastFace.alternativa3d::next = local23; param1.alternativa3d::lastFace = local23; var local24:Wrapper = Wrapper.alternativa3d::create(); local23.alternativa3d::wrapper = local24; local24.alternativa3d::vertex = local11; local11 = local11.alternativa3d::next; while(local11 != null) { local24.alternativa3d::next = local24.alternativa3d::create(); local24 = local24.alternativa3d::next; local24.alternativa3d::vertex = local11; local11 = local11.alternativa3d::next; } return local23; } override alternativa3d function updateBounds(param1:Object3D, param2:Object3D = null) : void { var local11:BitmapData = null; var local12:Number = NaN; var local13:Number = NaN; var local14:Number = NaN; var local15:Number = NaN; var local3:Number = this.width; var local4:Number = this.height; if(this.autoSize && this.material is TextureMaterial) { local11 = (this.material as TextureMaterial).texture; if(local11 != null) { local3 = local11.width * (this.bottomRightU - this.topLeftU); local4 = local11.height * (this.bottomRightV - this.topLeftV); } } var local5:Number = (this.originX >= 0.5 ? this.originX : 1 - this.originX) * local3; var local6:Number = (this.originY >= 0.5 ? this.originY : 1 - this.originY) * local4; var local7:Number = Math.sqrt(local5 * local5 + local6 * local6); var local8:Number = 0; var local9:Number = 0; var local10:Number = 0; if(param2 != null) { local12 = Number(param2.alternativa3d::ma); local13 = Number(param2.alternativa3d::me); local14 = Number(param2.alternativa3d::mi); local15 = Math.sqrt(local12 * local12 + local13 * local13 + local14 * local14); local12 = Number(param2.alternativa3d::mb); local13 = Number(param2.alternativa3d::mf); local14 = Number(param2.alternativa3d::mj); local15 += Math.sqrt(local12 * local12 + local13 * local13 + local14 * local14); local12 = Number(param2.alternativa3d::mc); local13 = Number(param2.alternativa3d::mg); local14 = Number(param2.alternativa3d::mk); local15 += Math.sqrt(local12 * local12 + local13 * local13 + local14 * local14); local7 *= local15 / 3; local8 = Number(param2.alternativa3d::md); local9 = Number(param2.alternativa3d::mh); local10 = Number(param2.alternativa3d::ml); } if(local8 - local7 < param1.boundMinX) { param1.boundMinX = local8 - local7; } if(local8 + local7 > param1.boundMaxX) { param1.boundMaxX = local8 + local7; } if(local9 - local7 < param1.boundMinY) { param1.boundMinY = local9 - local7; } if(local9 + local7 > param1.boundMaxY) { param1.boundMaxY = local9 + local7; } if(local10 - local7 < param1.boundMinZ) { param1.boundMinZ = local10 - local7; } if(local10 + local7 > param1.boundMaxZ) { param1.boundMaxZ = local10 + local7; } } } }
package alternativa.engine3d.materials { import alternativa.gfx.core.BitmapTextureResource; import flash.display.BitmapData; import flash.utils.Dictionary; public class TextureResourcesRegistry { public static var texture2Resource:Dictionary = new Dictionary(); public function TextureResourcesRegistry() { super(); } public static function getTextureResource(param1:BitmapData, param2:Boolean, param3:Boolean, param4:Boolean) : BitmapTextureResource { var _loc5_:BitmapTextureResource = null; if(param1 in texture2Resource) { _loc5_ = texture2Resource[param1]; _loc5_.increaseReferencesCount(); return _loc5_; } var _loc6_:BitmapTextureResource = new BitmapTextureResource(param1,param2,param3,param4); texture2Resource[param1] = _loc6_; return _loc6_; } public static function releaseTextureResources() : void { var _loc1_:* = undefined; var _loc2_:BitmapTextureResource = null; for(_loc1_ in texture2Resource) { _loc2_ = texture2Resource[_loc1_]; _loc2_.forceDispose(); } } public static function release(param1:BitmapData) : void { if(param1 in texture2Resource) { delete texture2Resource[param1]; } } } }
package alternativa.tanks.utils { public class DataValidationErrorEvent { public var type:int; public function DataValidationErrorEvent(param1:int) { super(); this.type = param1; } } }
package utils.resource { import platform.client.fp10.core.resource.Resource; public interface IResourceLoadingComplete { function onLoadingComplete(param1:Resource) : void; } }
package projects.tanks.clients.flash.commons.models.captcha { import projects.tanks.client.commons.models.captcha.CaptchaLocation; import projects.tanks.client.commons.models.captcha.CaptchaModelBase; import projects.tanks.client.commons.models.captcha.ICaptchaModelBase; [ModelInfo] public class ServerCaptchaModel extends CaptchaModelBase implements ICaptchaModelBase, IServerCaptcha { private var clientFacade:CaptchaClientFacade; public function ServerCaptchaModel() { super(); } public function showCaptcha(param1:CaptchaLocation, param2:Vector.<int>) : void { this.clientFacade.captchaUpdated(param1,param2); } public function captchaCorrect(param1:CaptchaLocation) : void { this.clientFacade.captchaAnswerCorrect(param1); } public function captchaFailed(param1:CaptchaLocation, param2:Vector.<int>) : void { this.clientFacade.captchaAnswerIncorrect(param1,param2); } public function checkCaptcha(param1:String, param2:CaptchaLocation) : void { server.checkCaptcha(param2,param1); } public function getNewCaptcha(param1:CaptchaLocation) : void { server.getNewCaptcha(param1); } public function bindFacade(param1:CaptchaClientFacade) : void { this.clientFacade = param1; param1.setCaptchaLocations(getInitParam().stateWithCaptcha); } public function unbindFacade() : void { this.clientFacade = null; } } }
package _codec.platform.client.core.general.pushnotification.api { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import platform.client.core.general.pushnotification.api.NotificationClientPlatform; public class CodecNotificationClientPlatform implements ICodec { public function CodecNotificationClientPlatform() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:NotificationClientPlatform = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = NotificationClientPlatform.ANDROID; break; case 1: local2 = NotificationClientPlatform.WEB; } return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:int = int(param2.value); param1.writer.writeInt(local3); } } }
package projects.tanks.client.panel.model.shop.challenges.toclient { public interface IChallengeShopItemsModelBase { function itemsLoaded() : void; } }
package alternativa.tanks.model.quest.challenge.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.model.quest.challenge.gui.TierNumberView_tierClass.png")] public class TierNumberView_tierClass extends BitmapAsset { public function TierNumberView_tierClass() { super(); } } }
package projects.tanks.client.clans.panel.foreignclan { public interface IForeignClanModelBase { function alreadyInClanOutgoing(param1:String) : void; function alreadyInIncoming(param1:String) : void; function clanBlocked(param1:String) : void; function onJoinClan(param1:String) : void; function showForeignClan(param1:ForeignClanData) : void; function userSmallRankForAddClan() : void; } }
package projects.tanks.client.partners.impl.traffic { public interface ITrafficPartnersGoalsModelBase { } }
package alternativa.tanks.display.usertitle { import alternativa.tanks.display.EffectBlinkerUtil; import alternativa.tanks.models.inventory.InventoryItemType; import alternativa.tanks.sfx.Blinker; import flash.display.Bitmap; import flash.display.BitmapData; import flash.geom.ColorTransform; import flash.geom.Matrix; import flash.geom.Rectangle; import flash.utils.Dictionary; import flash.utils.getTimer; public class EffectIndicator { private static var icons:Dictionary; private static var iconRect:Rectangle; private static const STATE_HIDDEN:int = 1; private static const STATE_PREPARED:int = 2; private static const STATE_VISIBLE:int = 4; private static const STATE_HIDING:int = 8; private static const UNKILLABLE_EFFECT_LEVEL:int = 2; private static const iconHealthCls:Class = EffectIndicator_iconHealthCls; private static const iconArmorCls:Class = EffectIndicator_iconArmorCls; private static const iconPowerCls:Class = EffectIndicator_iconPowerCls; private static const iconNitroCls:Class = EffectIndicator_iconNitroCls; private static const iconUnkillableCls:Class = EffectIndicator_iconUnkillableCls; private static const iconUnkillableBitmapData:BitmapData = Bitmap(new iconUnkillableCls()).bitmapData; private static const ultimateCls:Class = EffectIndicator_ultimateCls; private static var matrix:Matrix = new Matrix(); private var _effectId:int; private var icon:BitmapData; private var blinkingPeriod:int; private var colorTransform:ColorTransform = new ColorTransform(); private var blinkingStartTime:int; private var finishTime:int; private var blinker:Blinker; private var alpha:Number = 1; private var needRedraw:Boolean; private var x:int; private var y:int; private var userTitle:UserTitle; private var state:int; private var blinking:Boolean; public var activeAfterDeath:Boolean; public var effectLevel:int; public function EffectIndicator(param1:int, param2:UserTitle) { super(); if(icons == null) { initIcons(); } this._effectId = param1; this.icon = icons[param1]; this.userTitle = param2; this.blinkingPeriod = EffectBlinkerUtil.getBlinkingPeriod(param1); this.blinker = EffectBlinkerUtil.createBlinker(param1); this.state = STATE_HIDDEN; } private static function initIcons() : void { icons = new Dictionary(); icons[InventoryItemType.FIRST_AID] = Bitmap(new iconHealthCls()).bitmapData; icons[InventoryItemType.ARMOR] = Bitmap(new iconArmorCls()).bitmapData; icons[InventoryItemType.DAMAGE] = Bitmap(new iconPowerCls()).bitmapData; icons[InventoryItemType.NITRO] = Bitmap(new iconNitroCls()).bitmapData; icons[InventoryItemType.ULTIMATE] = Bitmap(new ultimateCls()).bitmapData; iconRect = BitmapData(icons[InventoryItemType.FIRST_AID]).rect; } public function get effectId() : int { return this._effectId; } public function isVisible() : Boolean { return (this.state & STATE_VISIBLE) != 0; } public function isHidden() : Boolean { return this.state == STATE_HIDDEN; } public function showInfinite() : void { this.show(-1,false,0); } public function show(param1:int, param2:Boolean, param3:int) : void { this.activeAfterDeath = param2; this.state &= ~STATE_HIDING; if(this.state != STATE_VISIBLE || this.alpha != 1 || this.effectLevel != param3) { this.needRedraw = true; } this.effectLevel = param3; if(param1 > -1) { this.finishTime = getTimer() + param1; this.blinkingStartTime = this.finishTime - this.blinkingPeriod; } else { this.finishTime = int.MAX_VALUE; this.blinkingStartTime = int.MAX_VALUE; } this.blinking = false; this.alpha = 1; if(this.state == STATE_HIDDEN) { this.state = STATE_PREPARED; } } public function hide() : void { if(this.activeAfterDeath) { return; } if(this.state == STATE_PREPARED || this._effectId == InventoryItemType.ULTIMATE && this.state != STATE_HIDDEN) { this.userTitle.doHideIndicator(this); this.state = STATE_HIDDEN; return; } if((this.state & (STATE_HIDDEN | STATE_HIDING)) != 0) { return; } this.state |= STATE_HIDING; this.blinker.setMinValue(0); if(!this.blinking) { this.blinkingStartTime = 0; this.blinker.init(getTimer()); this.blinking = true; } } public function clear(param1:BitmapData) : void { if(this.state == STATE_HIDDEN || this.state == STATE_PREPARED) { return; } iconRect.x = this.x; iconRect.y = this.y; param1.fillRect(iconRect,0); } public function setPosition(param1:int, param2:int) : void { this.x = param1; this.y = param2; this.needRedraw = true; } public function forceRedraw() : void { this.needRedraw = true; } public function update(param1:int, param2:int, param3:BitmapData) : void { if(this.state == STATE_HIDDEN) { return; } if(this.needRedraw) { this.draw(param3); this.needRedraw = false; } if(this._effectId != InventoryItemType.ULTIMATE && param1 > this.blinkingStartTime) { this.updateBlinking(param1,param2,param3); } if(this.effectId == InventoryItemType.FIRST_AID && param1 > this.finishTime) { this.hide(); } if(this.state == STATE_PREPARED) { this.state = STATE_VISIBLE; } } private function updateBlinking(param1:int, param2:int, param3:BitmapData) : void { var local4:Number = NaN; if(this.blinking) { local4 = this.blinker.updateValue(param1,param2); if(local4 != this.alpha) { this.alpha = local4; this.draw(param3); } if((this.state & STATE_HIDING) != 0 && this.alpha == 0) { this.userTitle.doHideIndicator(this); this.state = STATE_HIDDEN; } } else { this.blinker.setMinValue(EffectBlinkerUtil.MIN_VALUE); this.blinker.init(param1); this.blinking = true; } } private function draw(param1:BitmapData) : void { this.clear(param1); matrix.tx = this.x; matrix.ty = this.y; this.colorTransform.alphaMultiplier = this.alpha; param1.draw(this.getIndicatorIcon(),matrix,this.colorTransform,null,null,true); } private function getIndicatorIcon() : BitmapData { return this._effectId == InventoryItemType.ARMOR && this.effectLevel == UNKILLABLE_EFFECT_LEVEL ? iconUnkillableBitmapData : this.icon; } } }
package projects.tanks.client.panel.model.payment.modes.qiwi { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.network.command.SpaceCommand; import platform.client.fp10.core.type.IGameObject; import platform.client.fp10.core.type.ISpace; public class QiwiPaymentModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _getPaymentUrlId:Long = Long.getLong(151087474,-1262705368); private var _getPaymentUrl_shopItemIdCodec:ICodec; private var _getPaymentUrl_phoneCodec:ICodec; private var model:IModel; public function QiwiPaymentModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); this._getPaymentUrl_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); this._getPaymentUrl_phoneCodec = this.protocol.getCodec(new TypeCodecInfo(String,false)); } public function getPaymentUrl(param1:Long, param2:String) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._getPaymentUrl_shopItemIdCodec.encode(this.protocolBuffer,param1); this._getPaymentUrl_phoneCodec.encode(this.protocolBuffer,param2); ByteArray(this.protocolBuffer.writer).position = 0; if(Model.object == null) { throw new Error("Execute method without model context."); } var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._getPaymentUrlId,this.protocolBuffer); var local4:IGameObject = Model.object; var local5:ISpace = local4.space; local5.commandSender.sendCommand(local3); this.protocolBuffer.optionalMap.clear(); } } }
package _codec.projects.tanks.client.panel.model.socialnetwork { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.panel.model.socialnetwork.SocialNetworkPanelCC; public class VectorCodecSocialNetworkPanelCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecSocialNetworkPanelCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(SocialNetworkPanelCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<SocialNetworkPanelCC> = new Vector.<SocialNetworkPanelCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = SocialNetworkPanelCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:SocialNetworkPanelCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<SocialNetworkPanelCC> = Vector.<SocialNetworkPanelCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.tanks.model.news { import mx.core.BitmapAsset; [ExcludeClass] public class NewsIcons_news_lamp extends BitmapAsset { public function NewsIcons_news_lamp() { super(); } } }
package _codec.projects.tanks.client.battlefield.models.bonus.bonus.common { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.bonus.bonus.common.BonusCommonCC; public class VectorCodecBonusCommonCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecBonusCommonCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(BonusCommonCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<BonusCommonCC> = new Vector.<BonusCommonCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = BonusCommonCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:BonusCommonCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<BonusCommonCC> = Vector.<BonusCommonCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package _codec.platform.client.core.general.resourcelocale.format { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import platform.client.core.general.resourcelocale.format.StringPair; public class CodecStringPair implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_key:ICodec; private var codec_value:ICodec; public function CodecStringPair() { super(); } public function init(param1:IProtocol) : void { this.codec_key = param1.getCodec(new TypeCodecInfo(String,false)); this.codec_value = param1.getCodec(new TypeCodecInfo(String,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:StringPair = new StringPair(); local2.key = this.codec_key.decode(param1) as String; local2.value = this.codec_value.decode(param1) as String; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:StringPair = StringPair(param2); this.codec_key.encode(param1,local3.key); this.codec_value.encode(param1,local3.value); } } }
package _codec.projects.tanks.client.panel.model.referrals { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.panel.model.referrals.ReferralsModelCC; public class VectorCodecReferralsModelCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecReferralsModelCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ReferralsModelCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<ReferralsModelCC> = new Vector.<ReferralsModelCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ReferralsModelCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ReferralsModelCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ReferralsModelCC> = Vector.<ReferralsModelCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.model.timeperiod { import flash.utils.getTimer; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.models.commons.periodtime.ITimePeriodModelBase; import platform.client.models.commons.periodtime.TimePeriodModelBase; [ModelInfo] public class TimePeriodModel extends TimePeriodModelBase implements TimePeriod, ITimePeriodModelBase, ObjectLoadListener { public function TimePeriodModel() { super(); } public function objectLoaded() : void { var local1:uint = uint(getTimer()); putData(int,local1); } public function getTimeLeftInSeconds() : int { return getInitParam().timeLeftInSeconds; } public function getModelLoadingTimeInMillis() : int { return int(getData(int)); } public function isEnabled() : Boolean { return getInitParam().isEnabled; } public function isTimeless() : Boolean { return getInitParam().isTimeless; } public function getTimeToStartInSeconds() : int { return getInitParam().timeToStartInSeconds; } } }
package alternativa.tanks.models.tank.spawn.spawnhandlers.spawn { import alternativa.tanks.battle.objects.tank.Tank; import platform.client.fp10.core.type.IGameObject; public interface SpawnHandler { function spawn(param1:Tank, param2:IGameObject) : void; } }
package alternativa.tanks.models.battlefield.effects.levelup.levelup { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Sprite3D; import alternativa.math.Vector3; import alternativa.object.ClientObject; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer; import alternativa.tanks.sfx.IGraphicEffect; import alternativa.tanks.utils.objectpool.ObjectPool; import alternativa.tanks.utils.objectpool.PooledObject; import flash.display.BlendMode; public class LightWaveEffect extends PooledObject implements IGraphicEffect { private static const vector:Vector3 = new Vector3(); private var wave:Sprite3D; private var delay:int; private var time:int; private var maxScale:Number; private var direction:Boolean; private var turret:Object3D; private var state:int; private var container:Scene3DContainer; public function LightWaveEffect(param1:ObjectPool) { super(param1); this.wave = new Sprite3D(10,10); this.wave.blendMode = BlendMode.ADD; } public function init(param1:int, param2:Number, param3:Number, param4:Boolean, param5:Object3D, param6:TextureMaterial) : void { this.delay = param1; this.wave.width = param2; this.wave.height = param2; this.wave.calculateBounds(); this.maxScale = param3; this.direction = param4; this.turret = param5; param6.resolution = 5; this.wave.material = param6; this.wave.scaleX = 1; this.wave.scaleY = 1; this.wave.scaleZ = 1; this.wave.rotation = 0; this.wave.alpha = 0; this.state = 0; this.wave.softAttenuation = 150; this.wave.depthMapAlphaThreshold = 2; this.wave.shadowMapAlphaThreshold = 2; this.wave.useShadowMap = false; this.wave.useLight = false; this.time = 0; } public function addToContainer(param1:Scene3DContainer) : void { this.container = param1; param1.addChild(this.wave); } public function play(param1:int, param2:GameCamera) : Boolean { var _loc6_:Number = NaN; _loc6_ = NaN; var _loc7_:Number = NaN; var _loc8_:Number = NaN; if(this.state == 2) { return false; } var _loc3_:Number = 0.7 * 5; var _loc4_:Number = _loc3_ / 3; _loc6_ = 300; vector.x = param2.x - this.turret.x; vector.y = param2.y - this.turret.y; vector.z = param2.z - this.turret.z; vector.normalize(); vector.scale(_loc6_); this.wave.x = this.turret.x + vector.x; this.wave.y = this.turret.y + vector.y; this.wave.z = this.turret.z + vector.z + 30; this.time += param1; if(this.time >= this.delay) { if(this.direction) { this.wave.rotation += 0.2 * param1 * 0.001; } else { this.wave.rotation -= 0.2 * param1 * 0.001; } if(this.state == 0) { _loc7_ = _loc3_ * param1 * 0.001; this.wave.scaleX += _loc7_; this.wave.scaleY += _loc7_; this.wave.scaleZ += _loc7_; if(this.wave.scaleX > this.maxScale) { this.wave.scaleX = this.maxScale; this.wave.scaleY = this.maxScale; this.wave.scaleZ = this.maxScale; this.state = 1; } this.wave.alpha = (this.wave.scaleX - 1) / (this.maxScale - 1); } else if(this.state == 1) { _loc8_ = _loc4_ * param1 * 0.001; this.wave.scaleX -= _loc8_; this.wave.scaleY -= _loc8_; this.wave.scaleZ -= _loc8_; if(this.wave.scaleX < 1) { this.wave.scaleX = 1; this.wave.scaleY = 1; this.wave.scaleZ = 1; this.state = 2; } this.wave.alpha = (this.wave.scaleX - 1) / (this.maxScale - 1) - 0.1; } } return true; } public function get owner() : ClientObject { return null; } public function destroy() : void { this.container.removeChild(this.wave); this.container = null; this.wave.material = null; } public function kill() : void { this.state = 2; this.wave.alpha = 0; } } }
package alternativa.tanks.models.clan.permission { import alternativa.types.Long; import projects.tanks.client.clans.clan.permissions.ClanPermission; [ModelInterface] public interface IClanPermissionsModel { function setPosition(param1:Long, param2:ClanPermission) : void; } }
package projects.tanks.client.battlefield.models.tankparts.weapons.shotgun.shot { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; public class ShotgunShotModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ShotgunShotModelServer; private var client:IShotgunShotModelBase = IShotgunShotModelBase(this); private var modelId:Long = Long.getLong(1366230363,-857495328); private var _setRemainingShotsId:Long = Long.getLong(29952874,-1613932368); private var _setRemainingShots_shotsCodec:ICodec; public function ShotgunShotModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ShotgunShotModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ShotgunShotCC,false))); this._setRemainingShots_shotsCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } protected function getInitParam() : ShotgunShotCC { return ShotgunShotCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._setRemainingShotsId: this.client.setRemainingShots(int(this._setRemainingShots_shotsCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.battlefield.models.user.device { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class TankDeviceModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function TankDeviceModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.gui.category { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.category.ItemCategoryButton_givenPresentsIconClass.png")] public class ItemCategoryButton_givenPresentsIconClass extends BitmapAsset { public function ItemCategoryButton_givenPresentsIconClass() { super(); } } }
package com.lorentz.SVG.utils { import com.lorentz.processing.Process; import flash.events.Event; import flash.events.EventDispatcher; import flash.utils.ByteArray; /** * A utility class to decode a Base64 encoded String to a ByteArray. */ public class Base64AsyncDecoder extends EventDispatcher { public static const COMPLETE:String = "complete"; public static const ERROR:String = "fail"; public var bytes:ByteArray; public var errorMessage:String; private var encoded:String; public function Base64AsyncDecoder(encoded:String) { super(); this.encoded = encoded; } public function decode():void { new Process(startFunction, loopFunction, completeFunction).start(); } private function startFunction():void { bytes = new ByteArray(); count = 0; filled = 0; index = 0; errorMessage = null; } private function loopFunction():int { for(var z:int = 0; z < 100; z++){ if(index == encoded.length) return Process.COMPLETE; var c:Number = encoded.charCodeAt(index++); if (c == ESCAPE_CHAR_CODE) work[count++] = -1; else if (inverse[c] != 64) work[count++] = inverse[c]; else continue; if (count == 4) { count = 0; bytes.writeByte((work[0] << 2) | ((work[1] & 0xFF) >> 4)); filled++; if (work[2] == -1) return Process.COMPLETE; bytes.writeByte((work[1] << 4) | ((work[2] & 0xFF) >> 2)); filled++; if (work[3] == -1) return Process.COMPLETE; bytes.writeByte((work[2] << 6) | work[3]); filled++; } } return Process.CONTINUE; } private function completeFunction():void { if (count > 0) { this.errorMessage = "A partial block ("+count+" of 4 bytes) was dropped. Decoded data is probably truncated!"; dispatchEvent(new Event(ERROR)); } else { dispatchEvent(new Event(COMPLETE)); } } //-------------------------------------------------------------------------- // // Private Variables // //-------------------------------------------------------------------------- private var index:uint = 0; private var count:int = 0; private var filled:int = 0; private var work:Array = [0, 0, 0, 0]; private static const ESCAPE_CHAR_CODE:Number = 61; // The '=' char private static const inverse:Array = [ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 ]; } }
package alternativa.tanks.model.garage.upgradingitems { import alternativa.tanks.service.upgradingitems.UpgradingItemsService; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.panel.model.garage.GarageItemInfo; import projects.tanks.client.panel.model.garage.upgradingitems.IUpgradingItemsModelBase; import projects.tanks.client.panel.model.garage.upgradingitems.UpgradingItemsModelBase; [ModelInfo] public class UpgradingItemsModel extends UpgradingItemsModelBase implements IUpgradingItemsModelBase, UpgradingItem { [Inject] public static var upgradingItemsService:UpgradingItemsService; private var object:IGameObject; public function UpgradingItemsModel() { super(); } public function init(param1:Vector.<GarageItemInfo>, param2:Vector.<GarageItemInfo>) : void { this.object = Model.object; upgradingItemsService.init(param1.concat(param2),this); } public function itemUpgraded(param1:IGameObject) : void { Model.object = this.object; server.itemUpgraded(param1); Model.popObject(); } public function select(param1:IGameObject) : void { Model.object = this.object; server.select(param1); Model.popObject(); } } }
package alternativa.tanks.models.weapon.gauss.state { import alternativa.tanks.models.weapon.gauss.GaussEventType; import alternativa.tanks.models.weapon.gauss.LocalGaussWeapon; public class ReloadPauseState implements IGaussState { private var weapon:LocalGaussWeapon; public function ReloadPauseState(param1:LocalGaussWeapon) { super(); this.weapon = param1; } public function enter(param1:int, param2:GaussEventType, param3:*) : void { } public function update(param1:int, param2:int) : void { } } }
package { import controls.panel.BaseButton; [Embed(source="/_assets/assets.swf", symbol="symbol520")] public dynamic class MainPanelGarageButton extends BaseButton { public function MainPanelGarageButton() { super(); } } }
package projects.tanks.client.tanksservices.model.notifier.rank { public interface IRankNotifierModelBase { function setRank(param1:Vector.<RankNotifierData>) : void; } }
package projects.tanks.client.battlefield.models.tankparts.weapon.gauss { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.types.Vector3d; public class GaussModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:GaussModelServer; private var client:IGaussModelBase = IGaussModelBase(this); private var modelId:Long = Long.getLong(415126444,1630038805); private var _dummyShotId:Long = Long.getLong(16153141,-467637480); private var _primaryShotId:Long = Long.getLong(1654429078,-1789901298); private var _primaryShot_shotIdCodec:ICodec; private var _primaryShot_shotDirectionCodec:ICodec; private var _secondaryHitTargetCommandId:Long = Long.getLong(2066311556,139862161); private var _secondaryHitTargetCommand_targetCodec:ICodec; private var _secondaryHitTargetCommand_relativeHitPointCodec:ICodec; private var _startAimingId:Long = Long.getLong(1653845815,-265709909); private var _stopAimingId:Long = Long.getLong(500839552,1813251721); public function GaussModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new GaussModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(GaussCC,false))); this._primaryShot_shotIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); this._primaryShot_shotDirectionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false)); this._secondaryHitTargetCommand_targetCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._secondaryHitTargetCommand_relativeHitPointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false)); } protected function getInitParam() : GaussCC { return GaussCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._dummyShotId: this.client.dummyShot(); break; case this._primaryShotId: this.client.primaryShot(int(this._primaryShot_shotIdCodec.decode(param2)),Vector3d(this._primaryShot_shotDirectionCodec.decode(param2))); break; case this._secondaryHitTargetCommandId: this.client.secondaryHitTargetCommand(IGameObject(this._secondaryHitTargetCommand_targetCodec.decode(param2)),Vector3d(this._secondaryHitTargetCommand_relativeHitPointCodec.decode(param2))); break; case this._startAimingId: this.client.startAiming(); break; case this._stopAimingId: this.client.stopAiming(); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.cc { public class MachineGunCC { private var _spinDownTime:int; private var _spinUpTime:int; private var _started:Boolean; private var _state:Number; private var _temperatureHittingTime:int; private var _weaponTurnDecelerationCoeff:Number; public function MachineGunCC(param1:int = 0, param2:int = 0, param3:Boolean = false, param4:Number = 0, param5:int = 0, param6:Number = 0) { super(); this._spinDownTime = param1; this._spinUpTime = param2; this._started = param3; this._state = param4; this._temperatureHittingTime = param5; this._weaponTurnDecelerationCoeff = param6; } public function get spinDownTime() : int { return this._spinDownTime; } public function set spinDownTime(param1:int) : void { this._spinDownTime = param1; } public function get spinUpTime() : int { return this._spinUpTime; } public function set spinUpTime(param1:int) : void { this._spinUpTime = param1; } public function get started() : Boolean { return this._started; } public function set started(param1:Boolean) : void { this._started = param1; } public function get state() : Number { return this._state; } public function set state(param1:Number) : void { this._state = param1; } public function get temperatureHittingTime() : int { return this._temperatureHittingTime; } public function set temperatureHittingTime(param1:int) : void { this._temperatureHittingTime = param1; } public function get weaponTurnDecelerationCoeff() : Number { return this._weaponTurnDecelerationCoeff; } public function set weaponTurnDecelerationCoeff(param1:Number) : void { this._weaponTurnDecelerationCoeff = param1; } public function toString() : String { var local1:String = "MachineGunCC ["; local1 += "spinDownTime = " + this.spinDownTime + " "; local1 += "spinUpTime = " + this.spinUpTime + " "; local1 += "started = " + this.started + " "; local1 += "state = " + this.state + " "; local1 += "temperatureHittingTime = " + this.temperatureHittingTime + " "; local1 += "weaponTurnDecelerationCoeff = " + this.weaponTurnDecelerationCoeff + " "; return local1 + "]"; } } }
package alternativa.tanks.gui.icons { import mx.core.BitmapAsset; [ExcludeClass] public class CrystalIcon_smallCrystal extends BitmapAsset { public function CrystalIcon_smallCrystal() { super(); } } }
package alternativa.tanks.models.battle.battlefield { import alternativa.engine3d.core.Object3D; import alternativa.math.Quaternion; import alternativa.math.Vector3; import alternativa.tanks.battle.scene3d.Renderer; public class Object3DRevolver implements Renderer { private static const eulerAngles:Vector3 = new Vector3(); private var object:Object3D; private var axis:Vector3; private var angularSpeed:Number; private var orientation:Quaternion = new Quaternion(); public function Object3DRevolver(param1:Object3D, param2:Vector3, param3:Number) { super(); this.object = param1; this.axis = param2.clone().normalize(); this.angularSpeed = param3 / 1000; this.orientation.setFromEulerAnglesXYZ(param1.rotationX,param1.rotationY,param1.rotationZ); } public function setAxis(param1:Number, param2:Number, param3:Number) : void { this.axis.reset(param1,param2,param3).normalize(); } public function setAngularSpeed(param1:Number) : void { this.angularSpeed = param1 / 1000; } public function render(param1:int, param2:int) : void { if(this.angularSpeed != 0) { this.orientation.addScaledVector(this.axis,this.angularSpeed * param2); this.orientation.getEulerAngles(eulerAngles); this.object.rotationX = eulerAngles.x; this.object.rotationY = eulerAngles.y; this.object.rotationZ = eulerAngles.z; } } } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank13.png")] public class DefaultRanksBitmaps_bitmapBigRank13 extends BitmapAsset { public function DefaultRanksBitmaps_bitmapBigRank13() { super(); } } }
package alternativa.tanks.gui.chat { import alternativa.tanks.gui.communication.tabs.chat.HiddenMessageKeeper; import fl.containers.ScrollPane; import fl.controls.ScrollPolicy; import flash.display.Sprite; import flash.utils.setTimeout; import forms.userlabel.ChatUpdateEvent; import projects.tanks.client.chat.models.chat.chat.ChatAddressMode; import projects.tanks.client.chat.types.MessageType; import projects.tanks.client.chat.types.UserStatus; public class ChatOutput extends ScrollPane { private static const MAX_MESSAGES:int = 80; public var wasScrolled:Boolean = false; public var deltaWidth:int = 9; public var selfUid:String; private var container:Sprite = new Sprite(); private var lineWidth:Number; private var showIPMode:Boolean; private var privateMessagesEnabled:Boolean; private var updateIntervalId:uint = 0; private var currentChannel:String; private var messageKeeper:HiddenMessageKeeper = new HiddenMessageKeeper(); public function ChatOutput(param1:Boolean) { super(); this.privateMessagesEnabled = param1; this.source = this.container; this.horizontalScrollPolicy = ScrollPolicy.OFF; this.focusEnabled = false; this.container.addEventListener(ChatUpdateEvent.UPDATE,this.onUpdateEvent); } public function addMessage(param1:UserStatus, param2:UserStatus, param3:ChatAddressMode, param4:String, param5:String, param6:MessageType = null, param7:Boolean = false, param8:Boolean = true) : void { var local9:ChatOutputData = new ChatOutputData(param1,param2,param3,param5,param6,param7); if(param4 == this.currentChannel) { this.addLine(local9,param8); } else { this.messageKeeper.pushMessage(param4,local9); } } private function addLine(param1:ChatOutputData, param2:Boolean) : void { if(this.container.numChildren > MAX_MESSAGES) { this.shiftMessages(); } var local3:Boolean = false; if(param2) { local3 = verticalScrollPosition + 5 > maxVerticalScrollPosition || !this.wasScrolled; } var local4:ChatOutputLine = new ChatOutputLine(param1,this.lineWidth,this.privateMessagesEnabled,this.showIPMode,this.selfUid); local4.y = int(this.container.height + 0.5); this.container.addChild(local4); update(); if(local3) { this.scrollDown(); } } public function scrollDown() : void { verticalScrollPosition = maxVerticalScrollPosition; } public function highlightUids(param1:String) : void { var local2:int = 0; while(local2 < this.container.numChildren) { this.highlightLine(this.container.getChildAt(local2) as ChatOutputLine,param1); local2++; } } public function highlightUidsInLastMessage(param1:String) : void { if(this.container.numChildren > 0) { this.highlightLine(this.container.getChildAt(this.container.numChildren - 1) as ChatOutputLine,param1); } } private function highlightLine(param1:ChatOutputLine, param2:String) : void { param1.light = param1.userName == param2 || param1.addressMode == ChatAddressMode.PUBLIC_ADDRESSED && param1.userNameTo == this.selfUid; param1.self = param1.userNameTo == this.selfUid && param1.addressMode == ChatAddressMode.PRIVATE; } private function shiftMessages() : void { var local1:ChatOutputLine = this.container.getChildAt(0) as ChatOutputLine; var local2:Number = local1.height + local1.y; this.container.removeChild(local1); var local3:int = 0; while(local3 < this.container.numChildren) { this.container.getChildAt(local3).y = this.container.getChildAt(local3).y - local2; local3++; } } override public function setSize(param1:Number, param2:Number) : void { super.setSize(param1,param2); this.lineWidth = param1 - this.deltaWidth; this.updateLines(); } private function onUpdateEvent(param1:ChatUpdateEvent) : void { if(this.updateIntervalId == 0) { this.updateIntervalId = setTimeout(this.updateLines,500); } } private function updateLines() : void { var local2:ChatOutputLine = null; var local3:ChatOutputLine = null; this.updateIntervalId = 0; if(this.container.numChildren == 0) { return; } var local1:Vector.<ChatOutputLine> = new Vector.<ChatOutputLine>(); while(this.container.numChildren > 0) { local3 = this.container.getChildAt(0) as ChatOutputLine; local3.showIP = this.showIPMode; local3.width = this.lineWidth; local1.push(local3); this.container.removeChildAt(0); } for each(local2 in local1) { local2.y = int(this.container.height + 0.5); this.container.addChild(local2); } update(); } public function cleanOutUsersMessages(param1:String) : void { var local4:ChatOutputLine = null; var local2:Vector.<ChatOutputLine> = new Vector.<ChatOutputLine>(); var local3:int = 0; while(local3 < this.container.numChildren) { local4 = this.container.getChildAt(local3) as ChatOutputLine; if(local4.userName == param1) { local2.push(local4); } local3++; } local3 = 0; while(local3 < local2.length) { this.container.removeChild(local2[local3]); local3++; } this.updateLines(); this.messageKeeper.cleanOutUsersMessages(param1); } public function setShowIPMode(param1:Boolean) : void { this.showIPMode = param1; this.updateLines(); } public function switchToChannel(param1:Boolean, param2:String) : void { var local3:Vector.<ChatOutputLine> = null; var local4:int = 0; var local5:Vector.<ChatOutputData> = null; var local6:ChatOutputLine = null; var local7:ChatOutputData = null; if(param2 != this.currentChannel) { local3 = new Vector.<ChatOutputLine>(); local4 = 0; while(local4 < this.container.numChildren) { local6 = this.container.getChildAt(local4) as ChatOutputLine; local7 = local6.getData(); this.messageKeeper.pushMessage(this.currentChannel,local7); local3.push(local6); local4++; } local4 = 0; while(local4 < local3.length) { this.container.removeChild(local3[local4]); local4++; } this.updateLines(); this.currentChannel = param2; dispatchEvent(new ChangeChatChannelEvent(this.currentChannel)); local5 = this.messageKeeper.popMessages(param2); local4 = 0; while(local4 < local5.length) { local7 = local5[local4]; this.addLine(local7,param1); local4++; } update(); } } } }
package projects.tanks.client.panel.model.payment.modes.gate2shop { public class Gate2ShopPaymentCC { private var _emailInputRequired:Boolean; public function Gate2ShopPaymentCC(param1:Boolean = false) { super(); this._emailInputRequired = param1; } public function get emailInputRequired() : Boolean { return this._emailInputRequired; } public function set emailInputRequired(param1:Boolean) : void { this._emailInputRequired = param1; } public function toString() : String { var local1:String = "Gate2ShopPaymentCC ["; local1 += "emailInputRequired = " + this.emailInputRequired + " "; return local1 + "]"; } } }
package alternativa.tanks.model.item.grouped { [ModelInterface] public interface IGroupedItem { function isGrouped() : Boolean; function getGroup() : int; } }
package _codec.projects.tanks.client.battlefield.models.tankparts.weapon.shaft { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.tankparts.weapon.shaft.ShaftCC; public class VectorCodecShaftCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecShaftCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ShaftCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<ShaftCC> = new Vector.<ShaftCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ShaftCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ShaftCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ShaftCC> = Vector.<ShaftCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package _codec.projects.tanks.client.panel.model.payment { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.panel.model.payment.CrystalsPaymentCC; public class VectorCodecCrystalsPaymentCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecCrystalsPaymentCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(CrystalsPaymentCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<CrystalsPaymentCC> = new Vector.<CrystalsPaymentCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = CrystalsPaymentCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:CrystalsPaymentCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<CrystalsPaymentCC> = Vector.<CrystalsPaymentCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }