code
stringlengths
57
237k
package alternativa.tanks.models.battle.ctf { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.models.battle.battlefield.BattleUserInfoService; import alternativa.tanks.models.battle.gui.BattlefieldGUI; import flash.utils.Dictionary; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.clients.fp10.libraries.TanksLocale; public class CTFMessages { [Inject] public static var localeService:ILocaleService; [Inject] public static var userInfoService:BattleUserInfoService; public static const MESSAGE_TAKEN:String = "taken"; public static const MESSAGE_LOST:String = "lost"; public static const MESSAGE_RETURNED:String = "returned"; public static const MESSAGE_CAPTURED:String = "captured"; private var defaultMessages:Dictionary = new Dictionary(); private var spectatorRedMessages:Dictionary = new Dictionary(); private var spectatorBlueMessages:Dictionary = new Dictionary(); public var ourFlagReturnedMessage:String; public var enemyFlagReturnedMessage:String; public var blueFlagReturnedMessage:FlagMessage; public var redFlagReturnedMessage:FlagMessage; private var guiModel:BattlefieldGUI; public function CTFMessages() { super(); this.initMessages(); } public function init(param1:BattlefieldGUI) : void { this.guiModel = param1; } public function getFlagMessage(param1:String, param2:Boolean) : FlagMessage { var local3:FlagActionMessages = this.defaultMessages[param1]; return param2 ? local3.positive : local3.negative; } public function getFlagMessageForSpectator(param1:String, param2:BattleTeam) : FlagMessage { var local3:Object = param2 == BattleTeam.BLUE ? this.spectatorBlueMessages : this.spectatorRedMessages; return local3[param1]; } public function showBattleMessage(param1:FlagMessage, param2:IGameObject) : void { var local3:String = param2 != null ? userInfoService.getUserName(param2.id) : null; if(Boolean(local3)) { this.guiModel.showBattleMessage(param1.color,local3 + " " + param1.text); } } private function initMessages() : void { this.createDefaultFlagMessages(); this.createSpectatorMessages(this.spectatorBlueMessages,MessageColor.BLUE); this.createSpectatorMessages(this.spectatorRedMessages,MessageColor.RED); this.ourFlagReturnedMessage = localeService.getText(TanksLocale.TEXT_CTF_OUR_FLAG_RETURNED); this.enemyFlagReturnedMessage = localeService.getText(TanksLocale.TEXT_CTF_ENEMY_FLAG_RETURNED); this.blueFlagReturnedMessage = new FlagMessage(localeService.getText(TanksLocale.TEXT_CTF_BLUE_FLAG_RETURNED),MessageColor.BLUE); this.redFlagReturnedMessage = new FlagMessage(localeService.getText(TanksLocale.TEXT_CTF_RED_FLAG_RETURNED),MessageColor.RED); } private function createDefaultFlagMessages() : void { this.createFlagActionMessages(MESSAGE_TAKEN,TanksLocale.TEXT_CTF_GOT_ENEMY_FLAG,MessageColor.POSITIVE,TanksLocale.TEXT_CTF_GOT_OUR_FLAG,MessageColor.NEGATIVE); this.createFlagActionMessages(MESSAGE_LOST,TanksLocale.TEXT_CTF_LOST_OUR_FLAG,MessageColor.POSITIVE,TanksLocale.TEXT_CTF_LOST_ENEMY_FLAG,MessageColor.NEGATIVE); this.createFlagActionMessages(MESSAGE_RETURNED,TanksLocale.TEXT_CTF_RETURNED_OUR_FLAG,MessageColor.POSITIVE,TanksLocale.TEXT_CTF_RETURNED_ENEMY_FLAG,MessageColor.NEGATIVE); this.createFlagActionMessages(MESSAGE_CAPTURED,TanksLocale.TEXT_CTF_CAPTURED_ENEMY_FLAG,MessageColor.POSITIVE,TanksLocale.TEXT_CTF_CAPTURED_OUR_FLAG,MessageColor.NEGATIVE); } private function createSpectatorMessages(param1:Object, param2:uint) : void { param1[MESSAGE_TAKEN] = new FlagMessage(localeService.getText(TanksLocale.TEXT_CTF_GOT_FLAG_NEUTRAL),param2); param1[MESSAGE_LOST] = new FlagMessage(localeService.getText(TanksLocale.TEXT_CTF_LOST_FLAG_NEUTRAL),param2); param1[MESSAGE_RETURNED] = new FlagMessage(localeService.getText(TanksLocale.TEXT_CTF_RETURNED_FLAG_NEUTRAL),param2); param1[MESSAGE_CAPTURED] = new FlagMessage(localeService.getText(TanksLocale.TEXT_CTF_CAPTURED_FLAG_NEUTRAL),param2); } private function createFlagActionMessages(param1:String, param2:String, param3:uint, param4:String, param5:uint) : void { var local6:FlagMessage = new FlagMessage(localeService.getText(param2),param3); var local7:FlagMessage = new FlagMessage(localeService.getText(param4),param5); this.defaultMessages[param1] = new FlagActionMessages(local6,local7); } } }
package alternativa.tanks.model.payment.modes.pricerange { import projects.tanks.client.panel.model.payment.modes.pricerange.IPriceRangeModelBase; import projects.tanks.client.panel.model.payment.modes.pricerange.PriceRangeModelBase; [ModelInfo] public class PriceRangeModel extends PriceRangeModelBase implements IPriceRangeModelBase, PriceRange { public function PriceRangeModel() { super(); } public function priceIsValid(param1:Number) : Boolean { if(!getInitParam().enabled) { return true; } return param1 >= getInitParam().minimum; } } }
package alternativa.tanks.models.ctf { import alternativa.math.Vector3; import alternativa.tanks.models.tank.TankData; import projects.tanks.client.battleservice.model.team.BattleTeamType; public interface ICTFModel { function isPositionInFlagProximity(param1:Vector3, param2:Number, param3:BattleTeamType) : Boolean; function isFlagCarrier(param1:TankData) : Boolean; } }
package alternativa.tanks.gui.clanmanagement.clanmemberlist.list { import base.DiscreteSprite; public class UserLabelContainer extends DiscreteSprite { private var _width:Number; private var _height:Number; public function UserLabelContainer() { super(); } override public function get width() : Number { return this._width; } override public function set width(param1:Number) : void { this._width = param1; } override public function get height() : Number { return this._height; } override public function set height(param1:Number) : void { this._height = param1; } } }
package alternativa.tanks.gui.friends.list.refferals { import flash.display.Bitmap; import flash.display.Sprite; public class ReferralStatLineBackgroundNormal extends Sprite { public static var bg:Bitmap = new Bitmap(); public function ReferralStatLineBackgroundNormal() { super(); addChild(new Bitmap(bg.bitmapData)); } } }
package alternativa.tanks.models.weapon.terminator.sfx { import alternativa.engine3d.core.Object3D; import alternativa.tanks.battle.BattleService; import alternativa.tanks.models.tank.LocalTankInfoService; import alternativa.tanks.models.weapon.railgun.IRailgunEffects; import alternativa.tanks.models.weapon.rocketlauncher.sfx.RocketLauncherEffects; import alternativa.tanks.models.weapon.terminator.*; import alternativa.tanks.sfx.MobileSound3DEffect; import alternativa.tanks.sfx.Sound3D; import platform.client.fp10.core.type.AutoClosable; public class TerminatorEffects implements AutoClosable, TerminatorToggleCallback { [Inject] public static var localTankService:LocalTankInfoService; [Inject] public static var battleService:BattleService; private var recoilEffect:Array; private var openEffect:TerminatorOpenEffect; private var weaponObject:TerminatorObject; private var _rocketLauncherEffects:RocketLauncherEffects; private var _railgunEffects:IRailgunEffects; private var sfxData:TerminatorSFXData; private var turret3D:Object3D; private var soundEffect:MobileSound3DEffect; private var effectsState:int = 1; public function TerminatorEffects(param1:TerminatorObject, param2:TerminatorSFXData, param3:Object3D, param4:RocketLauncherEffects, param5:IRailgunEffects) { super(); this.weaponObject = param1; this.sfxData = param2; this.turret3D = param3; this._rocketLauncherEffects = param4; this._railgunEffects = param5; this.recoilEffect = [new TerminatorRecoilEffect(param1.getSkin().getBarrel3DByIndex(0)),new TerminatorRecoilEffect(param1.getSkin().getBarrel3DByIndex(1))]; this.openEffect = new TerminatorOpenEffect(param1.getSkin().getLeftBox3D(),param1.getSkin().getRightBox3D(),this); } public function createRecoilEffect(param1:int) : void { this.recoilEffect[param1].run(param1); } public function createOpenEffect() : void { this.effectsState = TerminatorEffectsState.OPENING; this.openEffect.turnOn(); this.playServoSoundEffect(); } public function createHideEffect() : void { if(this.effectsState == TerminatorEffectsState.OPENED || this.effectsState == TerminatorEffectsState.OPENING) { this.effectsState = TerminatorEffectsState.CLOSING; this.openEffect.turnOff(); this.playServoSoundEffect(); } } private function stopToggleSound() : void { if(this.soundEffect != null) { this.soundEffect.kill(); } } private function playOpenedSound() : void { this.stopToggleSound(); this.soundEffect = MobileSound3DEffect(battleService.getObjectPool().getObject(MobileSound3DEffect)); this.soundEffect.init(Sound3D.create(this.sfxData.openedSound),this.turret3D); battleService.addSound3DEffect(this.soundEffect); } private function playClosedSound() : void { this.stopToggleSound(); this.soundEffect = MobileSound3DEffect(battleService.getObjectPool().getObject(MobileSound3DEffect)); this.soundEffect.init(Sound3D.create(this.sfxData.closedSound),this.turret3D); battleService.addSound3DEffect(this.soundEffect); } private function playServoSoundEffect() : void { this.stopToggleSound(); this.soundEffect = MobileSound3DEffect(battleService.getObjectPool().getObject(MobileSound3DEffect)); this.soundEffect.init(Sound3D.create(this.sfxData.servoSound),this.turret3D); battleService.addSound3DEffect(this.soundEffect); } public function close() : void { this.stopToggleSound(); this.openEffect.destroy(); this.weaponObject = null; this.recoilEffect = null; this.openEffect = null; this._rocketLauncherEffects = null; this._railgunEffects = null; } public function reset() : void { this.stopToggleSound(); this.openEffect.reset(); this.effectsState = TerminatorEffectsState.CLOSED; this.recoilEffect[0].reset(); this.recoilEffect[1].reset(); } public function get rocketLauncherEffects() : RocketLauncherEffects { return this._rocketLauncherEffects; } public function get railgunEffects() : IRailgunEffects { return this._railgunEffects; } public function onOpened() : void { this.effectsState = TerminatorEffectsState.OPENED; this.playOpenedSound(); } public function onClosed() : void { this.effectsState = TerminatorEffectsState.CLOSED; this.playClosedSound(); } public function forceClosing() : void { this.createHideEffect(); } } }
package alternativa.tanks.gui.clanmanagement { import alternativa.tanks.gui.clanmanagement.clanmemberlist.IClanActionListener; public class ClanActionsManager { private static var actionsUpdateListeners:Vector.<IClanActionListener> = new Vector.<IClanActionListener>(); public function ClanActionsManager() { super(); } public static function addActionsUpdateListener(param1:IClanActionListener) : void { var local2:int = int(actionsUpdateListeners.indexOf(param1)); if(local2 < 0) { actionsUpdateListeners.push(param1); } } public static function removeActionsListener(param1:IClanActionListener) : void { var local2:int = int(actionsUpdateListeners.indexOf(param1)); if(local2 >= 0) { actionsUpdateListeners.splice(local2,1); } } public static function updateActions() : void { var local1:IClanActionListener = null; for each(local1 in actionsUpdateListeners) { local1.updateActions(); } } public static function removeListeners() : void { actionsUpdateListeners = new Vector.<IClanActionListener>(); } } }
package alternativa.tanks.materials { import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.materials.UVMatrixProvider; import flash.display.BitmapData; public class TrackMaterial extends TextureMaterial { public var uvMatrixProvider:UVMatrixProvider = new UVMatrixProvider(); public function TrackMaterial(param1:BitmapData) { super(param1,true); } public function update() : void { } } }
package projects.tanks.client.panel.model.payment.modes.leogaming.mobile { public interface ILeogamingPaymentMobileModelBase { function error() : void; function proceed() : void; } }
package alternativa.tanks.models.weapon.healing { import alternativa.engine3d.materials.TextureMaterial; import alternativa.tanks.engine3d.TextureAnimation; import alternativa.tanks.sfx.LightAnimation; import flash.media.Sound; public class HealingGunSFXData { public var idleMuzzle:TextureAnimation; public var idleSound:Sound; public var healMuzzle:TextureAnimation; public var healTarget:TextureAnimation; private var _healShaft:TextureMaterial; public var healSound:Sound; public var damageMuzzle:TextureAnimation; public var damageTarget:TextureAnimation; private var _damageShaft:TextureMaterial; public var damageSound:Sound; public var startLightAnimation:LightAnimation; public var loopLightAnimation:LightAnimation; public var friendStartLightAnimation:LightAnimation; public var friendLoopLightAnimation:LightAnimation; public var enemyStartLightAnimation:LightAnimation; public var enemyLoopLightAnimation:LightAnimation; public var friendBeamAnimation:LightAnimation; public var enemyBeamAnimation:LightAnimation; public function HealingGunSFXData() { super(); } public function set healShaft(param1:TextureMaterial) : void { this._healShaft = param1; } public function set damageShaft(param1:TextureMaterial) : void { this._damageShaft = param1; } public function getHealShaft() : TextureMaterial { return this._healShaft; } public function getDamageShaft() : TextureMaterial { return this._damageShaft; } public function getMaterialsToRelease() : Array { return [this.idleMuzzle.material,this.healMuzzle.material,this._healShaft,this.damageMuzzle.material,this._damageShaft]; } } }
package projects.tanks.client.battlefield.models.continuebattle { public interface IContinueBattleModelBase { } }
package alternativa.tanks.bonuses { import alternativa.math.Vector3; public interface Object3DWrapper { function setPosition(param1:Vector3) : void; function setPositionComponents(param1:Number, param2:Number, param3:Number) : void; function setRotation(param1:Vector3) : void; function setRotationComponents(param1:Number, param2:Number, param3:Number) : void; } }
package alternativa.tanks.models.battle.gui.chat { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class IBattleChatAdapt implements IBattleChat { private var object:IGameObject; private var impl:IBattleChat; public function IBattleChatAdapt(param1:IGameObject, param2:IBattleChat) { super(); this.object = param1; this.impl = param2; } public function getChat() : BattleChat { var result:BattleChat = null; try { Model.object = this.object; result = this.impl.getChat(); } finally { Model.popObject(); } return result; } } }
package projects.tanks.client.battleservice.osgi { import _codec.projects.tanks.client.battleservice.CodecBattleCreateParameters; import _codec.projects.tanks.client.battleservice.CodecBattleMode; import _codec.projects.tanks.client.battleservice.CodecBattleRoundParameters; import _codec.projects.tanks.client.battleservice.CodecRange; import _codec.projects.tanks.client.battleservice.VectorCodecBattleCreateParametersLevel1; import _codec.projects.tanks.client.battleservice.VectorCodecBattleModeLevel1; import _codec.projects.tanks.client.battleservice.VectorCodecBattleRoundParametersLevel1; import _codec.projects.tanks.client.battleservice.VectorCodecRangeLevel1; import _codec.projects.tanks.client.battleservice.model.battle.team.CodecBattleTeam; import _codec.projects.tanks.client.battleservice.model.battle.team.VectorCodecBattleTeamLevel1; import _codec.projects.tanks.client.battleservice.model.createparams.CodecBattleLimits; import _codec.projects.tanks.client.battleservice.model.createparams.VectorCodecBattleLimitsLevel1; import _codec.projects.tanks.client.battleservice.model.map.params.CodecMapTheme; import _codec.projects.tanks.client.battleservice.model.map.params.VectorCodecMapThemeLevel1; import _codec.projects.tanks.client.battleservice.model.performance.CodecPerformanceCC; import _codec.projects.tanks.client.battleservice.model.performance.VectorCodecPerformanceCCLevel1; import _codec.projects.tanks.client.battleservice.model.statistics.CodecStatisticsModelCC; import _codec.projects.tanks.client.battleservice.model.statistics.CodecUserInfo; import _codec.projects.tanks.client.battleservice.model.statistics.CodecUserReward; import _codec.projects.tanks.client.battleservice.model.statistics.CodecUserStat; import _codec.projects.tanks.client.battleservice.model.statistics.VectorCodecStatisticsModelCCLevel1; import _codec.projects.tanks.client.battleservice.model.statistics.VectorCodecUserInfoLevel1; import _codec.projects.tanks.client.battleservice.model.statistics.VectorCodecUserRewardLevel1; import _codec.projects.tanks.client.battleservice.model.statistics.VectorCodecUserStatLevel1; import _codec.projects.tanks.client.battleservice.model.statistics.dm.CodecStatisticsDMCC; import _codec.projects.tanks.client.battleservice.model.statistics.dm.VectorCodecStatisticsDMCCLevel1; import _codec.projects.tanks.client.battleservice.model.statistics.team.CodecStatisticsTeamCC; import _codec.projects.tanks.client.battleservice.model.statistics.team.VectorCodecStatisticsTeamCCLevel1; import _codec.projects.tanks.client.battleservice.model.types.CodecBattleSuspicionLevel; import _codec.projects.tanks.client.battleservice.model.types.VectorCodecBattleSuspicionLevelLevel1; import alternativa.osgi.OSGi; import alternativa.osgi.bundle.IBundleActivator; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.info.CollectionCodecInfo; import alternativa.protocol.info.EnumCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.registry.ModelRegistry; import projects.tanks.client.battleservice.BattleCreateParameters; import projects.tanks.client.battleservice.BattleMode; import projects.tanks.client.battleservice.BattleRoundParameters; import projects.tanks.client.battleservice.Range; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.client.battleservice.model.createparams.BattleLimits; import projects.tanks.client.battleservice.model.map.params.MapTheme; import projects.tanks.client.battleservice.model.performance.PerformanceCC; import projects.tanks.client.battleservice.model.statistics.StatisticsModelCC; import projects.tanks.client.battleservice.model.statistics.UserInfo; import projects.tanks.client.battleservice.model.statistics.UserReward; import projects.tanks.client.battleservice.model.statistics.UserStat; import projects.tanks.client.battleservice.model.statistics.dm.StatisticsDMCC; import projects.tanks.client.battleservice.model.statistics.team.StatisticsTeamCC; import projects.tanks.client.battleservice.model.types.BattleSuspicionLevel; public class Activator implements IBundleActivator { public static var osgi:OSGi; public function Activator() { super(); } public function start(param1:OSGi) : void { var local4:ICodec = null; osgi = param1; var local2:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local2.register(Long.getLong(121770418,618912707),Long.getLong(335434599,-27161610)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(2027633487,-2104416877)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(794588440,-1349024015)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(1688328639,-1477155462)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(1570125867,640719657)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(2027560760,1768125684)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(1312331174,-81511448)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(1481208751,-1671478579)); local2.register(Long.getLong(485575169,-17734339),Long.getLong(844922966,157499169)); local2.register(Long.getLong(575618390,177970779),Long.getLong(965223943,535616065)); local2.register(Long.getLong(575618390,177970779),Long.getLong(2010192701,-2134483217)); local2.register(Long.getLong(575618390,177970779),Long.getLong(825794462,-1556026223)); local2.register(Long.getLong(575618390,177970779),Long.getLong(329840042,1301345271)); local2.register(Long.getLong(183455729,-2099733819),Long.getLong(1367071399,-1702461867)); local2.register(Long.getLong(183455729,-2099733819),Long.getLong(1479921566,-1347191967)); local2.register(Long.getLong(183455729,-2099733819),Long.getLong(1581597391,-963196943)); local2.register(Long.getLong(183455729,-2099733819),Long.getLong(1345957775,1774893408)); local2.register(Long.getLong(183455729,-2099733819),Long.getLong(386945968,-373481329)); local2.register(Long.getLong(183455729,-2099733819),Long.getLong(184857581,1110813993)); var local3:IProtocol = IProtocol(osgi.getService(IProtocol)); local4 = new CodecBattleCreateParameters(); local3.registerCodec(new TypeCodecInfo(BattleCreateParameters,false),local4); local3.registerCodec(new TypeCodecInfo(BattleCreateParameters,true),new OptionalCodecDecorator(local4)); local4 = new CodecBattleMode(); local3.registerCodec(new EnumCodecInfo(BattleMode,false),local4); local3.registerCodec(new EnumCodecInfo(BattleMode,true),new OptionalCodecDecorator(local4)); local4 = new CodecBattleRoundParameters(); local3.registerCodec(new TypeCodecInfo(BattleRoundParameters,false),local4); local3.registerCodec(new TypeCodecInfo(BattleRoundParameters,true),new OptionalCodecDecorator(local4)); local4 = new CodecRange(); local3.registerCodec(new TypeCodecInfo(Range,false),local4); local3.registerCodec(new TypeCodecInfo(Range,true),new OptionalCodecDecorator(local4)); local4 = new CodecBattleTeam(); local3.registerCodec(new EnumCodecInfo(BattleTeam,false),local4); local3.registerCodec(new EnumCodecInfo(BattleTeam,true),new OptionalCodecDecorator(local4)); local4 = new CodecBattleLimits(); local3.registerCodec(new TypeCodecInfo(BattleLimits,false),local4); local3.registerCodec(new TypeCodecInfo(BattleLimits,true),new OptionalCodecDecorator(local4)); local4 = new CodecMapTheme(); local3.registerCodec(new EnumCodecInfo(MapTheme,false),local4); local3.registerCodec(new EnumCodecInfo(MapTheme,true),new OptionalCodecDecorator(local4)); local4 = new CodecPerformanceCC(); local3.registerCodec(new TypeCodecInfo(PerformanceCC,false),local4); local3.registerCodec(new TypeCodecInfo(PerformanceCC,true),new OptionalCodecDecorator(local4)); local4 = new CodecStatisticsModelCC(); local3.registerCodec(new TypeCodecInfo(StatisticsModelCC,false),local4); local3.registerCodec(new TypeCodecInfo(StatisticsModelCC,true),new OptionalCodecDecorator(local4)); local4 = new CodecUserInfo(); local3.registerCodec(new TypeCodecInfo(UserInfo,false),local4); local3.registerCodec(new TypeCodecInfo(UserInfo,true),new OptionalCodecDecorator(local4)); local4 = new CodecUserReward(); local3.registerCodec(new TypeCodecInfo(UserReward,false),local4); local3.registerCodec(new TypeCodecInfo(UserReward,true),new OptionalCodecDecorator(local4)); local4 = new CodecUserStat(); local3.registerCodec(new TypeCodecInfo(UserStat,false),local4); local3.registerCodec(new TypeCodecInfo(UserStat,true),new OptionalCodecDecorator(local4)); local4 = new CodecStatisticsDMCC(); local3.registerCodec(new TypeCodecInfo(StatisticsDMCC,false),local4); local3.registerCodec(new TypeCodecInfo(StatisticsDMCC,true),new OptionalCodecDecorator(local4)); local4 = new CodecStatisticsTeamCC(); local3.registerCodec(new TypeCodecInfo(StatisticsTeamCC,false),local4); local3.registerCodec(new TypeCodecInfo(StatisticsTeamCC,true),new OptionalCodecDecorator(local4)); local4 = new CodecBattleSuspicionLevel(); local3.registerCodec(new EnumCodecInfo(BattleSuspicionLevel,false),local4); local3.registerCodec(new EnumCodecInfo(BattleSuspicionLevel,true),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleCreateParametersLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleCreateParameters,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleCreateParameters,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleCreateParametersLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleCreateParameters,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleCreateParameters,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleModeLevel1(false); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleMode,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleMode,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleModeLevel1(true); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleMode,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleMode,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleRoundParametersLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleRoundParameters,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleRoundParameters,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleRoundParametersLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleRoundParameters,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleRoundParameters,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecRangeLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(Range,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(Range,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecRangeLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(Range,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(Range,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleTeamLevel1(false); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleTeam,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleTeam,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleTeamLevel1(true); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleTeam,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleTeam,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleLimitsLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleLimits,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleLimits,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleLimitsLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleLimits,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleLimits,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecMapThemeLevel1(false); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(MapTheme,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(MapTheme,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecMapThemeLevel1(true); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(MapTheme,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(MapTheme,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecPerformanceCCLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(PerformanceCC,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(PerformanceCC,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecPerformanceCCLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(PerformanceCC,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(PerformanceCC,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecStatisticsModelCCLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsModelCC,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsModelCC,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecStatisticsModelCCLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsModelCC,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsModelCC,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecUserInfoLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserInfo,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserInfo,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecUserInfoLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserInfo,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserInfo,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecUserRewardLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserReward,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserReward,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecUserRewardLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserReward,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserReward,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecUserStatLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserStat,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserStat,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecUserStatLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserStat,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserStat,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecStatisticsDMCCLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsDMCC,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsDMCC,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecStatisticsDMCCLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsDMCC,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsDMCC,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecStatisticsTeamCCLevel1(false); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsTeamCC,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsTeamCC,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecStatisticsTeamCCLevel1(true); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsTeamCC,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StatisticsTeamCC,true),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleSuspicionLevelLevel1(false); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleSuspicionLevel,false),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleSuspicionLevel,false),true,1),new OptionalCodecDecorator(local4)); local4 = new VectorCodecBattleSuspicionLevelLevel1(true); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleSuspicionLevel,true),false,1),local4); local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(BattleSuspicionLevel,true),true,1),new OptionalCodecDecorator(local4)); } public function stop(param1:OSGi) : void { } } }
package alternativa.tanks.models.battle.gui.gui.statistics.table { import alternativa.osgi.service.display.IDisplay; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.models.battle.battlefield.event.ContinueBattleEvent; import alternativa.tanks.models.battle.gui.gui.statistics.field.timelimit.TimeLimitField; import alternativa.tanks.models.battle.gui.statistics.ClientUserStat; import alternativa.tanks.services.battleinput.BattleInputService; import alternativa.tanks.services.battleinput.MouseLockLockType; import alternativa.types.Long; import alternativa.utils.removeDisplayObject; import controls.Label; import controls.RedButton; import controls.buttons.h30px.GreenMediumButton; import controls.resultassets.ResultWindowGray; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.clients.fp10.libraries.TanksLocale; public class StatisticsTable extends Sprite { [Inject] public static var display:IDisplay; [Inject] public static var localeService:ILocaleService; [Inject] public static var battleInputService:BattleInputService; private var redTeamView:ViewStatistics; private var blueTeamView:ViewStatistics; private var dmView:ViewStatistics; private var controlPanel:Sprite; private var exitButton:RedButton; private var continueButton:GreenMediumButton; private var exitBg:ResultWindowGray; private var isTeamMode:Boolean; private var restartLabel:Label; private var restartField:TimeLimitField; private var battleNamePlate:BattleNamePlate; private var matchBattle:Boolean; public function StatisticsTable(param1:String, param2:Boolean) { super(); this.isTeamMode = param2; visible = false; this.battleNamePlate = new BattleNamePlate(param1); } public function setBattleName(param1:String) : void { this.battleNamePlate.setBattleName(param1); } public function showDm(param1:Boolean, param2:Boolean, param3:Long, param4:Vector.<ClientUserStat>, param5:Boolean, param6:int) : void { if(!visible) { battleInputService.lockMouseLocking(MouseLockLockType.BATTLE_STATS); this.dmView = this.createView(ViewStatistics.GREEN,param3,param4,param5,BattleTeam.NONE,param2); addChild(this.dmView); this.doShow(param1,param6); } } public function showTeam(param1:Boolean, param2:Long, param3:Vector.<ClientUserStat>, param4:Vector.<ClientUserStat>, param5:Boolean, param6:int, param7:BattleTeam, param8:Boolean) : void { if(!visible) { battleInputService.lockMouseLocking(MouseLockLockType.BATTLE_STATS); this.redTeamView = this.createView(ViewStatistics.RED,param2,param3,param5,param7,param8); addChild(this.redTeamView); this.blueTeamView = this.createView(ViewStatistics.BLUE,param2,param4,param5,param7,param8); addChild(this.blueTeamView); this.doShow(param1,param6); } } private function createView(param1:int, param2:Long, param3:Vector.<ClientUserStat>, param4:Boolean, param5:BattleTeam, param6:Boolean) : ViewStatistics { var local7:ViewStatistics = new ViewStatistics(param1,param2,param4,param5,param6); local7.updatePlayersInfo(param3); return local7; } private function doShow(param1:Boolean, param2:int) : void { this.matchBattle = param1; visible = true; addChild(this.battleNamePlate); this.createExitPanel(param2); display.stage.addEventListener(Event.RESIZE,this.onResize); this.onResize(); } public function hide() : void { if(!visible) { return; } battleInputService.unlockMouseLocking(MouseLockLockType.BATTLE_STATS); visible = false; display.stage.removeEventListener(Event.RESIZE,this.onResize); removeChild(this.battleNamePlate); removeDisplayObject(this.blueTeamView); this.blueTeamView = null; removeDisplayObject(this.redTeamView); this.redTeamView = null; removeDisplayObject(this.dmView); this.dmView = null; if(this.exitButton != null) { this.exitButton.removeEventListener(MouseEvent.CLICK,this.onExitClick); this.exitButton = null; } if(this.continueButton != null) { this.continueButton.removeEventListener(MouseEvent.CLICK,this.onContinueClick); this.continueButton = null; } removeDisplayObject(this.controlPanel); this.controlPanel = null; } private function onResize(param1:Event = null) : void { var local2:int = 0; var local5:ViewStatistics = null; local2 = display.stage.stageWidth / 2; var local3:int = display.stage.stageHeight / 2; var local4:ViewStatistics = null; local5 = null; if(Boolean(this.dmView)) { this.setViewHeight(); this.dmView.y = -(this.dmView.height >> 1); local4 = local5 = this.dmView; } else if(Boolean(this.blueTeamView) && Boolean(this.redTeamView)) { this.setTeamViewHeight(); this.redTeamView.y = -(this.blueTeamView.height + this.redTeamView.height + 5 >> 1); this.blueTeamView.y = this.redTeamView.y + this.redTeamView.height + 5; local4 = this.redTeamView; local5 = this.blueTeamView; } this.battleNamePlate.y = local4.y - this.battleNamePlate.height - 5; this.battleNamePlate.width = local4.width; this.controlPanel.y = local5.y + local5.height + 10; this.exitBg.width = local4.width; this.exitButton.x = this.exitBg.width - this.exitButton.width - 7; x = local2 - (width >> 1); y = local3; } private function setViewHeight() : void { var local1:Number = display.stage.stageHeight - 200; this.dmView.resize(local1); } private function setTeamViewHeight() : void { var local2:Number = NaN; var local1:Number = display.stage.stageHeight - 200; this.blueTeamView.resize(local1); this.redTeamView.resize(local1); if(this.blueTeamView.height + this.redTeamView.height > local1) { local2 = 0.5 * local1; if(this.blueTeamView.height > local2 && this.redTeamView.height > local2) { this.blueTeamView.resize(local2); this.redTeamView.resize(local2); } else if(this.blueTeamView.height < local2) { this.redTeamView.resize(local1 - this.blueTeamView.height); } else { this.blueTeamView.resize(local1 - this.redTeamView.height); } } } private function createExitPanel(param1:int) : void { this.controlPanel = new Sprite(); this.exitBg = new ResultWindowGray(); this.exitBg.width = width; this.controlPanel.addChild(this.exitBg); this.exitButton = new RedButton(); this.exitBg.height = this.exitButton.height + 8; this.exitButton.addEventListener(MouseEvent.CLICK,this.onExitClick); this.exitButton.width = 96; this.exitButton.label = localeService.getText(TanksLocale.TEXT_BATTLE_EXIT); this.exitButton.x = this.exitBg.width - this.exitButton.width - 7; this.exitButton.y = 4; this.controlPanel.addChild(this.exitButton); if(param1 > 0) { this.continueButton = new GreenMediumButton(); this.continueButton.addEventListener(MouseEvent.CLICK,this.onContinueClick); this.continueButton.width = 96; this.continueButton.label = localeService.getText(TanksLocale.TEXT_CONTINUE_BATTLE_TEXT); this.continueButton.x = 7; this.continueButton.y = 4; this.controlPanel.addChild(this.continueButton); this.restartLabel = new Label(); this.restartLabel.text = this.matchBattle ? localeService.getText(TanksLocale.TEXT_BATTLE_FINISH_IN) : localeService.getText(TanksLocale.TEXT_BATTLE_RESTART) + ": "; this.controlPanel.addChild(this.restartLabel); this.restartLabel.x = 4; this.restartLabel.y = 10; this.restartLabel.visible = false; this.restartField = new TimeLimitField(-1,null,null,true); this.restartField.startCountdown(param1); this.controlPanel.addChild(this.restartField); this.restartField.x = this.restartLabel.x + this.restartLabel.width; this.restartField.y = 4; this.restartField.size = 22; this.restartField.visible = false; } addChild(this.controlPanel); } public function removePlayer(param1:Long, param2:BattleTeam) : void { if(!visible) { return; } if(this.isTeamMode && this.blueTeamView && Boolean(this.redTeamView)) { if(param2 == BattleTeam.BLUE) { this.blueTeamView.removePlayer(param1); } else { this.redTeamView.removePlayer(param1); } this.setTeamViewHeight(); } else if(Boolean(this.dmView)) { this.dmView.removePlayer(param1); this.setViewHeight(); } } public function updatePlayersDm(param1:Vector.<ClientUserStat>) : void { if(visible) { this.dmView.updatePlayersInfo(param1); this.setViewHeight(); this.onResize(); } } public function updatePlayerDm(param1:ClientUserStat) : void { if(visible) { this.dmView.updatePlayerInfo(param1); } } public function updatePlayersTeam(param1:Vector.<ClientUserStat>, param2:BattleTeam) : void { if(visible) { if(param2 == BattleTeam.BLUE) { this.blueTeamView.updatePlayersInfo(param1); } else if(param2 == BattleTeam.RED) { this.redTeamView.updatePlayersInfo(param1); } this.setTeamViewHeight(); this.onResize(); } } public function updatePlayerTeam(param1:ClientUserStat) : void { if(visible) { if(param1.teamType == BattleTeam.BLUE) { this.blueTeamView.updatePlayerInfo(param1); } else if(param1.teamType == BattleTeam.RED) { this.redTeamView.updatePlayerInfo(param1); } } } private function onExitClick(param1:MouseEvent) : void { dispatchEvent(new ContinueBattleEvent(ContinueBattleEvent.EXIT)); } private function onContinueClick(param1:MouseEvent) : void { if(!this.matchBattle) { this.restartLabel.visible = true; this.restartField.visible = true; } this.continueButton.visible = false; dispatchEvent(new ContinueBattleEvent(ContinueBattleEvent.CONTINUE)); } } }
package alternativa.engine3d.animation { import alternativa.engine3d.alternativa3d; use namespace alternativa3d; public class AnimationCouple extends AnimationNode { private var _left:AnimationNode; private var _right:AnimationNode; public var balance:Number = 0.5; public function AnimationCouple() { super(); } override alternativa3d function update(param1:Number, param2:Number) : void { var local3:Number = this.balance <= 0 ? 0 : (this.balance >= 1 ? 1 : this.balance); if(this._left == null) { this._right.alternativa3d::update(param1 * speed,param2); } else if(this._right == null) { this._left.alternativa3d::update(param1 * speed,param2); } else { this._left.alternativa3d::update(param1 * speed,(1 - local3) * param2); this._right.alternativa3d::update(param1 * speed,local3 * param2); } } override alternativa3d function setController(param1:AnimationController) : void { this.alternativa3d::controller = param1; if(this._left != null) { this._left.alternativa3d::setController(param1); } if(this._right != null) { this._right.alternativa3d::setController(param1); } } override alternativa3d function addNode(param1:AnimationNode) : void { super.alternativa3d::addNode(param1); param1.alternativa3d::_isActive = true; } override alternativa3d function removeNode(param1:AnimationNode) : void { if(this._left == param1) { this._left = null; } else { this._right = null; } super.alternativa3d::removeNode(param1); } public function get left() : AnimationNode { return this._left; } public function set left(param1:AnimationNode) : void { if(param1 != this._left) { if(param1.alternativa3d::_parent == this) { throw new Error("Animation already exist in blender"); } if(this._left != null) { this.alternativa3d::removeNode(this._left); } this._left = param1; if(param1 != null) { this.alternativa3d::addNode(param1); } } } public function get right() : AnimationNode { return this._right; } public function set right(param1:AnimationNode) : void { if(param1 != this._right) { if(param1.alternativa3d::_parent == this) { throw new Error("Animation already exist in blender"); } if(this._right != null) { this.alternativa3d::removeNode(this._right); } this._right = param1; if(param1 != null) { this.alternativa3d::addNode(param1); } } } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapHullPower.png")] public class ItemInfoPanelBitmaps_bitmapHullPower extends BitmapAsset { public function ItemInfoPanelBitmaps_bitmapHullPower() { super(); } } }
package _codec.projects.tanks.client.panel.model.mobilequest.quest { 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.CollectionCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import projects.tanks.client.panel.model.mobilequest.quest.MobileQuestCC; import projects.tanks.client.panel.model.mobilequest.quest.MobileQuestReward; public class CodecMobileQuestCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_countSteps:ICodec; private var codec_rewards:ICodec; private var codec_skipStepShopItemId:ICodec; public function CodecMobileQuestCC() { super(); } public function init(param1:IProtocol) : void { this.codec_countSteps = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_rewards = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(MobileQuestReward,false),false,1)); this.codec_skipStepShopItemId = param1.getCodec(new TypeCodecInfo(Long,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:MobileQuestCC = new MobileQuestCC(); local2.countSteps = this.codec_countSteps.decode(param1) as int; local2.rewards = this.codec_rewards.decode(param1) as Vector.<MobileQuestReward>; local2.skipStepShopItemId = this.codec_skipStepShopItemId.decode(param1) as Long; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:MobileQuestCC = MobileQuestCC(param2); this.codec_countSteps.encode(param1,local3.countSteps); this.codec_rewards.encode(param1,local3.rewards); this.codec_skipStepShopItemId.encode(param1,local3.skipStepShopItemId); } } }
package { import controls.panel.BaseButton; [Embed(source="/_assets/assets.swf", symbol="symbol632")] public dynamic class MainPanelBugButton extends BaseButton { public function MainPanelBugButton() { super(); } } }
package alternativa.tanks.models.tank.ultimate.hornet { import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Mesh; import alternativa.math.Vector3; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventSupport; import alternativa.tanks.battle.events.TankLoadedEvent; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.models.tank.ITankModel; import alternativa.tanks.models.tank.hullcommon.HullCommon; import alternativa.tanks.sfx.Sound3D; import alternativa.utils.TextureMaterialRegistry; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectUnloadListener; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.ultimate.effects.hornet.HornetUltimateModelBase; import projects.tanks.client.battlefield.models.ultimate.effects.hornet.IHornetUltimateModelBase; [ModelInfo] public class HornetUltimateModel extends HornetUltimateModelBase implements IHornetUltimateModelBase, ObjectLoadListener, ObjectUnloadListener { [Inject] public static var battleService:BattleService; [Inject] public static var textureMaterialRegistry:TextureMaterialRegistry; [Inject] public static var battleEventDispatcher:BattleEventDispatcher; private var vector:Vector3 = new Vector3(); private var battleEventSupport:BattleEventSupport; public function HornetUltimateModel() { super(); this.battleEventSupport = new BattleEventSupport(battleEventDispatcher); this.battleEventSupport.addEventHandler(TankLoadedEvent,this.onTankLoaded); } public function objectLoaded() : void { this.battleEventSupport.activateHandlers(); } public function objectUnloaded() : void { this.battleEventSupport.deactivateHandlers(); } private function onTankLoaded(param1:TankLoadedEvent) : void { var event:TankLoadedEvent = param1; object = ITankModel(object.adapt(ITankModel)).getTankSet().hull; try { if(getInitParam() != null && getInitParam().effectEnabled) { this.showUltimateRadarIsTurnedOn(); } } finally { popObject(); } } public function showUltimateRadarIsTurnedOn() : void { var local1:IGameObject = HullCommon(object.adapt(HullCommon)).getTankObject(); var local2:ITankModel = ITankModel(local1.adapt(ITankModel)); var local3:Mesh = local2.getTank().getSkin().getHullMesh(); var local4:Sound3D = Sound3D.create(getInitParam().effectStartSound.sound); this.vector.reset(local3.x,local3.y,local3.z); var local5:GameCamera = battleService.getBattleScene3D().getCamera(); local4.play(0,0); local4.checkVolume(local5.position,this.vector,local5.xAxis); var local6:TextureMaterial = textureMaterialRegistry.getMaterial(getInitParam().ring.data); var local7:Sound3D = Sound3D.create(getInitParam().sonarSound.sound); var local8:RadarEffect = this.createRadarEffect(local3,local6,local7,local2.isLocal()); putData(RadarEffect,local8); } public function showUltimateRadarIsTurnedOff() : void { var local1:RadarEffect = RadarEffect(getData(RadarEffect)); if(local1 != null) { local1.fadeOut(); } } private function createRadarEffect(param1:Mesh, param2:TextureMaterial, param3:Sound3D, param4:Boolean) : RadarEffect { var local5:RadarEffect = param4 ? RadarEffectSmall(battleService.getObjectPool().getObject(RadarEffectSmall)) : RadarEffectBig(battleService.getObjectPool().getObject(RadarEffectBig)); local5.init(param2,param1,param3); battleService.addGraphicEffect(local5); return local5; } } }
package projects.tanks.client.battlefield.models.tankparts.weapon.freeze { public class FreezeCC { private var _damageAreaConeAngle:Number; private var _damageAreaRange:Number; public function FreezeCC(param1:Number = 0, param2:Number = 0) { super(); this._damageAreaConeAngle = param1; this._damageAreaRange = param2; } public function get damageAreaConeAngle() : Number { return this._damageAreaConeAngle; } public function set damageAreaConeAngle(param1:Number) : void { this._damageAreaConeAngle = param1; } public function get damageAreaRange() : Number { return this._damageAreaRange; } public function set damageAreaRange(param1:Number) : void { this._damageAreaRange = param1; } public function toString() : String { var local1:String = "FreezeCC ["; local1 += "damageAreaConeAngle = " + this.damageAreaConeAngle + " "; local1 += "damageAreaRange = " + this.damageAreaRange + " "; return local1 + "]"; } } }
package mx.core { public interface IRepeaterClient { function get instanceIndices() : Array; function set instanceIndices(value:Array) : void; function get isDocument() : Boolean; function get repeaterIndices() : Array; function set repeaterIndices(value:Array) : void; function get repeaters() : Array; function set repeaters(value:Array) : void; function initializeRepeaterArrays(parent:IRepeaterClient) : void; } }
package projects.tanks.client.battlefield.models.ultimate.effects.hunter { 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 TankStunModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function TankStunModelServer(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.utils { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.materials.TextureMaterial; import alternativa.math.Vector3; import alternativa.tanks.engine3d.TextureAnimation; import alternativa.tanks.engine3d.UVFrame; import alternativa.utils.TextureMaterialRegistry; import flash.display.BitmapData; import flash.filters.BitmapFilter; import flash.geom.Point; import flash.utils.Dictionary; import platform.client.fp10.core.resource.types.MultiframeTextureResource; public class GraphicsUtils { private static var filteredImages:Dictionary = new Dictionary(true); public function GraphicsUtils() { super(); } public static function setObjectTransform(param1:Object3D, param2:Vector3, param3:Vector3) : void { param1.x = param2.x; param1.y = param2.y; param1.z = param2.z; param1.rotationX = param3.x; param1.rotationY = param3.y; param1.rotationZ = param3.z; } public static function getTextureAnimationFromResource(param1:TextureMaterialRegistry, param2:MultiframeTextureResource) : TextureAnimation { var local3:TextureAnimation = getTextureAnimation(param1,param2.data,param2.frameWidth,param2.frameHeight,param2.numFrames); local3.fps = param2.fps; return local3; } public static function createFilteredImage(param1:BitmapData, param2:BitmapFilter) : BitmapData { var local3:* = undefined; var local4:BitmapData = null; var local5:Object = null; for(local3 in filteredImages) { local5 = filteredImages[local3]; if(local5.s == param1 && local5.f == param2) { return local3; } } local4 = param1.clone(); local4.applyFilter(param1,param1.rect,new Point(),param2); filteredImages[local4] = { "s":param1, "f":param2 }; return local4; } public static function getTextureAnimation(param1:TextureMaterialRegistry, param2:BitmapData, param3:int, param4:int, param5:int = 0, param6:Boolean = true) : TextureAnimation { var local7:TextureMaterial = param1.getMaterial(param2); var local8:Vector.<UVFrame> = getUVFramesFromTexture(param2,param3,param4,param5); return new TextureAnimation(local7,local8); } public static function getUVFramesFromTexture(param1:BitmapData, param2:int, param3:int, param4:int = 0) : Vector.<UVFrame> { var local15:int = 0; var local16:int = 0; var local17:int = 0; var local18:int = 0; var local19:int = 0; var local5:int = param1.width; var local6:int = Math.min(param2,local5); var local7:int = local5 / local6; var local8:int = param1.height; var local9:int = Math.min(param3,local8); var local10:int = local8 / local9; var local11:int = local7 * local10; if(param4 > 0 && local11 > param4) { local11 = param4; } var local12:Vector.<UVFrame> = new Vector.<UVFrame>(local11); var local13:int = 0; var local14:int = 0; while(local14 < local10) { local15 = local14 * local9; local16 = local15 + local9; local17 = 0; while(local17 < local7) { local18 = local17 * local6; local19 = local18 + local6; var local20:* = local13++; local12[local20] = new UVFrame(local18 / local5,local15 / local8,local19 / local5,local16 / local8); if(local13 == local11) { return local12; } local17++; } local14++; } return local12; } public static function getUVFramesFromTextureWithMirror(param1:BitmapData, param2:int, param3:int, param4:int = 0) : Vector.<UVFrame> { var local15:int = 0; var local16:int = 0; var local17:int = 0; var local18:int = 0; var local19:int = 0; var local20:Number = NaN; var local21:Number = NaN; var local5:int = param1.width; var local6:int = Math.min(param2,local5); var local7:int = local5 / local6; var local8:int = param1.height; var local9:int = Math.min(param3,local8); var local10:int = local8 / local9; var local11:int = local7 * local10; if(param4 > 0 && local11 > param4) { local11 = param4; } var local12:Vector.<UVFrame> = new Vector.<UVFrame>(local11); var local13:int = 0; var local14:int = 0; while(local14 < local10) { local15 = local14 * local9; local16 = local15 + local9; local17 = 0; while(local17 < local7) { local18 = local17 * local6; local19 = local18 + local6; local20 = local18 / local5; local21 = local19 / local5; var local22:* = local13++; local12[local22] = new UVFrame(local20,local15 / local8,local21,local16 / local8); if(local13 == local11) { return local12; } var local23:* = local13++; local12[local23] = new UVFrame(local21,local15 / local8,local20,local16 / local8); if(local13 == local11) { return local12; } local17++; } local14++; } return local12; } } }
package alternativa.tanks.sfx { import alternativa.math.Vector3; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.utils.objectpool.Pool; public class DistanceScaledAnimatedPlaneEffect extends AnimatedPlaneEffect { private static const MIN_DISTANCE:Number = 3000; private static const SCALE_COEFFICIENT:Number = 1 / 5000; private static const v:Vector3 = new Vector3(); public function DistanceScaledAnimatedPlaneEffect(param1:Pool) { super(param1); } override public function play(param1:int, param2:GameCamera) : Boolean { var local4:Number = NaN; var local3:Boolean = super.play(param1,param2); if(local3) { v.reset(plane.x,plane.y,plane.z); local4 = param2.position.distanceTo(v); if(local4 > MIN_DISTANCE) { scale += local4 * SCALE_COEFFICIENT; } return true; } return false; } } }
package projects.tanks.client.garage.models.item.videoads { 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 VideoAdsItemUpgradeModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:VideoAdsItemUpgradeModelServer; private var client:IVideoAdsItemUpgradeModelBase = IVideoAdsItemUpgradeModelBase(this); private var modelId:Long = Long.getLong(1632109435,-443674078); private var _maxAdsShowedId:Long = Long.getLong(1354999069,-1103449185); private var _maxAdsShowed_cooldwownTimeInSecCodec:ICodec; public function VideoAdsItemUpgradeModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new VideoAdsItemUpgradeModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(VideoAdsItemUpgradeCC,false))); this._maxAdsShowed_cooldwownTimeInSecCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } protected function getInitParam() : VideoAdsItemUpgradeCC { return VideoAdsItemUpgradeCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._maxAdsShowedId: this.client.maxAdsShowed(int(this._maxAdsShowed_cooldwownTimeInSecCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package _codec.projects.tanks.client.tanksservices.model.notifier.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.tanksservices.model.notifier.referrals.ReferralNotifierData; public class VectorCodecReferralNotifierDataLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecReferralNotifierDataLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ReferralNotifierData,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.<ReferralNotifierData> = new Vector.<ReferralNotifierData>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ReferralNotifierData(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ReferralNotifierData = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ReferralNotifierData> = Vector.<ReferralNotifierData>(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.gui.panel.helpers { import controls.Label; import utils.FontParamsUtil; public class PlayerInfoHelper { public function PlayerInfoHelper() { super(); } public static function setDefaultSharpnessAndThickness(param1:Label) : void { param1.sharpness = FontParamsUtil.SHARPNESS_LABEL_BASE; param1.thickness = FontParamsUtil.THICKNESS_LABEL_BASE; } } }
package projects.tanks.client.panel.model.shop.shopitemcategory { 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 ShopItemCategoryModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function ShopItemCategoryModelServer(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 forms.friends { public class FriendsWindowState { public static var ACCEPTED:FriendsWindowState = new FriendsWindowState(0); public static var INCOMING:FriendsWindowState = new FriendsWindowState(1); public static var OUTCOMING:FriendsWindowState = new FriendsWindowState(2); private var _value:int; public function FriendsWindowState(param1:int) { super(); this._value = param1; } public function get value() : int { return this._value; } } }
package projects.tanks.client.battlefield.models.ultimate.effects.viking { import platform.client.fp10.core.resource.types.SoundResource; import platform.client.fp10.core.resource.types.TextureResource; public class VikingUltimateCC { private var _effectEnabled:Boolean; private var _effectEndSound:SoundResource; private var _effectSound:SoundResource; private var _effectStartSound:SoundResource; private var _flame:TextureResource; private var _smoke:TextureResource; public function VikingUltimateCC(param1:Boolean = false, param2:SoundResource = null, param3:SoundResource = null, param4:SoundResource = null, param5:TextureResource = null, param6:TextureResource = null) { super(); this._effectEnabled = param1; this._effectEndSound = param2; this._effectSound = param3; this._effectStartSound = param4; this._flame = param5; this._smoke = param6; } public function get effectEnabled() : Boolean { return this._effectEnabled; } public function set effectEnabled(param1:Boolean) : void { this._effectEnabled = param1; } public function get effectEndSound() : SoundResource { return this._effectEndSound; } public function set effectEndSound(param1:SoundResource) : void { this._effectEndSound = param1; } public function get effectSound() : SoundResource { return this._effectSound; } public function set effectSound(param1:SoundResource) : void { this._effectSound = param1; } public function get effectStartSound() : SoundResource { return this._effectStartSound; } public function set effectStartSound(param1:SoundResource) : void { this._effectStartSound = param1; } public function get flame() : TextureResource { return this._flame; } public function set flame(param1:TextureResource) : void { this._flame = param1; } public function get smoke() : TextureResource { return this._smoke; } public function set smoke(param1:TextureResource) : void { this._smoke = param1; } public function toString() : String { var local1:String = "VikingUltimateCC ["; local1 += "effectEnabled = " + this.effectEnabled + " "; local1 += "effectEndSound = " + this.effectEndSound + " "; local1 += "effectSound = " + this.effectSound + " "; local1 += "effectStartSound = " + this.effectStartSound + " "; local1 += "flame = " + this.flame + " "; local1 += "smoke = " + this.smoke + " "; return local1 + "]"; } } }
package projects.tanks.clients.flash.resources.tanks { import alternativa.engine3d.core.Object3DContainer; import alternativa.engine3d.objects.Mesh; public class MeshContainer extends Object3DContainer { private var meshes:Vector.<Mesh> = new Vector.<Mesh>(); public function MeshContainer() { super(); } public function getMeshes() : Vector.<Mesh> { return this.meshes; } public function setMeshes(param1:Vector.<Mesh>) : void { this.meshes.push(param1[0]); addChild(param1[0]); param1[0].x = 0; param1[0].y = 0; param1[0].z = 0; if(param1.length == 1) { return; } var local2:Object3DContainer = new Object3DContainer(); addChild(local2); local2.x = param1[1].x; local2.y = param1[1].y; local2.z = param1[1].z; param1[1].x = 0; param1[1].y = 0; param1[1].z = 0; var local3:int = 1; while(local3 < param1.length) { local2.addChild(param1[local3]); this.meshes.push(param1[local3]); local3++; } } } }
package _codec.projects.tanks.client.panel.model.profile.useremailpassword { 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.profile.useremailpassword.UserEmailCC; public class VectorCodecUserEmailCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecUserEmailCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(UserEmailCC,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.<UserEmailCC> = new Vector.<UserEmailCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = UserEmailCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:UserEmailCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<UserEmailCC> = Vector.<UserEmailCC>(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.buttons { import controls.Label; import controls.panel.BaseButton; import flash.display.Bitmap; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; public class MainPanelQuadButton extends BaseButton { private static const LABEL_POSITION_Y:int = 4; private var _buttonOverBitmap:Bitmap; private var _buttonNormalBitmap:Bitmap; private var _labelBase:Label; protected var previousY:int; public var savelLabel:String; public function MainPanelQuadButton(param1:Bitmap, param2:Bitmap) { this._buttonNormalBitmap = param2; this._buttonOverBitmap = param1; super(); super.type = 1; this.createLabel(); } private function createLabel() : void { this._labelBase = new Label(); this._labelBase.x = width / 2 - this._labelBase.width / 2; this._labelBase.y = 6; this._labelBase.autoSize = TextFieldAutoSize.CENTER; this._labelBase.mouseEnabled = false; addChild(this._labelBase); } override protected function configUI() : void { addChild(this._buttonNormalBitmap); addChild(this._buttonOverBitmap); this._buttonOverBitmap.visible = false; } override protected function addListeners() : void { buttonMode = true; mouseEnabled = true; mouseChildren = true; addEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent); addEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent); addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent); addEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent); } override protected function removeListeners() : void { buttonMode = false; mouseEnabled = false; mouseChildren = false; removeEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent); removeEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent); removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent); removeEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent); } override protected function onMouseEvent(param1:MouseEvent) : void { switch(param1.type) { case MouseEvent.MOUSE_OVER: this.previousY = y; this._buttonOverBitmap.visible = true; break; case MouseEvent.MOUSE_OUT: y = this.previousY; this._buttonOverBitmap.visible = false; break; case MouseEvent.MOUSE_DOWN: y = this.previousY + 1; this._buttonOverBitmap.visible = false; break; case MouseEvent.MOUSE_UP: y = this.previousY; this._buttonOverBitmap.visible = false; } } override public function set label(param1:String) : void { this._labelBase.htmlText = param1; this.savelLabel = param1; } } }
package forms.registration.bubbles { import alternativa.osgi.service.locale.ILocaleService; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.BubbleHelper; import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign; public class PasswordIsTooEasyBubble extends BubbleHelper { [Inject] public static var localeService:ILocaleService; public function PasswordIsTooEasyBubble() { super(); text = localeService.getText(TanksLocale.TEXT_HELP_PASSWORD_IS_TOO_SIMPLE); arrowLehgth = 20; arrowAlign = HelperAlign.TOP_LEFT; _showLimit = 3; } } }
package alternativa.osgi.service.focus { public interface IFocusListener { function focusIn(param1:Object) : void; function focusOut(param1:Object) : void; function activate() : void; function deactivate() : void; } }
package alternativa.osgi.service.launcherparams { public interface ILauncherParams { function getParameter(param1:String, param2:String = null) : String; function setParameter(param1:String, param2:String) : void; function removeParameter(param1:String) : void; function get parameterNames() : Vector.<String>; function get isDebug() : Boolean; function get urlLoader() : String; function isStrictUseHttp() : Boolean; function isDisableValidationResource() : Boolean; } }
package projects.tanks.client.garage.models.item.mobilelootbox.lootbox { public interface IMobileLootBoxModelBase { function openSuccessful(param1:Vector.<MobileLoot>) : void; function openingFailed() : void; function updateCount(param1:int) : void; } }
package alternativa.tanks.models.battlefield.gui.chat { import alternativa.init.Main; import alternativa.model.IModel; import alternativa.service.IModelService; import alternativa.tanks.models.battlefield.BattlefieldModel; import alternativa.tanks.models.battlefield.IBattleField; import alternativa.tanks.models.battlefield.IChatListener; import alternativa.tanks.models.battlefield.gui.chat.cmdhandlers.BlockCommandHandler; import alternativa.tanks.models.battlefield.gui.chat.cmdhandlers.IChatCommandHandler; import alternativa.tanks.models.battlefield.gui.chat.cmdhandlers.UnblockCommandHandler; import controls.Label; import controls.TankInput; import flash.display.Sprite; import flash.events.Event; import flash.events.FocusEvent; import flash.events.KeyboardEvent; import flash.text.TextField; import flash.ui.Keyboard; import forms.LobbyChat; import projects.tanks.client.battleservice.model.team.BattleTeamType; [Event(name="sendMessage",type="alternativa.tanks.model.battlefield.gui.chat.BattleChatEvent")] public class BattleChat extends Sprite { private const CMD_BLOCK:String = "/block"; private const CMD_UNBLOCK:String = "/unblock"; private var commandHandlers:Object; private var _alwaysShow:Boolean; private var inputControl:TankInput; public var input:TextField; public var spectators:Label; private var output:BattleChatOutput; private var _chatOpened:Boolean; private var _locked:Boolean; public function BattleChat() { super(); this.init(); } public function set alwaysShow(value:Boolean) : void { if(this._alwaysShow == value) { return; } this._alwaysShow = value; if(!this._chatOpened) { this.output.visible = this._alwaysShow; } } public function set locked(value:Boolean) : void { this._locked = value; } public function get chatOpened() : Boolean { return this._chatOpened; } public function addUserMessage(messageLabel:String, userName:String, userRank:int, chatLevel:int, teamType:BattleTeamType, text:String) : void { if(LobbyChat.blocked(userName)) { return; } this.output.addLine(messageLabel,userRank,chatLevel,userName,teamType,text); this.onResize(); } public function addSpectatorMessage(messageLabel:String) : void { this.output.addSpectatorLine(messageLabel); this.onResize(); } public function addSystemMessage(text:String) : void { this.output.addSystemMessage(text); this.onResize(); } public function clear() : void { this.output.clear(); } public function openChat() : void { var i:int = 0; if(this._chatOpened || this._locked) { return; } this.output.visible = true; this.input.addEventListener(FocusEvent.FOCUS_OUT,this.onFocusOut); this.input.addEventListener(KeyboardEvent.KEY_DOWN,this.onChatInputKey); this.input.addEventListener(KeyboardEvent.KEY_UP,this.onChatInputKey); this.input.text = ""; this.inputControl.visible = true; if((Main.osgi.getService(IBattleField) as BattlefieldModel).spectatorMode == true) { this.spectators.text = "Spectators: " + SpectatorList.spectators; this.spectators.visible = true; } else { this.spectators.text = ""; this.spectators.visible = false; } Main.stage.focus = this.input; this._chatOpened = true; this.onResize(); var modelRegister:IModelService = IModelService(Main.osgi.getService(IModelService)); var listeners:Vector.<IModel> = modelRegister.getModelsByInterface(IChatListener); if(listeners != null) { for(i = listeners.length - 1; i >= 0; i--) { IChatListener(listeners[i]).chatOpened(); } } } public function closeChat() : void { var i:int = 0; if(!this._chatOpened || this._locked) { return; } this.output.visible = this._alwaysShow; if(this.inputControl.visible) { this.input.removeEventListener(FocusEvent.FOCUS_OUT,this.onFocusOut); this.inputControl.visible = false; this.spectators.visible = false; Main.stage.focus = null; this.output.minimize(); this._chatOpened = false; this.onResize(); } dispatchEvent(new BattleChatEvent(BattleChatEvent.CHAT_EXIT,null)); var modelRegister:IModelService = IModelService(Main.osgi.getService(IModelService)); var listeners:Vector.<IModel> = modelRegister.getModelsByInterface(IChatListener); if(listeners != null) { for(i = listeners.length - 1; i >= 0; i--) { IChatListener(listeners[i]).chatClosed(); } } } private function init() : void { this.inputControl = new TankInput(); this.inputControl.tabEnabled = false; this.inputControl.tabChildren = false; this.inputControl.x = 10; addChild(this.inputControl); this.input = this.inputControl.textField; this.input.maxChars = 299; this.input.addEventListener(KeyboardEvent.KEY_UP,this.sendMessageKey); this.spectators = new Label(); this.spectators.textColor = 16776960; this.spectators.x = 10; this.spectators.y = this.inputControl.y + 35; this.spectators.visible = false; addChild(this.spectators); this.output = new BattleChatOutput(); this.output.tabEnabled = false; this.output.tabChildren = false; this.output.x = 10; addChild(this.output); this.initCommandHandlers(); addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage); } private function initCommandHandlers() : void { this.commandHandlers = { "/block":new BlockCommandHandler(this.output), "/unblock":new UnblockCommandHandler(this.output) }; } private function onAddedToStage(e:Event) : void { this.inputControl.visible = false; this.spectators.visible = false; stage.addEventListener(Event.RESIZE,this.onResize); this.onResize(null); } private function onRemovedFromStage(e:Event) : void { stage.removeEventListener(Event.RESIZE,this.onResize); } private function onResize(e:Event = null) : void { var outputY:Number = NaN; if(this._chatOpened) { this.output.maximize(); } this.inputControl.width = int(0.25 * Main.stage.stageWidth); this.inputControl.y = Main.stage.stageHeight - this.inputControl.height - 70; outputY = this.inputControl.y - this.output.height - 10; this.spectators.y = this.inputControl.y + 35; if(outputY < 50) { while(outputY < 50) { outputY += this.output.height; this.output.shiftMessages(); outputY -= this.output.height; } } this.output.y = outputY; } private function sendMessageKey(e:KeyboardEvent) : void { if(this.inputControl.visible) { switch(e.keyCode) { case Keyboard.ENTER: if(this.input.text != "") { if(!this.handleCommand(this.input.text) && hasEventListener(BattleChatEvent.SEND_MESSAGE)) { dispatchEvent(new BattleChatEvent(BattleChatEvent.SEND_MESSAGE,this.input.text)); } this.input.text = ""; } case Keyboard.ESCAPE: e.keyCode = 0; this.closeChat(); } } } private function handleCommand(text:String) : Boolean { if(text.charAt(0) != "/") { return false; } var tokens:Array = text.split(/\s+/); if(tokens.length == 0) { return false; } var commandName:String = tokens.shift(); var handler:IChatCommandHandler = this.commandHandlers[commandName]; if(handler == null) { return false; } handler.handleCommand(tokens); return true; } private function onFocusOut(e:FocusEvent) : void { this.closeChat(); } private function onChatInputKey(e:KeyboardEvent) : void { e.stopPropagation(); } } }
package alternativa.tanks.gui.components.button { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.components.button.RequestCountIndicator_rightIconClass.png")] public class RequestCountIndicator_rightIconClass extends BitmapAsset { public function RequestCountIndicator_rightIconClass() { super(); } } }
package alternativa.tanks.gui.newbiesabonement { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.newbiesabonement.NewbiesAbonementInfoWindow_NEWBIES_ABONEMENT_INFO_IMG.png")] public class NewbiesAbonementInfoWindow_NEWBIES_ABONEMENT_INFO_IMG extends BitmapAsset { public function NewbiesAbonementInfoWindow_NEWBIES_ABONEMENT_INFO_IMG() { super(); } } }
package alternativa.engine3d.core { import alternativa.gfx.agal.VertexShader; public class ShadowVolumeVertexShader extends VertexShader { public function ShadowVolumeVertexShader() { super(); mul(vt1,va0,vc[14]); add(vt1.xyz,vt1,vc[15]); dp4(vt0.x,vt1,vc[11]); dp4(vt0.y,vt1,vc[12]); dp4(vt0.z,vt1,vc[13]); mov(vt0.w,vt1); mul(vt0.xy,vt0,vc[17]); mul(vt1.xy,vc[17].zw,vt0.z); add(vt0.xy,vt0,vt1); mov(op.xw,vt0.xz); neg(op.y,vt0); mul(vt0.z,vt0,vc[16]); add(op.z,vt0,vc[16].w); } } }
package projects.tanks.client.partners.impl.vkontakte { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class VkontakteInternalLoginModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:VkontakteInternalLoginModelServer; private var client:IVkontakteInternalLoginModelBase = IVkontakteInternalLoginModelBase(this); private var modelId:Long = Long.getLong(1975556474,1605360392); public function VkontakteInternalLoginModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new VkontakteInternalLoginModelServer(IModel(this)); } 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.client.users.model.referrerbonus { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class RankUpReferrerAwardModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:RankUpReferrerAwardModelServer; private var client:IRankUpReferrerAwardModelBase = IRankUpReferrerAwardModelBase(this); private var modelId:Long = Long.getLong(2055575281,-1485567427); public function RankUpReferrerAwardModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new RankUpReferrerAwardModelServer(IModel(this)); } 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.client.battlefield.models.tankparts.gearscore { 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 BattleGearScoreModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function BattleGearScoreModelServer(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 controls { import flash.display.MovieClip; public class TankWindowHeader extends MovieClip { public static const REGISTER:int = 1; public static const LOGIN:int = 2; public static const RECOVER:int = 3; public static const CHANGEPASSWORD:int = 4; public static const CHAT:int = 5; public static const CURRENT_BATTLES:int = 6; public static const BATTLE_INFO:int = 7; public static const CREATE_BATTLE:int = 8; public static const YOUR_TANK:int = 9; public static const INFORMATION:int = 10; public static const ATTANTION:int = 11; public static const UPGRADE:int = 12; public static const HALL_OF_FAME:int = 13; public static const BUG_REPORT:int = 14; public static const HELP:int = 15; public static const SYSTEM_MESSAGE:int = 16; public static const FRIENDS:int = 17; public static const SELL_CRYSTALS:int = 18; public static const ACCOUNT:int = 19; public static const SETTINGS:int = 20; public static const REFERALS:int = 21; public static const CONGRATULATIONS:int = 22; public static const LINK:int = 23; public static const YOUR_ITEMS:int = 24; public static const SHOP:int = 25; public static const WELCOME_BACK:int = 26; public static const NEWS:int = 27; public static const DAILY_QUESTS:int = 28; public function TankWindowHeader(param1:int = 0, param2:String = "en") { super(); var local3:int = 0; if(param2 == "ru") { local3 = 30; } else if(param2 == "cn") { local3 = 60; } else if(param2 == "de") { local3 = 90; } else if(param2 == "pt_BR") { local3 = 120; } if(param1 > 0) { gotoAndStop(param1 + local3); } } } }
package projects.tanks.client.panel.model.shop.description { 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 ShopItemAdditionalDescriptionModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function ShopItemAdditionalDescriptionModelServer(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.models.battlefield.gamemode { import alternativa.engine3d.core.ShadowMap; import alternativa.engine3d.lights.DirectionalLight; import alternativa.init.Main; import alternativa.math.Matrix3; import alternativa.math.Vector3; import alternativa.osgi.service.storage.IStorageService; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.model.panel.IBattleSettings; import alternativa.tanks.models.battlefield.BattleView3D; import flash.display.BitmapData; import flash.geom.Vector3D; public class HalloweenGameMode implements IGameMode { private var camera:GameCamera; public function HalloweenGameMode() { super(); } public function applyChanges(viewport:BattleView3D) : void { var camera:GameCamera = viewport.camera; this.camera = camera; camera.directionalLight = new DirectionalLight(1315346); var direction:Vector3D = new Vector3D(1,1,1); var matrix:Matrix3 = new Matrix3(); matrix.setRotationMatrix(-2.6,0.16,-2.8); var vector:Vector3 = new Vector3(0,1,0); vector.vTransformBy3(matrix); direction.x = vector.x; direction.y = vector.y; direction.z = vector.z; camera.directionalLight.lookAt(direction.x,direction.y,direction.z); camera.ambientColor = 602185; camera.shadowMap = new ShadowMap(2048,7500,15000,1,10000); camera.directionalLightStrength = 1; camera.shadowMapStrength = 1.5; camera.shadowMap.bias = 1; camera.useShadowMap = true; camera.deferredLighting = true; camera.fogColor = 8880256; camera.fogNear = 5000; camera.fogFar = 10000; camera.fogAlpha = 0.25; camera.ssao = true; camera.ssaoRadius = Number(400); camera.ssaoRange = Number(450); camera.ssaoColor = 2636880; camera.ssaoAlpha = Number(1.5); } public function applyChangesBeforeSettings(settings:IBattleSettings) : void { if(settings.fog && this.camera.fogStrength != 1) { this.camera.fogStrength = 1; this.camera.fogColor = 8880256; this.camera.fogNear = 5000; this.camera.fogFar = 10000; this.camera.fogAlpha = 0.25; } else if(!settings.fog) { this.camera.fogStrength = 0; } if(settings.shadows && !this.camera.useShadowMap) { this.camera.useShadowMap = true; if(this.camera.directionalLight != null) { this.camera.directionalLight.useShadowMap = true; } this.camera.shadowMapStrength = 1; } else if(!settings.shadows) { this.camera.useShadowMap = false; if(this.camera.directionalLight != null) { this.camera.directionalLight.useShadowMap = false; } this.camera.shadowMapStrength = 0; } if(settings.defferedLighting && this.camera.directionalLightStrength != 1) { this.camera.directionalLight.intensity = 1; this.camera.directionalLightStrength = 1; this.camera.deferredLighting = true; this.camera.deferredLightingStrength = 1; } else if(!settings.defferedLighting) { this.camera.directionalLight.intensity = 0; this.camera.directionalLightStrength = 0; this.camera.deferredLighting = false; this.camera.deferredLightingStrength = 0; } if(IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_ssao"] != null) { this.camera.ssao = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_ssao"]; } else { this.camera.ssao = false; } } public function applyColorchangesToSkybox(skybox:BitmapData) : BitmapData { return skybox; } } }
package projects.tanks.client.battlefield.models.user.suicide { public interface ISuicideModelBase { function suicide(param1:int) : void; } }
package projects.tanks.clients.fp10.models.tankspartnersmodel.partners.odnoklassniki { import alternativa.tanks.gui.payment.forms.PayModeForm; import alternativa.tanks.gui.shop.forms.GoToUrlForm; import alternativa.tanks.model.payment.category.PayModeView; import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode; import alternativa.tanks.model.payment.paymentstate.PaymentWindowService; import flash.external.ExternalInterface; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectUnloadListener; import projects.tanks.client.partners.impl.odnoklassniki.payment.IOdnoklassnikiPaymentModelBase; import projects.tanks.client.partners.impl.odnoklassniki.payment.OdnoklassnikiPaymentModelBase; [ModelInfo] public class OdnoklassnikiPaymentModel extends OdnoklassnikiPaymentModelBase implements IOdnoklassnikiPaymentModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, ObjectUnloadListener { [Inject] public static var paymentWindowService:PaymentWindowService; public function OdnoklassnikiPaymentModel() { super(); } public function receivePaymentTransaction(param1:String, param2:String, param3:String) : void { if(ExternalInterface.available) { ExternalInterface.call("showOdnoklassnikiPaymentForItem",param1,param2,param3); } paymentWindowService.switchToBeginning(); } public function requestAsyncUrl() : void { server.getPaymentTransaction(paymentWindowService.getChosenItem().id); } public function objectLoaded() : void { putData(PayModeForm,new GoToUrlForm(object)); } public function getView() : PayModeForm { return PayModeForm(getData(PayModeForm)); } public function objectUnloaded() : void { this.getView().destroy(); clearData(PayModeForm); } } }
package projects.tanks.client.clans.container { import alternativa.types.Long; public class ContainerCC { private var _objects:Vector.<Long>; public function ContainerCC(param1:Vector.<Long> = null) { super(); this._objects = param1; } public function get objects() : Vector.<Long> { return this._objects; } public function set objects(param1:Vector.<Long>) : void { this._objects = param1; } public function toString() : String { var local1:String = "ContainerCC ["; local1 += "objects = " + this.objects + " "; return local1 + "]"; } } }
package alternativa.tanks.controller.events { import flash.events.Event; public class ChangeEmailCaptchaEvent extends Event { public static const CAPTCHA:String = "ChangeEmailCaptchaEvent.CAPTCHA"; private var captchaAnswer:String; private var password:String; private var email:String; public function ChangeEmailCaptchaEvent(param1:String, param2:String, param3:String) { super(CAPTCHA); this.captchaAnswer = param1; this.password = param2; this.email = param3; } public function getCaptchaAnswer() : String { return this.captchaAnswer; } public function getPassword() : String { return this.password; } public function getEmail() : String { return this.email; } } }
package alternativa.tanks.models.battlefield { import mx.core.BitmapAsset; [ExcludeClass] public class ViewportBorder_bmpClassCorner2 extends BitmapAsset { public function ViewportBorder_bmpClassCorner2() { super(); } } }
package alternativa.tanks.model.payment.shop.coin { import alternativa.tanks.gui.shop.shopitems.item.base.ShopButton; import alternativa.tanks.gui.shop.shopitems.item.cashpackage.CashPackageButton; import alternativa.tanks.model.payment.shop.ShopItemView; import alternativa.tanks.model.payment.shop.cashpackage.CashPackage; import projects.tanks.client.panel.model.shop.coinpackage.CoinPackageModelBase; import projects.tanks.client.panel.model.shop.coinpackage.ICoinPackageModelBase; [ModelInfo] public class CoinPackageModel extends CoinPackageModelBase implements ICoinPackageModelBase, CashPackage, ShopItemView { public function CoinPackageModel() { super(); } public function getAmount() : int { return getInitParam().amount; } public function getBonusAmount() : int { return getInitParam().bonusAmount; } public function getButtonView() : ShopButton { return new CashPackageButton(object); } } }
package _codec.projects.tanks.client.panel.model.shop.lootboxandpaintkit { 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.shop.lootboxandpaintkit.LootboxAndPaintCC; public class VectorCodecLootboxAndPaintCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecLootboxAndPaintCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(LootboxAndPaintCC,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.<LootboxAndPaintCC> = new Vector.<LootboxAndPaintCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = LootboxAndPaintCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:LootboxAndPaintCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<LootboxAndPaintCC> = Vector.<LootboxAndPaintCC>(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.materials { import alternativa.gfx.agal.VertexShader; public class TrackMaterialVertexShader extends VertexShader { public function TrackMaterialVertexShader(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean, param6:Boolean, param7:Boolean, param8:Boolean, param9:Boolean, param10:Boolean) { super(); mov(vt0,vc[4]); if(param1) { dp4(vt0.x,va0,vc[0]); dp4(vt0.y,va0,vc[1]); dp4(vt0.z,va0,vc[2]); mov(vt1,vc[4]); dp3(vt1.x,va1,vc[14]); dp3(vt1.y,va1,vc[15]); add(vt1.x,vt1.x,vc[14].z); add(vt1.y,vt1.y,vc[15].z); mov(v0,vt1); } else { mov(vt0.xyz,cc.rel(va0.x,0)); mov(vt1,cc.rel(va0.x,1)); mul(v0,vt1,vc[4]); } if(param2 || param3) { mov(v1,vt0); } if(param3) { if(param1) { if(param4) { mul(vt1,va2,vc[11]); nrm(vt1.xyz,vt1.xyz); div(vt1,vt1,vc[11]); } else { mov(vt1,vc[4]); dp3(vt1.x,va2,vc[0]); dp3(vt1.y,va2,vc[1]); dp3(vt1.z,va2,vc[2]); } } else { mov(vt2,vc[4]); mov(vt2.x,cc.rel(va0.x,0).w); mov(vt2.y,cc.rel(va0.x,1).z); mov(vt2.z,cc.rel(va0.x,1).w); if(param4) { mul(vt1,vt2,vc[11]); nrm(vt1.xyz,vt1.xyz); div(vt1,vt1,vc[11]); } else { mov(vt1,vc[4]); dp3(vt1.x,vt2,vc[0]); dp3(vt1.y,vt2,vc[1]); dp3(vt1.z,vt2,vc[2]); } } dp3(vt1.w,vt1,vc[10]); if(param4) { sub(vt1.w,vc[4],vt1); mul(v1.w,vt1,vc[11]); } else { sub(v1.w,vc[4],vt1); } } else if(param5 || param6 || param9 || param10) { mov(vt1,vc[4]); } if(param5) { dp4(v2.x,vt0,vc[6]); dp4(v2.y,vt0,vc[7]); dp4(v2.z,vt0,vc[8]); sub(vt1.w,vt0.z,vc[9].x); div(vt1.w,vt1,vc[9].y); sub(v2.w,vc[4],vt1); } if(param6) { sub(vt1.w,vt0.z,vc[5].z); div(v0.w,vt1,vc[5]); } if(param8) { mov(vt1,vt0); mul(vt1.x,vt1,vc[11].w); mul(vt1.y,vt1,vc[12].w); sub(vt1,vt1,vc[11]); dp3(v0.z,vt1,vc[12]); } if(param7) { mul(vt0.xyz,vt0,vc[11]); } if(param9) { div(vt1.z,vc[3].w,vt0); add(vt1.z,vt1,vc[3]); mul(vt1.z,vt1,vc[3].x); sub(vt1.z,vt1,vc[3].y); div(vt1.z,vt1,vc[3].x); sub(vt1.z,vt1,vc[3]); div(vt1.z,vc[3].w,vt1); mov(vt2,vc[4]); nrm(vt2.xyz,vt0.xyz); sub(vt1.z,vt0,vt1); div(vt1.z,vt1,vt2); mul(vt2,vt2,vt1.z); sub(vt0,vt0,vt2); } if(param10) { mul(vt0.xy,vt0,vc[13]); mul(vt1.xy,vc[13].zw,vt0.z); add(vt0.xy,vt0,vt1); } mov(op.xw,vt0.xz); neg(op.y,vt0); mul(vt0.z,vt0,vc[3]); add(op.z,vt0,vc[3].w); } } }
package alternativa.tanks.models.weapon.artillery { import platform.client.fp10.core.type.IGameObject; [ModelInterface] public interface ArtilleryVariant { function initArtilleryVariant(param1:IGameObject, param2:ArtilleryWeapon, param3:Boolean) : void; } }
package alternativa.tanks.models.inventory { public class InventoryLock { public static const PLAYER_INACTIVE:int = 1; public static const FORCED:int = 2; public static const GUI:int = 4; public static const BOSS_STATE:int = 8; public function InventoryLock() { super(); } } }
package projects.tanks.client.panel.model.shop.specialkit { public class ShopKitText { private var _color:int; private var _size:int; private var _text:String; private var _x:int; private var _y:int; public function ShopKitText(param1:int = 0, param2:int = 0, param3:String = null, param4:int = 0, param5:int = 0) { super(); this._color = param1; this._size = param2; this._text = param3; this._x = param4; this._y = param5; } public function get color() : int { return this._color; } public function set color(param1:int) : void { this._color = param1; } public function get size() : int { return this._size; } public function set size(param1:int) : void { this._size = param1; } public function get text() : String { return this._text; } public function set text(param1:String) : void { this._text = param1; } public function get x() : int { return this._x; } public function set x(param1:int) : void { this._x = param1; } public function get y() : int { return this._y; } public function set y(param1:int) : void { this._y = param1; } public function toString() : String { var local1:String = "ShopKitText ["; local1 += "color = " + this.color + " "; local1 += "size = " + this.size + " "; local1 += "text = " + this.text + " "; local1 += "x = " + this.x + " "; local1 += "y = " + this.y + " "; return local1 + "]"; } } }
package alternativa.tanks.battle { public interface UserTitleRenderer { function renderUserTitles() : void; } }
package alternativa.tanks.service { public interface IExternalEntranceService { function get vkontakteEnabled() : Boolean; function get facebookEnabled() : Boolean; function get googleEnabled() : Boolean; function setEnabled(param1:String, param2:Boolean) : void; } }
package { import flash.display.Sprite; import flash.system.Security; [ExcludeClass] public class _4e89f02ef5e050763ced7fc63e66fe0ec0b097798d471efdb2ad4141a1e57392_flash_display_Sprite extends Sprite { public function _4e89f02ef5e050763ced7fc63e66fe0ec0b097798d471efdb2ad4141a1e57392_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 alternativa.tanks.models.weapon.shared { import alternativa.physics.Body; public interface ConicAreaTargetValidator { function isValidTarget(param1:Body) : Boolean; } }
package _codec.projects.tanks.client.garage.models.item.kit { 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.kit.GarageKitCC; public class VectorCodecGarageKitCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecGarageKitCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(GarageKitCC,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.<GarageKitCC> = new Vector.<GarageKitCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = GarageKitCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:GarageKitCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<GarageKitCC> = Vector.<GarageKitCC>(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.panel.model.garage.availableupgrades { import alternativa.types.Long; import projects.tanks.client.commons.types.ItemViewCategoryEnum; public class AvailableUpgradeItem { private var _available:Boolean; private var _category:ItemViewCategoryEnum; private var _timeToEndUpgradeInSec:Long; public function AvailableUpgradeItem(param1:Boolean = false, param2:ItemViewCategoryEnum = null, param3:Long = null) { super(); this._available = param1; this._category = param2; this._timeToEndUpgradeInSec = param3; } public function get available() : Boolean { return this._available; } public function set available(param1:Boolean) : void { this._available = param1; } public function get category() : ItemViewCategoryEnum { return this._category; } public function set category(param1:ItemViewCategoryEnum) : void { this._category = param1; } public function get timeToEndUpgradeInSec() : Long { return this._timeToEndUpgradeInSec; } public function set timeToEndUpgradeInSec(param1:Long) : void { this._timeToEndUpgradeInSec = param1; } public function toString() : String { var local1:String = "AvailableUpgradeItem ["; local1 += "available = " + this.available + " "; local1 += "category = " + this.category + " "; local1 += "timeToEndUpgradeInSec = " + this.timeToEndUpgradeInSec + " "; return local1 + "]"; } } }
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.shaft { import platform.client.fp10.core.resource.types.MultiframeTextureResource; import platform.client.fp10.core.resource.types.SoundResource; import platform.client.fp10.core.resource.types.TextureResource; import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity; public class ShaftShootSFXCC { private var _explosionSound:SoundResource; private var _explosionTexture:MultiframeTextureResource; private var _hitMarkTexture:TextureResource; private var _lightingSFXEntity:LightingSFXEntity; private var _muzzleFlashTexture:MultiframeTextureResource; private var _shotSound:SoundResource; private var _targetingSound:SoundResource; private var _trailTexture:TextureResource; private var _zoomModeSound:SoundResource; public function ShaftShootSFXCC(param1:SoundResource = null, param2:MultiframeTextureResource = null, param3:TextureResource = null, param4:LightingSFXEntity = null, param5:MultiframeTextureResource = null, param6:SoundResource = null, param7:SoundResource = null, param8:TextureResource = null, param9:SoundResource = null) { super(); this._explosionSound = param1; this._explosionTexture = param2; this._hitMarkTexture = param3; this._lightingSFXEntity = param4; this._muzzleFlashTexture = param5; this._shotSound = param6; this._targetingSound = param7; this._trailTexture = param8; this._zoomModeSound = param9; } public function get explosionSound() : SoundResource { return this._explosionSound; } public function set explosionSound(param1:SoundResource) : void { this._explosionSound = param1; } public function get explosionTexture() : MultiframeTextureResource { return this._explosionTexture; } public function set explosionTexture(param1:MultiframeTextureResource) : void { this._explosionTexture = param1; } public function get hitMarkTexture() : TextureResource { return this._hitMarkTexture; } public function set hitMarkTexture(param1:TextureResource) : void { this._hitMarkTexture = param1; } public function get lightingSFXEntity() : LightingSFXEntity { return this._lightingSFXEntity; } public function set lightingSFXEntity(param1:LightingSFXEntity) : void { this._lightingSFXEntity = param1; } public function get muzzleFlashTexture() : MultiframeTextureResource { return this._muzzleFlashTexture; } public function set muzzleFlashTexture(param1:MultiframeTextureResource) : void { this._muzzleFlashTexture = param1; } public function get shotSound() : SoundResource { return this._shotSound; } public function set shotSound(param1:SoundResource) : void { this._shotSound = param1; } public function get targetingSound() : SoundResource { return this._targetingSound; } public function set targetingSound(param1:SoundResource) : void { this._targetingSound = param1; } public function get trailTexture() : TextureResource { return this._trailTexture; } public function set trailTexture(param1:TextureResource) : void { this._trailTexture = param1; } public function get zoomModeSound() : SoundResource { return this._zoomModeSound; } public function set zoomModeSound(param1:SoundResource) : void { this._zoomModeSound = param1; } public function toString() : String { var local1:String = "ShaftShootSFXCC ["; local1 += "explosionSound = " + this.explosionSound + " "; local1 += "explosionTexture = " + this.explosionTexture + " "; local1 += "hitMarkTexture = " + this.hitMarkTexture + " "; local1 += "lightingSFXEntity = " + this.lightingSFXEntity + " "; local1 += "muzzleFlashTexture = " + this.muzzleFlashTexture + " "; local1 += "shotSound = " + this.shotSound + " "; local1 += "targetingSound = " + this.targetingSound + " "; local1 += "trailTexture = " + this.trailTexture + " "; local1 += "zoomModeSound = " + this.zoomModeSound + " "; return local1 + "]"; } } }
package _codec.projects.tanks.client.achievements.model.panel { 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.achievements.model.panel.AchievementCC; public class VectorCodecAchievementCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecAchievementCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(AchievementCC,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.<AchievementCC> = new Vector.<AchievementCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = AchievementCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:AchievementCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<AchievementCC> = Vector.<AchievementCC>(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 mx.core { import flash.accessibility.AccessibilityProperties; import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.display.IBitmapDrawable; import flash.display.LoaderInfo; import flash.display.Stage; import flash.events.IEventDispatcher; import flash.geom.Point; import flash.geom.Rectangle; import flash.geom.Transform; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get root() : DisplayObject; function get stage() : Stage; function get name() : String; function set name(value:String) : void; function get parent() : DisplayObjectContainer; function get mask() : DisplayObject; function set mask(value:DisplayObject) : void; function get visible() : Boolean; function set visible(value:Boolean) : void; function get x() : Number; function set x(value:Number) : void; function get y() : Number; function set y(value:Number) : void; function get scaleX() : Number; function set scaleX(value:Number) : void; function get scaleY() : Number; function set scaleY(value:Number) : void; function get mouseX() : Number; function get mouseY() : Number; function get rotation() : Number; function set rotation(value:Number) : void; function get alpha() : Number; function set alpha(value:Number) : void; function get width() : Number; function set width(value:Number) : void; function get height() : Number; function set height(value:Number) : void; function get cacheAsBitmap() : Boolean; function set cacheAsBitmap(value:Boolean) : void; function get opaqueBackground() : Object; function set opaqueBackground(value:Object) : void; function get scrollRect() : Rectangle; function set scrollRect(value:Rectangle) : void; function get filters() : Array; function set filters(value:Array) : void; function get blendMode() : String; function set blendMode(value:String) : void; function get transform() : Transform; function set transform(value:Transform) : void; function get scale9Grid() : Rectangle; function set scale9Grid(innerRectangle:Rectangle) : void; function globalToLocal(point:Point) : Point; function localToGlobal(point:Point) : Point; function getBounds(targetCoordinateSpace:DisplayObject) : Rectangle; function getRect(targetCoordinateSpace:DisplayObject) : Rectangle; function get loaderInfo() : LoaderInfo; function hitTestObject(obj:DisplayObject) : Boolean; function hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false) : Boolean; function get accessibilityProperties() : AccessibilityProperties; function set accessibilityProperties(value:AccessibilityProperties) : void; function get measuredHeight() : Number; function get measuredWidth() : Number; function move(x:Number, y:Number) : void; function setActualSize(newWidth:Number, newHeight:Number) : void; } }
package alternativa.tanks.models.tank { import alternativa.types.Long; import platform.client.fp10.core.type.IGameClass; import platform.client.fp10.core.type.IGameObject; import platform.client.fp10.core.type.ISpace; internal class FakeUserObject implements IGameObject { private var _id:Long; public function FakeUserObject() { super(); this._id = Long.getLong(Math.random() * int.MAX_VALUE,Math.random() * int.MAX_VALUE); } [Obfuscation(rename="false")] public function get id() : Long { return this._id; } [Obfuscation(rename="false")] public function get name() : String { return ""; } [Obfuscation(rename="false")] public function get gameClass() : IGameClass { return null; } [Obfuscation(rename="false")] public function get space() : ISpace { return null; } [Obfuscation(rename="false")] public function hasModel(param1:Class) : Boolean { return false; } [Obfuscation(rename="false")] public function adapt(param1:Class) : Object { return null; } [Obfuscation(rename="false")] public function event(param1:Class) : Object { return null; } } }
package assets.button { import flash.display.BitmapData; [Embed(source="/_assets/assets.button.button_OFF_LEFT.png")] public dynamic class button_OFF_LEFT extends BitmapData { public function button_OFF_LEFT(param1:int = 7, param2:int = 30) { super(param1,param2); } } }
package alternativa.engine3d.core { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.materials.Material; import flash.geom.Point; import flash.geom.Vector3D; use namespace alternativa3d; public class Face { alternativa3d static var collector:Face; public var material:Material; public var smoothingGroups:uint = 0; alternativa3d var normalX:Number; alternativa3d var normalY:Number; alternativa3d var normalZ:Number; alternativa3d var offset:Number; alternativa3d var wrapper:Wrapper; alternativa3d var next:Face; alternativa3d var processNext:Face; alternativa3d var processNegative:Face; alternativa3d var processPositive:Face; alternativa3d var distance:Number; alternativa3d var geometry:VG; public var id:Object; public function Face() { super(); } alternativa3d static function create() : Face { var local1:Face = null; if(alternativa3d::collector != null) { local1 = alternativa3d::collector; alternativa3d::collector = local1.alternativa3d::next; local1.alternativa3d::next = null; return local1; } return new Face(); } alternativa3d function create() : Face { var local1:Face = null; if(alternativa3d::collector != null) { local1 = alternativa3d::collector; alternativa3d::collector = local1.alternativa3d::next; local1.alternativa3d::next = null; return local1; } return new Face(); } public function get normal() : Vector3D { var local1:Wrapper = this.alternativa3d::wrapper; var local2:Vertex = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; var local3:Vertex = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; var local4:Vertex = local1.alternativa3d::vertex; var local5:Number = local3.x - local2.x; var local6:Number = local3.y - local2.y; var local7:Number = local3.z - local2.z; var local8:Number = local4.x - local2.x; var local9:Number = local4.y - local2.y; var local10:Number = local4.z - local2.z; var local11:Number = local10 * local6 - local9 * local7; var local12:Number = local8 * local7 - local10 * local5; var local13:Number = local9 * local5 - local8 * local6; var local14:Number = local11 * local11 + local12 * local12 + local13 * local13; if(local14 > 0.001) { local14 = 1 / Math.sqrt(local14); local11 *= local14; local12 *= local14; local13 *= local14; } return new Vector3D(local11,local12,local13,local2.x * local11 + local2.y * local12 + local2.z * local13); } public function get vertices() : Vector.<Vertex> { var local1:Vector.<Vertex> = new Vector.<Vertex>(); var local2:int = 0; var local3:Wrapper = this.alternativa3d::wrapper; while(local3 != null) { local1[local2] = local3.alternativa3d::vertex; local2++; local3 = local3.alternativa3d::next; } return local1; } public function getUV(param1:Vector3D) : Point { var local2:Vertex = this.alternativa3d::wrapper.alternativa3d::vertex; var local3:Vertex = this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::vertex; var local4:Vertex = this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::vertex; var local5:Number = local3.x - local2.x; var local6:Number = local3.y - local2.y; var local7:Number = local3.z - local2.z; var local8:Number = local3.u - local2.u; var local9:Number = local3.v - local2.v; var local10:Number = local4.x - local2.x; var local11:Number = local4.y - local2.y; var local12:Number = local4.z - local2.z; var local13:Number = local4.u - local2.u; var local14:Number = local4.v - local2.v; var local15:Number = -this.alternativa3d::normalX * local11 * local7 + local10 * this.alternativa3d::normalY * local7 + this.alternativa3d::normalX * local6 * local12 - local5 * this.alternativa3d::normalY * local12 - local10 * local6 * this.alternativa3d::normalZ + local5 * local11 * this.alternativa3d::normalZ; var local16:Number = (-this.alternativa3d::normalY * local12 + local11 * this.alternativa3d::normalZ) / local15; var local17:Number = (this.alternativa3d::normalX * local12 - local10 * this.alternativa3d::normalZ) / local15; var local18:Number = (-this.alternativa3d::normalX * local11 + local10 * this.alternativa3d::normalY) / local15; var local19:Number = (local2.x * this.alternativa3d::normalY * local12 - this.alternativa3d::normalX * local2.y * local12 - local2.x * local11 * this.alternativa3d::normalZ + local10 * local2.y * this.alternativa3d::normalZ + this.alternativa3d::normalX * local11 * local2.z - local10 * this.alternativa3d::normalY * local2.z) / local15; var local20:Number = (this.alternativa3d::normalY * local7 - local6 * this.alternativa3d::normalZ) / local15; var local21:Number = (-this.alternativa3d::normalX * local7 + local5 * this.alternativa3d::normalZ) / local15; var local22:Number = (this.alternativa3d::normalX * local6 - local5 * this.alternativa3d::normalY) / local15; var local23:Number = (this.alternativa3d::normalX * local2.y * local7 - local2.x * this.alternativa3d::normalY * local7 + local2.x * local6 * this.alternativa3d::normalZ - local5 * local2.y * this.alternativa3d::normalZ - this.alternativa3d::normalX * local6 * local2.z + local5 * this.alternativa3d::normalY * local2.z) / local15; var local24:Number = local8 * local16 + local13 * local20; var local25:Number = local8 * local17 + local13 * local21; var local26:Number = local8 * local18 + local13 * local22; var local27:Number = local8 * local19 + local13 * local23 + local2.u; var local28:Number = local9 * local16 + local14 * local20; var local29:Number = local9 * local17 + local14 * local21; var local30:Number = local9 * local18 + local14 * local22; var local31:Number = local9 * local19 + local14 * local23 + local2.v; return new Point(local24 * param1.x + local25 * param1.y + local26 * param1.z + local27,local28 * param1.x + local29 * param1.y + local30 * param1.z + local31); } public function toString() : String { return "[Face " + this.id + "]"; } alternativa3d function calculateBestSequenceAndNormal() : void { var local1:Wrapper = null; var local2:Vertex = null; var local3:Vertex = null; var local4:Vertex = null; 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 local13:Number = NaN; var local14:Number = NaN; var local15:Number = NaN; var local16:Wrapper = null; var local17:Wrapper = null; var local18:Wrapper = null; var local19:Wrapper = null; var local20:Wrapper = null; if(this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::next != null) { local15 = -1e+22; local1 = this.alternativa3d::wrapper; while(local1 != null) { local19 = local1.alternativa3d::next != null ? local1.alternativa3d::next : this.alternativa3d::wrapper; local20 = local19.alternativa3d::next != null ? local19.alternativa3d::next : this.alternativa3d::wrapper; local2 = local1.alternativa3d::vertex; local3 = local19.alternativa3d::vertex; local4 = local20.alternativa3d::vertex; local5 = local3.x - local2.x; local6 = local3.y - local2.y; local7 = local3.z - local2.z; local8 = local4.x - local2.x; local9 = local4.y - local2.y; local10 = local4.z - local2.z; local11 = local10 * local6 - local9 * local7; local12 = local8 * local7 - local10 * local5; local13 = local9 * local5 - local8 * local6; local14 = local11 * local11 + local12 * local12 + local13 * local13; if(local14 > local15) { local15 = local14; local16 = local1; } local1 = local1.alternativa3d::next; } if(local16 != this.alternativa3d::wrapper) { local17 = this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::next; while(local17.alternativa3d::next != null) { local17 = local17.alternativa3d::next; } local18 = this.alternativa3d::wrapper; while(local18.alternativa3d::next != local16 && local18.alternativa3d::next != null) { local18 = local18.alternativa3d::next; } local17.alternativa3d::next = this.alternativa3d::wrapper; local18.alternativa3d::next = null; this.alternativa3d::wrapper = local16; } } local1 = this.alternativa3d::wrapper; local2 = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; local3 = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; local4 = local1.alternativa3d::vertex; local5 = local3.x - local2.x; local6 = local3.y - local2.y; local7 = local3.z - local2.z; local8 = local4.x - local2.x; local9 = local4.y - local2.y; local10 = local4.z - local2.z; local11 = local10 * local6 - local9 * local7; local12 = local8 * local7 - local10 * local5; local13 = local9 * local5 - local8 * local6; local14 = local11 * local11 + local12 * local12 + local13 * local13; if(local14 > 0) { local14 = 1 / Math.sqrt(local14); local11 *= local14; local12 *= local14; local13 *= local14; this.alternativa3d::normalX = local11; this.alternativa3d::normalY = local12; this.alternativa3d::normalZ = local13; } this.alternativa3d::offset = local2.x * local11 + local2.y * local12 + local2.z * local13; } } }
package projects.tanks.client.battleservice.model.battle.dm { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class BattleDMModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:BattleDMModelServer; private var client:IBattleDMModelBase = IBattleDMModelBase(this); private var modelId:Long = Long.getLong(759725658,1071543601); public function BattleDMModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new BattleDMModelServer(IModel(this)); } 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 alternativa.tanks.models.battle.meteor { public class MeteorState { public static var INIT:MeteorState = new MeteorState(0); public static var FALLING:MeteorState = new MeteorState(1); public static var DISAPPEARING:MeteorState = new MeteorState(2); public static var EXPLOSION:MeteorState = new MeteorState(3); private var _stateId:int; public function MeteorState(param1:int) { super(); this._stateId = param1; } public function get stateId() : int { return this._stateId; } } }
package alternativa.tanks.models.weapon.healing { import alternativa.init.Main; import alternativa.math.Vector3; import alternativa.model.IModel; import alternativa.object.ClientObject; import alternativa.osgi.service.dump.IDumpService; import alternativa.osgi.service.dump.dumper.IDumper; import alternativa.physics.altphysics; import alternativa.register.ObjectRegister; import alternativa.service.IModelService; import alternativa.tanks.models.battlefield.BattlefieldData; import alternativa.tanks.models.battlefield.IBattleField; import alternativa.tanks.models.sfx.healing.HealingGunSFXModel; import alternativa.tanks.models.tank.ITank; import alternativa.tanks.models.tank.ITankEventDispatcher; import alternativa.tanks.models.tank.ITankEventListener; import alternativa.tanks.models.tank.TankData; import alternativa.tanks.models.tank.TankEvent; import alternativa.tanks.models.tank.TankModel; import alternativa.tanks.models.weapon.IWeaponController; import alternativa.tanks.models.weapon.WeaponUtils; import alternativa.tanks.models.weapon.common.IWeaponCommonModel; import alternativa.tanks.models.weapon.common.WeaponCommonData; import alternativa.tanks.physics.TanksCollisionDetector; import com.alternativaplatform.projects.tanks.client.commons.types.Vector3d; import com.alternativaplatform.projects.tanks.client.warfare.models.sfx.healing.IHealingSFXModelBase; import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing.HealingGunModelBase; import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing.IHealingGunModelBase; import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing.IsisActionType; import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing.struct.IsisAction; import com.reygazu.anticheat.variables.SecureInt; import projects.tanks.client.battleservice.model.team.BattleTeamType; import scpacker.networking.INetworker; import scpacker.networking.Network; import scpacker.tanks.WeaponsManager; use namespace altphysics; public class HealingGunModel extends HealingGunModelBase implements IHealingGunModelBase, IWeaponController, ITankEventListener, IDumper { private var modelService:IModelService; private var bfInterface:IBattleField; private var tankInterface:TankModel; private var weaponCommonInterface:IWeaponCommonModel; private var sfxModel:HealingGunSFXModel; private var currTarget:TankData; private var targetSystem:HealingGunTargetSystem; private var weaponUtils:WeaponUtils; private var active:Boolean; private var localTankData:TankData; private var localCommonData:WeaponCommonData; private var localGunData:HealingGunData; private var currentCharge:Number = 0; private var nextTickTime:SecureInt; private var lastUpdateTime:SecureInt; private var hitPointsTargets:Array; private var muzzlePosGlobal:Vector3; private var barrelOrigin:Vector3; private var axisX:Vector3; private var axisY:Vector3; private var vec:Vector3; private var pos3d:Vector3d; public function HealingGunModel() { this.targetSystem = new HealingGunTargetSystem(); this.weaponUtils = new WeaponUtils(); this.nextTickTime = new SecureInt("nextTickTime isida",0); this.lastUpdateTime = new SecureInt("lastUpdateTime isida",0); this.hitPointsTargets = []; this.muzzlePosGlobal = new Vector3(); this.barrelOrigin = new Vector3(); this.axisX = new Vector3(); this.axisY = new Vector3(); this.vec = new Vector3(); this.pos3d = new Vector3d(0,0,0); super(); _interfaces.push(IModel,IHealingGunModelBase,IWeaponController); } public function initObject(clientObject:ClientObject, angle:Number, capacity:int, chargeRate:int, checkPeriodMsec:int, coneAngle:Number, dischargeRate:int, radius:Number) : void { var tankDispatcher:ITankEventDispatcher = null; WeaponsManager.getIsidaSFX(clientObject); if(this.modelService == null) { this.modelService = Main.osgi.getService(IModelService) as IModelService; this.bfInterface = this.modelService.getModelsByInterface(IBattleField)[0] as IBattleField; this.tankInterface = Main.osgi.getService(ITank) as TankModel; this.weaponCommonInterface = this.modelService.getModelsByInterface(IWeaponCommonModel)[0] as IWeaponCommonModel; this.sfxModel = Main.osgi.getService(IHealingSFXModelBase) as HealingGunSFXModel; tankDispatcher = ITankEventDispatcher(Main.osgi.getService(ITankEventDispatcher)); tankDispatcher.addTankEventListener(TankEvent.KILLED,this); tankDispatcher.addTankEventListener(TankEvent.UNLOADED,this); } var data:HealingGunData = new HealingGunData(); data.capacity.value = capacity; data.tickPeriod.value = checkPeriodMsec; data.lockAngle.value = coneAngle; data.lockAngleCos.value = Math.cos(coneAngle); data.maxRadius.value = radius * 100; data.maxAngle.value = angle; data.maxAngleCos.value = Math.cos(angle); data.dischargeRate.value = dischargeRate; data.chargeRate.value = chargeRate; clientObject.putParams(HealingGunModel,data); } public function init(clientObject:ClientObject, isisActions:Array) : void { var isisAction:IsisAction = null; var shooterData:TankData = null; var targetData:TankData = null; var objectRegister:ObjectRegister = clientObject.register; var len:int = isisActions.length; for(var i:int = 0; i < len; i++) { isisAction = isisActions[i]; shooterData = this.getTankData(objectRegister,isisAction.shooterId); if(shooterData != null) { if(isisAction.type == IsisActionType.IDLE) { this.sfxModel.createOrUpdateEffects(shooterData,isisAction.type,null); } else { targetData = this.getTankData(objectRegister,isisAction.targetId); if(targetData != null) { this.sfxModel.createOrUpdateEffects(shooterData,isisAction.type,targetData); } } } } } public function startWeapon(clientObject:ClientObject, isisAction:IsisAction) : void { var targetData:TankData = null; var objectRegister:ObjectRegister = clientObject.register; var shooterData:TankData = this.getTankData(objectRegister,isisAction.shooterId); if(shooterData == null || !shooterData.enabled) { return; } if(this.tankInterface.localUserData != null) { if(shooterData == this.tankInterface.localUserData) { return; } } if(isisAction.type == IsisActionType.IDLE) { this.sfxModel.createOrUpdateEffects(shooterData,isisAction.type,null); } else { targetData = this.getTankData(objectRegister,isisAction.targetId); if(targetData == null || !targetData.enabled) { return; } this.sfxModel.createOrUpdateEffects(shooterData,isisAction.type,targetData); } } public function stopWeapon(clientObject:ClientObject, healerId:String) : void { var ownerTankData:TankData = this.getTankData(clientObject.register,healerId); if(this.tankInterface.localUserData != null) { if(ownerTankData == this.tankInterface.localUserData) { return; } } if(ownerTankData != null) { this.sfxModel.destroyEffectsByOwner(ownerTankData); } } public function stopEffects(ownerTankData:TankData) : void { this.sfxModel.destroyEffectsByOwner(ownerTankData); } public function reset() : void { this.currTarget = null; this.nextTickTime.value = int.MAX_VALUE; this.currentCharge = this.localGunData == null ? Number(0) : Number(this.localGunData.capacity.value); } public function setLocalUser(localUserData:TankData) : void { var dumpService:IDumpService = IDumpService(Main.osgi.getService(IDumpService)); if(dumpService != null) { dumpService.registerDumper(this); } this.localTankData = localUserData; this.localGunData = this.getHealingData(localUserData.turret); this.localCommonData = this.weaponCommonInterface.getCommonData(localUserData.turret); this.currentCharge = this.localGunData.capacity.value; this.active = false; this.currTarget = null; } public function clearLocalUser() : void { var dumpService:IDumpService = IDumpService(Main.osgi.getService(IDumpService)); if(dumpService != null) { dumpService.unregisterDumper(this.dumperName); } this.localTankData = null; this.localGunData = null; this.localCommonData = null; this.active = false; this.currTarget = null; } public function activateWeapon(time:int) : void { if(this.active) { return; } this.active = true; this.lastUpdateTime.value = time; this.nextTickTime.value = time + this.localGunData.tickPeriod.value; this.currTarget = this.lockTarget(this.localCommonData,this.localTankData); if(this.currTarget == null) { this.sfxModel.createOrUpdateEffects(this.localTankData,IsisActionType.IDLE,null); this.startWeaponCommand(this.localTankData.turret,0,null); } else { this.startActiveMode(this.localTankData,this.currTarget); } } public function deactivateWeapon(time:int, sendServerCommand:Boolean) : void { if(!this.active) { return; } this.active = false; this.currTarget = null; this.lastUpdateTime.value = time; this.sfxModel.destroyEffectsByOwner(this.localTankData); if(sendServerCommand) { this.stopWeaponCommand(this.localTankData.turret); } } private function stopWeaponCommand(turr:ClientObject) : void { Network(Main.osgi.getService(INetworker)).send("battle;stop_fire"); } public function update(time:int, deltaTime:int) : Number { var targetPos:Vector3 = null; if(this.active) { if(this.currentCharge == 0) { this.deactivateWeapon(time,true); } else { if(this.currTarget == null) { this.currTarget = this.lockTarget(this.localCommonData,this.localTankData); if(this.currTarget != null) { this.startActiveMode(this.localTankData,this.currTarget); } } else if(!this.validateTarget()) { this.currTarget = null; this.sfxModel.createOrUpdateEffects(this.localTankData,IsisActionType.IDLE,null); this.startWeaponCommand(this.localTankData.turret,0,null); } if(time >= this.nextTickTime.value) { this.nextTickTime.value += this.localGunData.tickPeriod.value; if(this.currTarget != null) { targetPos = this.currTarget.tank.state.pos; this.pos3d.x = targetPos.x; this.pos3d.y = targetPos.y; this.pos3d.z = targetPos.z; this.vec.vDiff(targetPos,this.localTankData.tank.state.pos); this.actCommand(this.localTankData.turret,this.currTarget.incarnation,this.currTarget.user.id,this.pos3d,this.vec.vLength()); } else { this.actCommand(this.localTankData.turret,0,null,null,0); } } this.currentCharge -= 0.001 * (time - this.lastUpdateTime.value) * this.localGunData.dischargeRate.value; if(this.currentCharge < 0) { this.currentCharge = 0; } this.lastUpdateTime.value = time; } } else if(this.currentCharge < this.localGunData.capacity.value) { this.currentCharge += 0.001 * (time - this.lastUpdateTime.value) * this.localGunData.chargeRate.value; if(this.currentCharge > this.localGunData.capacity.value) { this.currentCharge = this.localGunData.capacity.value; } this.lastUpdateTime.value = time; } return this.currentCharge / this.localGunData.capacity.value; } private function actCommand(turret:ClientObject, victimInc:int, victimId:String, pos3d:Vector3d, vLength:int) : void { var obj:Object = new Object(); obj.victimId = victimId; obj.distance = this.localGunData.maxRadius.value; obj.tickPeriod = this.localGunData.tickPeriod.value; Network(Main.osgi.getService(INetworker)).send("battle;fire;" + JSON.stringify(obj)); } public function handleTankEvent(eventType:int, tankData:TankData) : void { if(eventType == TankEvent.KILLED || eventType == TankEvent.UNLOADED) { this.sfxModel.destroyEffectsByOwner(tankData); if(tankData == this.currTarget) { this.currTarget = null; this.sfxModel.createOrUpdateEffects(this.localTankData,IsisActionType.IDLE,null); this.startWeaponCommand(this.localTankData.turret,0,null); } else { this.sfxModel.destroyEffectsByTarget(tankData); } } } public function get dumperName() : String { return "healgun"; } public function dump(params:Vector.<String>) : String { return "=== HealingGunModel dump ===\n" + "active=" + this.active + "\n" + "currentCharge=" + this.currentCharge + "\n" + "currTarget=" + this.currTarget + "\n" + "nextTickTime=" + this.nextTickTime + "\n" + "=== end of HealingGunModel dump ==="; } private function getHealingData(clientObject:ClientObject) : HealingGunData { return HealingGunData(clientObject.getParams(HealingGunModel)); } private function lockTarget(commonData:WeaponCommonData, weaponOwnerData:TankData) : TankData { var v:Vector3 = commonData.muzzles[0]; this.weaponUtils.calculateGunParams(weaponOwnerData.tank.skin.turretMesh,v,this.muzzlePosGlobal,this.barrelOrigin,this.axisX,this.axisY); var bfData:BattlefieldData = this.bfInterface.getBattlefieldData(); return this.targetSystem.getTarget(weaponOwnerData,this.localGunData,v.y,this.barrelOrigin,this.axisY,this.axisX,5,6,TanksCollisionDetector(bfData.physicsScene.collisionDetector),bfData.tanks); } private function validateTarget() : Boolean { var v:Vector3 = this.localCommonData.muzzles[0]; this.weaponUtils.calculateGunParams(this.localTankData.tank.skin.turretMesh,v,this.muzzlePosGlobal,this.barrelOrigin,this.axisX,this.axisY); var bfData:BattlefieldData = this.bfInterface.getBattlefieldData(); return this.targetSystem.validateTarget(this.localTankData,this.currTarget,this.localGunData,this.axisY,this.barrelOrigin,v.y,bfData.collisionDetector); } private function startActiveMode(shooterData:TankData, targetData:TankData) : void { var mode:IsisActionType = this.getEffectsMode(shooterData,targetData); this.sfxModel.createOrUpdateEffects(shooterData,mode,targetData); this.startWeaponCommand(shooterData.turret,targetData.incarnation,targetData.user.id); } private function startWeaponCommand(turrObj:ClientObject, incId:int, victimId:String) : void { var js:Object = new Object(); js.incId = incId; js.victimId = victimId; Network(Main.osgi.getService(INetworker)).send("battle;start_fire;" + JSON.stringify(js)); } private function getTankData(objectRegister:ObjectRegister, userId:String) : TankData { var userObject:ClientObject = BattleController.activeTanks[userId]; if(userObject == null) { return null; } var tankData:TankData = this.tankInterface.getTankData(userObject); if(tankData == null || tankData.tank == null) { return null; } return tankData; } private function isEnemyTarget(ownerData:TankData, targetData:TankData) : Boolean { return ownerData.teamType == BattleTeamType.NONE || ownerData.teamType != targetData.teamType; } private function getEffectsMode(ownerData:TankData, targetData:TankData) : IsisActionType { var isEnemy:Boolean = this.isEnemyTarget(ownerData,targetData); return !!isEnemy ? IsisActionType.DAMAGE : IsisActionType.HEAL; } } } import alternativa.types.Long; class InitData { public var shooters:Vector.<Long>; public var targets:Vector.<Long>; function InitData() { this.shooters = new Vector.<Long>(); this.targets = new Vector.<Long>(); super(); } }
package alternativa.tanks.gui { import alternativa.tanks.gui.upgrade.UpgradeColors; import alternativa.tanks.model.item.upgradable.UpgradableItemParams; import alternativa.tanks.model.item.upgradable.UpgradableItemPropertyValue; import assets.Diamond; import controls.base.LabelBase; import flash.display.Sprite; import flash.text.TextFormatAlign; import forms.ranks.SmallRankIcon; import utils.FontParamsUtil; public class ModInfoRow extends Sprite { private static const RANK_WIDTH:int = 13; public const h:int = 17; public const hSpace:int = 10; public var labels:Vector.<LabelBase>; public var costLabel:LabelBase; public var crystalIcon:Diamond; public var rankIcon:SmallRankIcon; public var upgradeIndicator:UpgradeIndicator; public var costWidth:int; private var numberProperties:int = 0; private var _width:int; public function ModInfoRow(param1:int, param2:int) { var local4:LabelBase = null; super(); this._width = param2; this.labels = new Vector.<LabelBase>(8); var local3:int = 0; while(local3 < 8) { local4 = new LabelBase(); local4.color = 16777215; local4.align = TextFormatAlign.CENTER; local4.text = "ABC123"; addChild(local4); this.labels[local3] = local4; local4.y = this.h - local4.height >> 1; local3++; } this.costLabel = new LabelBase(); this.costLabel.color = 16777215; this.costLabel.align = TextFormatAlign.RIGHT; this.costLabel.text = "ABC123"; addChild(this.costLabel); this.costLabel.y = this.h - this.costLabel.height >> 1; this.crystalIcon = new Diamond(); addChild(this.crystalIcon); this.crystalIcon.y = this.h - this.crystalIcon.height >> 1; this.rankIcon = new SmallRankIcon(); addChild(this.rankIcon); this.rankIcon.y = (this.h - this.rankIcon.height >> 1) + 1; this.upgradeIndicator = new UpgradeIndicator(param1); addChild(this.upgradeIndicator); this.upgradeIndicator.y = (this.h - this.upgradeIndicator.height >> 1) + 1; } public function select() : void { var local2:LabelBase = null; var local1:int = 0; while(local1 < 8) { local2 = this.labels[local1] as LabelBase; local2.color = 16777215; local2.sharpness = -100; local2.thickness = 100; local1++; } this.costLabel.sharpness = -100; this.costLabel.thickness = 100; } public function unselect() : void { var local2:LabelBase = null; var local1:int = 0; while(local1 < 8) { local2 = this.labels[local1] as LabelBase; local2.color = 16777215; local2.sharpness = FontParamsUtil.SHARPNESS_LABEL_BASE; local2.thickness = FontParamsUtil.THICKNESS_LABEL_BASE; local1++; } this.costLabel.color = 16777215; this.costLabel.sharpness = FontParamsUtil.SHARPNESS_LABEL_BASE; this.costLabel.thickness = FontParamsUtil.THICKNESS_LABEL_BASE; } public function setLabelsNum(param1:int) : void { this.numberProperties = param1; var local2:int = 0; while(local2 < this.labels.length) { this.labels[local2].visible = local2 < param1; local2++; } } public function setLabelsText(param1:UpgradableItemParams, param2:Vector.<UpgradableItemPropertyValue>) : void { var local4:UpgradableItemPropertyValue = null; var local5:LabelBase = null; var local3:int = 0; while(local3 < param2.length) { local4 = param2[local3]; local5 = this.labels[local3]; local5.text = local4.getValue(param1.getLevel()); local5.color = UpgradeColors.getColor(param1,local4); local3++; } } public function updatePositions() : void { var local4:LabelBase = null; this.crystalIcon.x = this._width - this.crystalIcon.width - this.hSpace; this.costLabel.x = this.crystalIcon.x - 3 - this.costLabel.width; var local1:Number = this.crystalIcon.x - 3 - this.costWidth; this.rankIcon.x = local1 - this.hSpace - RANK_WIDTH; this.upgradeIndicator.x = this.rankIcon.x - this.upgradeIndicator.width - this.hSpace; var local2:Number = (this.upgradeIndicator.x - 2 * this.hSpace) / this.numberProperties; var local3:int = 0; while(local3 < this.numberProperties) { local4 = this.labels[local3]; local4.x = Math.round(this.hSpace + local2 * local3 + (local2 - local4.width) / 2); local3++; } } public function getPositions() : Vector.<Number> { var local3:LabelBase = null; var local1:Vector.<Number> = new Vector.<Number>(this.numberProperties,true); var local2:int = 0; while(local2 < this.numberProperties) { local3 = this.labels[local2]; local1[local2] = local3.x + local3.width * 0.5; local2++; } return local1; } } }
package alternativa.tanks.loader { import alternativa.init.TanksServicesActivator; import alternativa.osgi.OSGi; import alternativa.osgi.service.display.IDisplay; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.loader.stylishdishonestprogressbar.StylishDishonestProgressBar; import controls.Label; import flash.display.Bitmap; import flash.display.DisplayObjectContainer; import flash.display.Sprite; import flash.display.Stage; import flash.events.Event; import flash.events.KeyboardEvent; import flash.events.TimerEvent; import flash.filters.DropShadowFilter; import flash.utils.Timer; import flash.utils.setTimeout; public class LoaderWindow extends Sprite implements ILoaderWindowService { private static const backFade:Class = LoaderWindow_backFade; private static const back:Class = LoaderWindow_back; private static const bg:Class = LoaderWindow_bg; private static const NEXT_TIP_DELAY:int = 10000; private static const _backBitmapPadding:int = 60; private static const ENTER_KEY_CODE:int = 32; private var _backFadeBitmap:Bitmap; private var _backBitmap:Bitmap; private var _bgBitmap:Bitmap; private var layer:DisplayObjectContainer; private var _tipLabel:Label = new Label(); private var _titleLabel:Label = new Label(); private var _stage:Stage; private var _nextTipTimer:Timer; private var _tips:Array = []; private var _currentTip:int = 0; private var _dishonestProgressBar:StylishDishonestProgressBar; private var _localeService:ILocaleService; private var _hideRequested:Boolean; public function LoaderWindow() { super(); this._localeService = OSGi.getInstance().getService(ILocaleService) as ILocaleService; this._tips = this._localeService.getTextWithPrefix("TIP_").sort(randomize); var local1:IDisplay = IDisplay(TanksServicesActivator.osgi.getService(IDisplay)); this.layer = local1.loaderLayer; this._stage = local1.stage; this._stage.addEventListener(Event.RESIZE,this.onResize); this._bgBitmap = new bg(); addChild(this._bgBitmap); this._backFadeBitmap = new backFade(); addChild(this._backFadeBitmap); this._backBitmap = new back(); addChild(this._backBitmap); this._dishonestProgressBar = new StylishDishonestProgressBar(this.progressBarFinished); addChild(this._dishonestProgressBar); addChild(this._tipLabel); addChild(this._titleLabel); this._nextTipTimer = new Timer(NEXT_TIP_DELAY); this._nextTipTimer.addEventListener(TimerEvent.TIMER,this.onNextTipTimerComplete); } private static function randomize(param1:*, param2:*) : int { return Math.random() > 0.5 ? 1 : -1; } private function progressBarFinished() : void { if(this._stage.contains(this)) { this._stage.removeChild(this); } } private function onNextTipTimerComplete(param1:TimerEvent = null) : void { this.changeTip(); this.align(); } public function show() : void { this._hideRequested = false; if(!this._stage.contains(this)) { this._dishonestProgressBar.start(); this._stage.addChild(this); this._stage.addEventListener(Event.RESIZE,this.align); this._stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyPressed); this.align(); this._nextTipTimer.start(); this.onNextTipTimerComplete(); } } public function showDelayed(param1:int) : void { this._hideRequested = false; setTimeout(this.showDelayedAfterTimeout,param1); } private function showDelayedAfterTimeout() : void { if(!this._hideRequested) { this.show(); this._hideRequested = false; } } private function changeTip() : void { ++this._currentTip; this._tipLabel.text = this._tips[this._currentTip % this._tips.length]; } private function onKeyPressed(param1:KeyboardEvent) : void { if(param1.keyCode == ENTER_KEY_CODE) { this.changeTip(); } } private function onResize(param1:Event = null) : void { this.align(); } private function align(param1:Event = null) : void { this._bgBitmap.x = 0; this._bgBitmap.y = 0; this._bgBitmap.width = this._stage.stageWidth; this._bgBitmap.height = this._stage.stageHeight; this._backFadeBitmap.width = this._stage.stageWidth; this._backFadeBitmap.height = 320; this._backFadeBitmap.x = 0; this._backFadeBitmap.y = this._stage.stageHeight - this._backFadeBitmap.height; this._backBitmap.width = this._stage.stageWidth; this._backBitmap.height = 102; this._backBitmap.x = 0; this._backBitmap.y = this._stage.stageHeight - this._backBitmap.height - _backBitmapPadding; this._dishonestProgressBar.x = 0; this._dishonestProgressBar.y = this._stage.stageHeight - (this._dishonestProgressBar.height >>> 1) - (this._backFadeBitmap.height >>> 1); this._tipLabel.size = 16; this._tipLabel.align = "center"; this._tipLabel.multiline = true; this._tipLabel.wordWrap = true; this._tipLabel.width = 590; this._tipLabel.x = (this._stage.stageWidth >>> 1) - (this._tipLabel.width >>> 1); this._tipLabel.y = this._backBitmap.y + (this._backBitmap.height >>> 1) - (this._tipLabel.height >>> 1); this._tipLabel.filters = [new DropShadowFilter()]; this._titleLabel.size = 20; this._titleLabel.align = "center"; this._titleLabel.text = this._localeService.getText("LOADER_HEADER").toUpperCase(); this._titleLabel.bold = true; this._titleLabel.x = this._stage.stageWidth / 2 - (this._titleLabel.width >>> 1); this._titleLabel.y = this._stage.stageHeight - this._backBitmap.height - 100; this._titleLabel.filters = [new DropShadowFilter()]; } public function hide() : void { this._hideRequested = true; if(this._stage.contains(this)) { this._nextTipTimer.stop(); this._dishonestProgressBar.forciblyFinish(); this._stage.removeEventListener(Event.RESIZE,this.onResize); this._stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyPressed); this._stage.removeChild(this); } } public function hideForcibly() : void { this._hideRequested = true; if(this._stage.contains(this)) { this._nextTipTimer.stop(); this._dishonestProgressBar.forciblyStop(); this._stage.removeEventListener(Event.RESIZE,this.onResize); this._stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyPressed); this._stage.removeChild(this); } } public function isInProgress() : Boolean { return this._nextTipTimer.running; } } }
package projects.tanks.client.battlefield.models.tankparts.gearscore { public interface IBattleGearScoreModelBase { function setGearScore(param1:int) : void; } }
package projects.tanks.clients.flash.commons.services.notification.sound { import flash.media.Sound; public interface INotificationSoundService { function set notificationSound(param1:Sound) : void; function playNotificationSound() : void; } }
package alternativa.tanks.models.weapon.rotation { import alternativa.tanks.models.weapon.angles.verticals.VerticalAngles; import projects.tanks.client.battlefield.models.tankparts.weapons.artillery.IWeaponRotationLimitModelBase; import projects.tanks.client.battlefield.models.tankparts.weapons.artillery.WeaponRotationLimitModelBase; [ModelInfo] public class WeaponRotationLimitModel extends WeaponRotationLimitModelBase implements IWeaponRotationLimitModelBase, WeaponRotationLimit { public function WeaponRotationLimitModel() { super(); } public function getMaxAngle() : Number { return this.verticalAngles().getAngleDown(); } public function getMinAngle() : Number { return -this.verticalAngles().getAngleUp(); } private function verticalAngles() : VerticalAngles { return VerticalAngles(object.adapt(VerticalAngles)); } } }
package alternativa.tanks.model.garage.passtoshop { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class PassToShopServiceEvents implements PassToShopService { private var object:IGameObject; private var impl:Vector.<Object>; public function PassToShopServiceEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function isPassToShopEnabled() : Boolean { var result:Boolean = false; var i:int = 0; var m:PassToShopService = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = PassToShopService(this.impl[i]); result = Boolean(m.isPassToShopEnabled()); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.service { import alternativa.resource.IResource; import alternativa.resource.factory.IResourceFactory; import alternativa.types.Long; import flash.utils.Dictionary; public interface IResourceService { function registerResource(param1:IResource) : void; function unregisterResource(param1:Long) : void; function getResource(param1:Long) : IResource; function registerResourceFactory(param1:IResourceFactory, param2:int) : void; function unregisterResourceFactory(param1:Array) : void; function getResourceFactory(param1:int) : IResourceFactory; function get resourcesList() : Vector.<IResource>; function setResourceStatus(param1:Long, param2:int, param3:String, param4:String, param5:String) : void; function get batchLoadingHistory() : Array; function get resourceLoadingHistory() : Dictionary; function get resourceStatus() : Dictionary; } }
package alternativa.tanks.models.battle.facilities { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.objects.Mesh; import alternativa.math.Vector3; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.BattleUtils; import alternativa.tanks.materials.PaintMaterial; import flash.display.BitmapData; import flash.geom.Vector3D; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectUnloadListener; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity.CommonFacilityCC; import projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity.CommonFacilityModelBase; import projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity.ICommonFacilityModelBase; import projects.tanks.client.battlefield.types.Vector3d; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.clients.flash.commons.models.coloring.IColoring; [ModelInfo] public class CommonFacilityModel extends CommonFacilityModelBase implements ICommonFacilityModelBase, ObjectLoadListener, ObjectUnloadListener, ICommonFacility { [Inject] public static var battleService:BattleService; private static const LIGHTMAP_TEXTURE_NAME:String = "lightmap.jpg"; public function CommonFacilityModel() { super(); } public function objectLoaded() : void { var local1:CommonFacilityCC = getInitParam(); var local2:Object3D = this.createVisual(local1); BattleUtils.setObjectPosition3d(local2,local1.position); BattleUtils.setObjectRotation3d(local2,local1.rotation); putData(CommonFacilityData,new CommonFacilityData(local2)); battleService.getBattleScene3D().addObject(local2); this.battleFacilities().register(object); } private function createVisual(param1:CommonFacilityCC) : Object3D { var local3:Mesh = null; var local2:Mesh = param1.facilityObject.objects[0] as Mesh; local3 = local2.clone() as Mesh; var local4:BitmapData = param1.facilityObject.textures[LIGHTMAP_TEXTURE_NAME]; var local5:IColoring = IColoring(object.adapt(IColoring)); var local6:PaintMaterial = FacilityMaterialFactory.createMaterial(local4,param1.facilityTexture.data,local5); local3.setMaterialToAllFaces(local6); local3.useShadowMap = param1.useShadows; local3.useLight = param1.useLight; return local3; } private function battleFacilities() : BattleFacilities { return BattleFacilities(object.space.rootObject.adapt(BattleFacilities)); } public function markAsDispelled() : void { this.getFacilityData().isDispelled = true; } private function getFacilityData() : CommonFacilityData { return CommonFacilityData(getData(CommonFacilityData)); } public function objectUnloaded() : void { this.battleFacilities().unregister(object); var local1:CommonFacilityData = this.getFacilityData(); battleService.getBattleScene3D().removeObject(local1.object3d); if(local1.isDispelled) { this.facilityDispellEffects().createDispellEffects(this.getPosition()); } } private function facilityDispellEffects() : FacilityDispellEffect { return FacilityDispellEffect(object.event(FacilityDispellEffect)); } public function getPosition() : Vector3 { var local1:Object3D = this.getFacilityData().object3d; return new Vector3(local1.x,local1.y,local1.z); } public function getCenter() : Vector3 { return this.toVector3(this.getFacilityData().object3d.localToGlobal(this.toVector3D(getInitParam().localCenter))); } public function getTeam() : BattleTeam { return getInitParam().facilityTeam; } public function getOwner() : IGameObject { return object.space.getObject(getInitParam().ownerId); } private function toVector3D(param1:Vector3d) : Vector3D { return new Vector3D(param1.x,param1.y,param1.z); } private function toVector3(param1:Vector3D) : Vector3 { return new Vector3(param1.x,param1.y,param1.z); } } }
package alternativa.tanks.help { import alternativa.osgi.OSGi; import alternativa.osgi.service.locale.ILocaleService; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign; public class FriendsHelper extends PanelBubbleHelper { public function FriendsHelper(param1:Number, param2:Number, param3:Number) { super(param1,param2,param3); var local4:ILocaleService = ILocaleService(OSGi.getInstance().getService(ILocaleService)); text = local4.getText(TanksLocale.TEXT_FRIENDS_MENU); arrowLehgth = int(local4.getText(TanksLocale.TEXT_FRIENDS_MENU_ARROW_LENGTH)); arrowAlign = HelperAlign.TOP_CENTER; } } }
package alternativa.tanks.models.tank { import alternativa.osgi.OSGi; import alternativa.tanks.models.battle.battlefield.BattleUserInfoService; import flash.utils.Dictionary; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.types.Vector3d; public class OverridenTankPositions { private const positions:Object = {}; private var tanksInBattle:Dictionary; public function OverridenTankPositions(param1:Dictionary) { super(); this.tanksInBattle = param1; } public function getPosition(param1:IGameObject, param2:Vector3d) : Vector3d { var local3:BattleUserInfoService = BattleUserInfoService(OSGi.getInstance().getService(BattleUserInfoService)); return this.positions[local3.getUserName(param1.id)] || param2; } } }
package projects.tanks.client.panel.model.socialnetwork { 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 SocialNetworkPanelModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:SocialNetworkPanelModelServer; private var client:ISocialNetworkPanelModelBase = ISocialNetworkPanelModelBase(this); private var modelId:Long = Long.getLong(439695750,646961384); private var _linkAlreadyExistsId:Long = Long.getLong(964446817,-340367443); private var _linkAlreadyExists_socialNetworkIdCodec:ICodec; private var _linkCreatedId:Long = Long.getLong(455315457,289812863); private var _linkCreated_socialNetworkIdCodec:ICodec; private var _unlinkSuccessId:Long = Long.getLong(2086735179,-395191971); private var _unlinkSuccess_socialNetworkIdCodec:ICodec; private var _validationFailedId:Long = Long.getLong(1997552645,-744590077); public function SocialNetworkPanelModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new SocialNetworkPanelModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(SocialNetworkPanelCC,false))); this._linkAlreadyExists_socialNetworkIdCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._linkCreated_socialNetworkIdCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._unlinkSuccess_socialNetworkIdCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); } protected function getInitParam() : SocialNetworkPanelCC { return SocialNetworkPanelCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._linkAlreadyExistsId: this.client.linkAlreadyExists(String(this._linkAlreadyExists_socialNetworkIdCodec.decode(param2))); break; case this._linkCreatedId: this.client.linkCreated(String(this._linkCreated_socialNetworkIdCodec.decode(param2))); break; case this._unlinkSuccessId: this.client.unlinkSuccess(String(this._unlinkSuccess_socialNetworkIdCodec.decode(param2))); break; case this._validationFailedId: this.client.validationFailed(); } } override public function get id() : Long { return this.modelId; } } }
package assets.resultwindow { import flash.display.BitmapData; [Embed(source="/_assets/assets.resultwindow.bres_HEADER_BLUE_TL.png")] public dynamic class bres_HEADER_BLUE_TL extends BitmapData { public function bres_HEADER_BLUE_TL(param1:int = 4, param2:int = 4) { super(param1,param2); } } }
package projects.tanks.client.battlefield.models.ultimate.effects.mammoth { 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 MammothUltimateModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function MammothUltimateModelServer(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.model.matchmaking.invitewindow { import alternativa.tanks.view.mainview.groupinvite.GroupInviteWindow; public class InviteWindowServiceImpl implements InviteWindowService { private var window:GroupInviteWindow; public function InviteWindowServiceImpl() { super(); } public function setInviteWindow(param1:GroupInviteWindow) : void { this.window = param1; } public function getInviteWindow() : GroupInviteWindow { return this.window; } } }
package alternativa.tanks.service.matchmaking { import alternativa.tanks.view.mainview.HolidayParams; import flash.events.IEventDispatcher; import flash.utils.Dictionary; import projects.tanks.client.battleselect.model.matchmaking.queue.MatchmakingMode; public interface MatchmakingFormService extends IEventDispatcher { function showMatchmakingLayout(param1:Dictionary, param2:HolidayParams, param3:int) : void; function hideMatchmakingLayout() : void; function showRegistrationWindow(param1:int, param2:MatchmakingMode) : void; function hideRegistrationWindow() : void; function getLastRegistrationMode() : MatchmakingMode; function getModeName(param1:MatchmakingMode) : String; } }
package projects.tanks.client.battleselect.model.battle.param { public interface IBattleParamInfoModelBase { } }
package projects.tanks.clients.fp10.models.tankspartnersmodel.partners.armorgames { import flash.utils.Dictionary; import platform.client.core.general.socialnetwork.types.LoginParameters; import platform.client.fp10.core.service.address.AddressService; import platform.clients.fp10.libraries.alternativapartners.type.IParametersListener; import platform.clients.fp10.libraries.alternativapartners.type.IPartner; import projects.tanks.client.partners.impl.armorgames.ArmorGamesLoginModelBase; import projects.tanks.client.partners.impl.armorgames.IArmorGamesLoginModelBase; [ModelInfo] public class ArmorGamesLoginModel extends ArmorGamesLoginModelBase implements IArmorGamesLoginModelBase, IPartner { [Inject] public static var addressService:AddressService; public function ArmorGamesLoginModel() { super(); } public function getLoginParameters(param1:IParametersListener) : void { var local2:Dictionary = new Dictionary(); local2["user_id"] = addressService.getQueryParameter("user_id"); local2["auth_token"] = addressService.getQueryParameter("auth_token"); param1.onSetParameters(new LoginParameters(local2)); } public function hasPaymentAction() : Boolean { return false; } public function paymentAction() : void { } public function getFailRedirectUrl() : String { return "http://armorgames.com/tanki-online-game/17724"; } public function isExternalLoginAllowed() : Boolean { return true; } public function hasRatings() : Boolean { return true; } } }
package alternativa.tanks.services.battleinput { public interface MouseLockListener { function onMouseLock(param1:Boolean) : void; } }
package alternativa.tanks.model.garage.resistance { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.model.garage.resistance.ResistancesIcons_bitmapFireResistance_x2.png")] public class ResistancesIcons_bitmapFireResistance_x2 extends BitmapAsset { public function ResistancesIcons_bitmapFireResistance_x2() { super(); } } }
package alternativa.tanks.models.battle.gui.indicators { import assets.IconAlarm; import controls.Label; import controls.statassets.BlackRoundRect; import flash.text.TextFieldAutoSize; public class PauseIndicator extends BlackRoundRect { private static const TIME_REPLACE_PATTERN:String = "{time}"; private var timelLabel:Label; private var battleLeaveText:String; private var _seconds:int; public function PauseIndicator(param1:String, param2:String, param3:String) { var local10:Label = null; var local11:Label = null; super(); this.battleLeaveText = param3; var local4:int = 33; var local5:int = 33; var local6:int = 5; var local7:int = 16; var local8:IconAlarm = new IconAlarm(); addChild(local8); local8.y = local4; var local9:int = local8.y + local8.height + 2 * local6; local10 = new Label(); local10.size = local7; local10.text = param1; local10.y = local9; addChild(local10); width = local10.textWidth; local9 += local10.height + local6; local11 = new Label(); local11.size = local7; local11.text = param2; local11.y = local9; addChild(local11); if(width < local11.textWidth) { width = local11.textWidth; } local9 += local11.height + local6; this.timelLabel = new Label(); this.timelLabel.size = local7; this.timelLabel.autoSize = TextFieldAutoSize.LEFT; this.timelLabel.text = param3 + " 99:99"; this.timelLabel.y = local9; addChild(this.timelLabel); if(width < this.timelLabel.textWidth) { width = this.timelLabel.textWidth; } width += 2 * local5; local8.x = width - local8.width >> 1; local10.x = width - local10.width >> 1; local11.x = width - local11.width >> 1; height = local9 + this.timelLabel.height + local4 - 5; } public function set seconds(param1:int) : void { if(this._seconds == param1) { return; } this._seconds = param1; var local2:int = this._seconds / 60; this._seconds -= local2 * 60; var local3:String = this._seconds < 10 ? "0" + this._seconds : this._seconds.toString(); this.timelLabel.text = this.battleLeaveText.replace(TIME_REPLACE_PATTERN,local2 + ":" + local3); this.timelLabel.x = width - this.timelLabel.width >> 1; } } }
package alternativa.tanks.models.battle.battlefield { import alternativa.osgi.service.console.variables.ConsoleVarInt; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.types.Long; import flash.utils.Dictionary; public class BonusPickupEffects { private static var conShowEffects:ConsoleVarInt; private var battleService:BattleService; private var tanks:Dictionary = new Dictionary(); private var effects:Dictionary = new Dictionary(); public function BonusPickupEffects(param1:BattleService) { super(); this.battleService = param1; if(conShowEffects == null) { conShowEffects = new ConsoleVarInt("bonus_flash",0,0,1); } } public function addTank(param1:Tank) : void { this.tanks[param1.getUser()] = param1; } public function removeTank(param1:Tank) : void { this.removeEffect(param1); delete this.tanks[param1.getUser()]; } public function showBonusPickup(param1:Long) : void { var local2:Tank = null; var local3:BonusPickupEffect = null; if(conShowEffects.value == 1) { local2 = this.tanks[param1]; if(local2 != null) { local3 = this.effects[param1]; if(local3 == null) { local3 = new BonusPickupEffect(local2); this.effects[param1] = local3; } if(!local3.onScene) { this.battleService.addGraphicEffect(local3); } local3.init(); } } } private function removeEffect(param1:Tank) : void { var local2:BonusPickupEffect = this.effects[param1.getUser()]; if(local2 != null) { local2.kill(); delete this.effects[param1.getUser()]; } } } }
package alternativa.tanks.models.battlefield { import mx.core.BitmapAsset; [ExcludeClass] public class BattlefieldModel_DUST_DATA extends BitmapAsset { public function BattlefieldModel_DUST_DATA() { super(); } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapPropertiesCenter.png")] public class ItemInfoPanelBitmaps_bitmapPropertiesCenter extends BitmapAsset { public function ItemInfoPanelBitmaps_bitmapPropertiesCenter() { super(); } } }
package alternativa.tanks.engine3d { import alternativa.engine3d.materials.TextureMaterial; import flash.display.BitmapData; public class TextureMaterialFactory { public function TextureMaterialFactory() { super(); } public static function createTextureMaterial(param1:BitmapData, param2:Boolean) : TextureMaterial { return new TextureMaterial(param1,false,true,!!param2 ? int(int(1)) : int(int(0))); } } }
package projects.tanks.client.battlefield.models.tankparts.weapon.thunder { 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.type.IGameObject; import projects.tanks.client.battlefield.types.Vector3d; public class ThunderModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ThunderModelServer; private var client:IThunderModelBase = IThunderModelBase(this); private var modelId:Long = Long.getLong(254322684,-956504003); private var _shootId:Long = Long.getLong(1180507715,64759943); private var _shoot_shooterCodec:ICodec; private var _shootStaticId:Long = Long.getLong(547115248,565846485); private var _shootStatic_shooterCodec:ICodec; private var _shootStatic_hitPointCodec:ICodec; private var _shootTargetId:Long = Long.getLong(547115248,577422584); private var _shootTarget_shooterCodec:ICodec; private var _shootTarget_targetCodec:ICodec; private var _shootTarget_relativeHitPointCodec:ICodec; public function ThunderModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ThunderModelServer(IModel(this)); this._shoot_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._shootStatic_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._shootStatic_hitPointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false)); this._shootTarget_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._shootTarget_targetCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._shootTarget_relativeHitPointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._shootId: this.client.shoot(IGameObject(this._shoot_shooterCodec.decode(param2))); break; case this._shootStaticId: this.client.shootStatic(IGameObject(this._shootStatic_shooterCodec.decode(param2)),Vector3d(this._shootStatic_hitPointCodec.decode(param2))); break; case this._shootTargetId: this.client.shootTarget(IGameObject(this._shootTarget_shooterCodec.decode(param2)),IGameObject(this._shootTarget_targetCodec.decode(param2)),Vector3d(this._shootTarget_relativeHitPointCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package alternativa.tanks.gui.components.button { import alternativa.tanks.gui.IClanNotificationListener; import alternativa.tanks.gui.clanmanagement.ClanStateButton; import alternativa.tanks.models.service.ClanNotificationsManager; import alternativa.tanks.models.service.ClanService; import flash.display.Bitmap; import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.ClanUserInfoService; import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.RestrictionJoinClanEvent; public class ClanUsersButton extends ClanStateButton implements IClanNotificationListener { [Inject] public static var clanService:ClanService; [Inject] public static var clanUserInfoService:ClanUserInfoService; public static var AttentionIconClass:Class = ClanUsersButton_AttentionIconClass; private var _attentionIcon:Bitmap = new AttentionIconClass() as Bitmap; public function ClanUsersButton() { super(); addChild(this._attentionIcon); this._attentionIcon.y = -6; clanUserInfoService.addEventListener(RestrictionJoinClanEvent.UPDATE,this.updateRestriction); } override public function set width(param1:Number) : void { super.width = param1; this._attentionIcon.x = width - 10; } override public function set enable(param1:Boolean) : void { super.enable = param1; this.updateNotifications(); } public function updateNotifications() : void { this._attentionIcon.visible = ClanNotificationsManager.acceptedAndIncomingCount() > 0 && this.enable; } private function updateRestriction(param1:RestrictionJoinClanEvent) : void { this.updateNotifications(); } } }