code
stringlengths 57
237k
|
|---|
package alternativa.tanks.models.weapon.streamweapon {
import alternativa.tanks.utils.EncryptedNumber;
import alternativa.tanks.utils.EncryptedNumberImpl;
public class StreamWeaponData {
private var energyCapacity:EncryptedNumber;
private var energyDischargeSpeed:EncryptedNumber;
private var energyRechargeSpeed:EncryptedNumber;
private var tickIntervalMsec:EncryptedNumber;
public function StreamWeaponData(param1:Number, param2:Number, param3:Number, param4:Number) {
super();
this.energyCapacity = new EncryptedNumberImpl(param1);
this.energyDischargeSpeed = new EncryptedNumberImpl(param2);
this.energyRechargeSpeed = new EncryptedNumberImpl(param3);
this.tickIntervalMsec = new EncryptedNumberImpl(param4);
}
public function getEnergyCapacity() : Number {
return this.energyCapacity.getNumber();
}
public function getEnergyDischargeSpeed() : Number {
return this.energyDischargeSpeed.getNumber();
}
public function getEnergyRechargeSpeed() : Number {
return this.energyRechargeSpeed.getNumber();
}
public function getTickIntervalMsec() : Number {
return this.tickIntervalMsec.getNumber();
}
public function setEnergyDischargeSpeed(param1:Number) : void {
this.energyDischargeSpeed.setNumber(param1);
}
}
}
|
package alternativa.tanks.model.news {
import alternativa.tanks.gui.news.NewsAlertWindow;
import alternativa.tanks.services.NewsService;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadPostListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.chat.models.news.showing.INewsShowingModelBase;
import projects.tanks.client.chat.models.news.showing.NewsItemData;
import projects.tanks.client.chat.models.news.showing.NewsShowingModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.model.serverrestarttime.OnceADayActionService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.UserPropertiesServiceEvent;
[ModelInfo]
public class NewsShowingModel extends NewsShowingModelBase implements INewsShowingModelBase, ObjectLoadPostListener, ObjectUnloadListener {
[Inject]
public static var newsService:NewsService;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
[Inject]
public static var onceADayActionService:OnceADayActionService;
[Inject]
public static var dialogService:IDialogsService;
private static const NEWS_ALERT_ACTION:String = "NEWS_ALERT";
public function NewsShowingModel() {
super();
}
public function objectLoadedPost() : void {
var local1:Vector.<NewsItemData> = getInitParam().newsItems;
if(local1.length > 0) {
newsService.setInitialNewsItems(local1);
this.prepareShowAlert();
}
}
private function prepareShowAlert() : void {
if(Boolean(onceADayActionService.verifyAndSaveAction(NEWS_ALERT_ACTION)) && userPropertiesService.rank > 1) {
if(userPropertiesService.isInited()) {
this.showNewsAlert();
} else {
userPropertiesService.addEventListener(UserPropertiesServiceEvent.ON_INIT_USER_PROPERTIES,this.showNewsAlert);
}
}
}
private function showNewsAlert(param1:UserPropertiesServiceEvent = null) : void {
var local3:NewsAlertWindow = null;
userPropertiesService.removeEventListener(UserPropertiesServiceEvent.ON_INIT_USER_PROPERTIES,this.showNewsAlert);
var local2:Vector.<NewsItemData> = newsService.getUnreadNewsItems();
if(local2.length > 0) {
local3 = new NewsAlertWindow(local2);
dialogService.enqueueDialog(local3);
}
}
public function sendNewsItem(param1:NewsItemData) : void {
newsService.addNewsItem(param1);
}
public function removeNewsItem(param1:Long) : void {
newsService.removeNewsItem(param1);
}
public function objectUnloaded() : void {
userPropertiesService.removeEventListener(UserPropertiesServiceEvent.ON_INIT_USER_PROPERTIES,this.showNewsAlert);
newsService.cleanup();
}
}
}
|
package alternativa.physics.collision.primitives {
import alternativa.math.Matrix4;
import alternativa.math.Vector3;
import alternativa.physics.PhysicsMaterial;
import alternativa.physics.collision.CollisionShape;
import alternativa.physics.collision.types.AABB;
public class CollisionRect extends CollisionShape {
private static const EPSILON:Number = 0.005;
public var hs:Vector3 = new Vector3();
public function CollisionRect(param1:Vector3, param2:int, param3:PhysicsMaterial) {
super(RECT,param2,param3);
this.hs.copy(param1);
}
override public function calculateAABB() : AABB {
var local1:Matrix4 = null;
local1 = transform;
var local2:Number = local1.m00 < 0 ? -local1.m00 : local1.m00;
var local3:Number = local1.m01 < 0 ? -local1.m01 : local1.m01;
var local4:Number = local1.m02 < 0 ? -local1.m02 : local1.m02;
var local5:AABB = this.aabb;
local5.maxX = this.hs.x * local2 + this.hs.y * local3 + EPSILON * local4;
local5.minX = -local5.maxX;
local2 = local1.m10 < 0 ? -local1.m10 : local1.m10;
local3 = local1.m11 < 0 ? -local1.m11 : local1.m11;
local4 = local1.m12 < 0 ? -local1.m12 : local1.m12;
local5.maxY = this.hs.x * local2 + this.hs.y * local3 + EPSILON * local4;
local5.minY = -local5.maxY;
local2 = local1.m20 < 0 ? -local1.m20 : local1.m20;
local3 = local1.m21 < 0 ? -local1.m21 : local1.m21;
local4 = local1.m22 < 0 ? -local1.m22 : local1.m22;
local5.maxZ = this.hs.x * local2 + this.hs.y * local3 + EPSILON * local4;
local5.minZ = -local5.maxZ;
local5.minX += local1.m03;
local5.maxX += local1.m03;
local5.minY += local1.m13;
local5.maxY += local1.m13;
local5.minZ += local1.m23;
local5.maxZ += local1.m23;
return local5;
}
override public function copyFrom(param1:CollisionShape) : CollisionShape {
var local2:CollisionRect = param1 as CollisionRect;
if(local2 == null) {
return this;
}
super.copyFrom(local2);
this.hs.copy(local2.hs);
return this;
}
override protected function createPrimitive() : CollisionShape {
return new CollisionRect(this.hs,collisionGroup,material);
}
override public function raycast(param1:Vector3, param2:Vector3, param3:Number, param4:Vector3) : Number {
var local5:Matrix4 = null;
local5 = this.transform;
var local6:Number = param1.x - local5.m03;
var local7:Number = param1.y - local5.m13;
var local8:Number = param1.z - local5.m23;
var local9:Number = local5.m00 * local6 + local5.m10 * local7 + local5.m20 * local8;
var local10:Number = local5.m01 * local6 + local5.m11 * local7 + local5.m21 * local8;
var local11:Number = local5.m02 * local6 + local5.m12 * local7 + local5.m22 * local8;
local6 = local5.m00 * param2.x + local5.m10 * param2.y + local5.m20 * param2.z;
local7 = local5.m01 * param2.x + local5.m11 * param2.y + local5.m21 * param2.z;
local8 = local5.m02 * param2.x + local5.m12 * param2.y + local5.m22 * param2.z;
if(local8 > -param3 && local8 < param3) {
return -1;
}
var local12:Number = -local11 / local8;
if(local12 < 0) {
return -1;
}
local9 += local6 * local12;
local10 += local7 * local12;
local11 = 0;
if(local9 < -this.hs.x - param3 || local9 > this.hs.x + param3 || local10 < -this.hs.y - param3 || local10 > this.hs.y + param3) {
return -1;
}
if(param2.x * local5.m02 + param2.y * local5.m12 + param2.z * local5.m22 > 0) {
param4.x = -local5.m02;
param4.y = -local5.m12;
param4.z = -local5.m22;
} else {
param4.x = local5.m02;
param4.y = local5.m12;
param4.z = local5.m22;
}
return local12;
}
}
}
|
package alternativa.tanks.models.tank.killhandlers {
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.LocalTankKilledEvent;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.tank.ITankModel;
import alternativa.tanks.physics.CollisionGroup;
import platform.client.fp10.core.type.IGameObject;
public class LocalTankDieHandler extends CommonTankDieHandler implements TankDieHandler {
public function LocalTankDieHandler() {
super();
}
private static function disableBonusesPickup(param1:ITankModel) : void {
var local2:Tank = param1.getTank();
local2.setBodyCollisionGroup(local2.getBodyCollisionGroup() & ~CollisionGroup.BONUS_WITH_TANK);
}
public function handleTankDie(param1:IGameObject, param2:int) : void {
var local3:ITankModel = getTankModel(param1);
local3.sendStateCorrection(true);
local3.sendDeathConfirmationCommand();
killTank(param1,param2);
disableBonusesPickup(local3);
battleService.lockFollowCamera();
var local4:BattleEventDispatcher = battleEventDispatcher;
local4.dispatchEvent(LocalTankKilledEvent.EVENT);
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.controls.buttons {
import flash.events.Event;
import projects.tanks.clients.fp10.Prelauncher.Locale;
import projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp;
public class ExitButton extends Button {
public function ExitButton(onClick:Function) {
super(onClick);
addEventListener(Event.ADDED_TO_STAGE,this.addedToStage);
}
private function addedToStage(e:Event) : void {
addChildToCenter(MakeUp.getExitButtonMakeUp());
addChildToCenter(MakeUp.getActiveExitButtonMakeUp());
addChild(textField);
getChildAt(1).visible = false;
}
override public function switchLocale(locale:Locale) : void {
textField.defaultTextFormat.font = MakeUp.getFont(locale);
textField.text = locale.exitText;
textField.width += 5;
textFieldToCenter();
textField.textColor = 16751998;
}
override protected function onResize(e:Event) : void {
this.x = stage.stageWidth >> 1;
this.y = (stage.stageHeight >> 1) + 150;
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ItemInfoPanel_bitmapSpread extends BitmapAsset
{
public function ItemInfoPanel_bitmapSpread()
{
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.rulesupdate.showing {
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.rulesupdate.showing.RulesUpdateShowingCC;
public class VectorCodecRulesUpdateShowingCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecRulesUpdateShowingCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(RulesUpdateShowingCC,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.<RulesUpdateShowingCC> = new Vector.<RulesUpdateShowingCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = RulesUpdateShowingCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:RulesUpdateShowingCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<RulesUpdateShowingCC> = Vector.<RulesUpdateShowingCC>(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
{
use namespace mx_internal;
public class EdgeMetrics
{
mx_internal static const VERSION:String = "4.6.0.23201";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0,0,0,0);
public var bottom:Number;
public var left:Number;
public var right:Number;
public var top:Number;
public function EdgeMetrics(left:Number = 0, top:Number = 0, right:Number = 0, bottom:Number = 0)
{
super();
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
public function clone() : EdgeMetrics
{
return new EdgeMetrics(this.left,this.top,this.right,this.bottom);
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class AchievementCongratulationsWindow__p extends BitmapAsset
{
public function AchievementCongratulationsWindow__p()
{
super();
}
}
}
|
package alternativa.tanks.view.battlelist.battleitem {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlelist.battleitem.BattleItemIcon_dmNormalClass.png")]
public class BattleItemIcon_dmNormalClass extends BitmapAsset {
public function BattleItemIcon_dmNormalClass() {
super();
}
}
}
|
package alternativa.tanks.view.forms.primivites {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.locale.ILocaleService;
import controls.TankWindow;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import flash.ui.Keyboard;
import forms.events.AlertEvent;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import services.alertservice.AlertAnswer;
public class Alert extends Sprite {
public static var localeService:ILocaleService = OSGi.getInstance().getService(ILocaleService) as ILocaleService;
public static const ALERT_QUIT:int = 0;
public static const ALERT_CONFIRM_EMAIL:int = 1;
public static const ERROR_CALLSIGN_FIRST_SYMBOL:int = 2;
public static const ERROR_CALLSIGN_DEVIDE:int = 3;
public static const ERROR_CALLSIGN_LAST_SYMBOL:int = 4;
public static const ERROR_CALLSIGN_LENGTH:int = 5;
public static const ERROR_CALLSIGN_UNIQUE:int = 6;
public static const ERROR_PASSWORD_LENGTH:int = 7;
public static const ERROR_PASSWORD_INCORRECT:int = 8;
public static const ERROR_PASSWORD_CHANGE:int = 9;
public static const ERROR_EMAIL_UNIQUE:int = 10;
public static const ERROR_EMAIL_INVALID:int = 11;
public static const ERROR_EMAIL_NOTFOUND:int = 12;
public static const ERROR_EMAIL_NOTSENDED:int = 13;
public static const ERROR_FATAL:int = 14;
public static const ERROR_FATAL_DEBUG:int = 15;
public static const GARAGE_AVAILABLE:int = 16;
public static const ALERT_RECOVERY_LINK_SENDED:int = 17;
public static const ALERT_CHAT_PROCEED:int = 18;
public static const CAPTCHA_INCORRECT:int = 19;
public static const ERROR_CONFIRM_EMAIL:int = 20;
protected var bgWindow:TankWindow = new TankWindow();
private var output:LabelBase;
private var message:String;
private var labels:Vector.<String>;
protected var alertWindow:Sprite = new Sprite();
public var closeButton:MainPanelCloseButton = new MainPanelCloseButton();
private var closable:Boolean = false;
private const alerts:Array = new Array();
private var id:int;
public function Alert(param1:int = -1, param2:Boolean = false) {
super();
this.closable = param2;
this.id = param1;
this.init();
}
private static function isConfirmationKey(param1:KeyboardEvent) : Boolean {
return [Keyboard.SPACE,Keyboard.ENTER].indexOf(param1.keyCode) >= 0;
}
private static function isCancelKey(param1:KeyboardEvent) : Boolean {
return [Keyboard.ESCAPE,Keyboard.BACKSPACE].indexOf(param1.keyCode) >= 0;
}
public function init() : void {
this.bgWindow.headerLang = localeService.getText(TanksLocale.TEXT_GUI_LANG);
if(AlertAnswer.YES == null) {
this.fillButtonLabels();
}
this.initStandardAlerts(localeService);
if(this.id > -1) {
this.showAlert(this.alerts[this.id][0],this.alerts[this.id][1]);
}
this.createOutput();
}
private function initStandardAlerts(param1:ILocaleService) : void {
this.alerts[ALERT_QUIT] = [param1.getText(TanksLocale.TEXT_ALERT_QUIT_TEXT),Vector.<String>([AlertAnswer.YES,AlertAnswer.NO])];
this.alerts[ALERT_CONFIRM_EMAIL] = [param1.getText(TanksLocale.TEXT_ALERT_EMAIL_CONFIRMED),Vector.<String>([AlertAnswer.YES])];
this.alerts[ERROR_FATAL] = [param1.getText(TanksLocale.TEXT_ERROR_FATAL),Vector.<String>([AlertAnswer.RETURN])];
this.alerts[ERROR_FATAL_DEBUG] = [param1.getText(TanksLocale.TEXT_ERROR_FATAL_DEBUG),Vector.<String>([AlertAnswer.SEND])];
this.alerts[ERROR_CALLSIGN_FIRST_SYMBOL] = [param1.getText(TanksLocale.TEXT_ERROR_CALLSIGN_WRONG_FIRST_SYMBOL),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_CALLSIGN_DEVIDE] = [param1.getText(TanksLocale.TEXT_ERROR_CALLSIGN_NOT_SINGLE_DEVIDERS),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_CALLSIGN_LAST_SYMBOL] = [param1.getText(TanksLocale.TEXT_ERROR_CALLSIGN_WRONG_LAST_SYMBOL),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_CALLSIGN_LENGTH] = [param1.getText(TanksLocale.TEXT_ERROR_CALLSIGN_LENGTH),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_CALLSIGN_UNIQUE] = [param1.getText(TanksLocale.TEXT_ERROR_CALLSIGN_NOT_UNIQUE),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_EMAIL_UNIQUE] = [param1.getText(TanksLocale.TEXT_ERROR_EMAIL_NOT_UNIQUE),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_EMAIL_INVALID] = [param1.getText(TanksLocale.TEXT_ERROR_EMAIL_INVALID),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_EMAIL_NOTFOUND] = [param1.getText(TanksLocale.TEXT_ERROR_EMAIL_NOT_FOUND),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_EMAIL_NOTSENDED] = [param1.getText(TanksLocale.TEXT_ERROR_EMAIL_NOT_SENDED),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_PASSWORD_INCORRECT] = [param1.getText(TanksLocale.TEXT_ERROR_PASSWORD_INCORRECT),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_PASSWORD_LENGTH] = [param1.getText(TanksLocale.TEXT_ERROR_PASSWORD_LENGTH),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_PASSWORD_CHANGE] = [param1.getText(TanksLocale.TEXT_ERROR_PASSWORD_CHANGE),Vector.<String>([AlertAnswer.OK])];
this.alerts[GARAGE_AVAILABLE] = [param1.getText(TanksLocale.TEXT_ALERT_GARAGE_AVAILABLE),Vector.<String>([AlertAnswer.GARAGE,AlertAnswer.CANCEL])];
this.alerts[ALERT_RECOVERY_LINK_SENDED] = [param1.getText(TanksLocale.TEXT_SETTINGS_CHANGE_PASSWORD_CONFIRMATION_SENT_TEXT),Vector.<String>([AlertAnswer.OK])];
this.alerts[ALERT_CHAT_PROCEED] = [param1.getText(TanksLocale.TEXT_ALERT_CHAT_PROCEED_EXTERNAL_LINK),Vector.<String>([AlertAnswer.CANCEL])];
this.alerts[CAPTCHA_INCORRECT] = [param1.getText(TanksLocale.TEXT_CAPTCHA_INCORRECT),Vector.<String>([AlertAnswer.OK])];
this.alerts[ERROR_CONFIRM_EMAIL] = [param1.getText(TanksLocale.TEXT_ALERT_EMAIL_CONFIRMED_WRONG_LINK),Vector.<String>([AlertAnswer.OK])];
}
private function fillButtonLabels() : void {
AlertAnswer.YES = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_YES);
AlertAnswer.NO = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_NO);
AlertAnswer.OK = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_OK);
AlertAnswer.CANCEL = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_CANCEL);
AlertAnswer.SEND = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_SEND_BUG_REPORT);
AlertAnswer.RETURN = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_RETURN_TO_BATTLE);
AlertAnswer.GARAGE = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_GO_TO_GARAGE);
AlertAnswer.PROCEED = localeService.getText(TanksLocale.TEXT_ALERT_ANSWER_PROCEED);
}
private function createOutput() : void {
this.output = new LabelBase();
this.output.autoSize = TextFieldAutoSize.CENTER;
this.output.align = TextFormatAlign.CENTER;
this.output.size = 13;
this.output.width = 10;
this.output.height = 10;
this.output.x = -5;
this.output.y = 30;
this.output.multiline = true;
}
public function showAlert(param1:String, param2:Vector.<String>) : void {
this.message = param1;
this.labels = param2;
addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
}
private function onAddedToStage(param1:Event) : void {
removeEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
this.drawBackground();
this.doLayout(param1);
}
protected function doLayout(param1:Event) : void {
var local4:DefaultButtonBase = null;
var local5:int = 0;
var local2:int = this.calculateButtonsWidth();
var local3:int = local2 * this.labels.length / 2;
addChild(this.alertWindow);
this.alertWindow.addChild(this.bgWindow);
this.alertWindow.addChild(this.output);
this.output.htmlText = this.message;
if(this.labels.length != 0) {
local5 = 0;
while(local5 < this.labels.length) {
local4 = new DefaultButtonBase();
local4.label = this.labels[local5];
local4.x = local2 * local5 - local3;
local4.y = this.output.y + this.output.height + 15;
local4.width = local2 - 6;
local4.addEventListener(MouseEvent.CLICK,this.close);
this.alertWindow.addChild(local4);
local5++;
}
this.bgWindow.height = local4.y + 60;
} else {
this.bgWindow.height = this.output.y + this.output.height + 30;
}
this.bgWindow.width = Math.max(int(this.output.width + 50),local3 * 2 + 50);
this.bgWindow.x = -int(this.bgWindow.width / 2) - 3;
stage.addEventListener(Event.RESIZE,this.onStageResize);
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
stage.focus = this;
if(this.closable) {
this.alertWindow.addChild(this.closeButton);
this.closeButton.x = this.bgWindow.x + this.bgWindow.width - this.closeButton.width - 10;
this.closeButton.y = 10;
this.closeButton.addEventListener(MouseEvent.CLICK,this.close);
}
this.onStageResize(null);
}
private function onKeyDown(param1:KeyboardEvent) : void {
var local2:String = null;
if(this.labels.length == 2) {
if(isConfirmationKey(param1)) {
local2 = this.getFirstExistingLabel([AlertAnswer.OK,AlertAnswer.YES,AlertAnswer.GARAGE,AlertAnswer.PROCEED,AlertAnswer.SEND]);
} else if(isCancelKey(param1)) {
local2 = this.getFirstExistingLabel([AlertAnswer.NO,AlertAnswer.CANCEL,AlertAnswer.RETURN]);
}
} else {
local2 = this.getFirstExistingLabel([AlertAnswer.YES,AlertAnswer.SEND,AlertAnswer.RETURN,AlertAnswer.OK,AlertAnswer.CANCEL]);
}
this.dispatchClickEventForButtonWithLabel(local2);
}
private function getFirstExistingLabel(param1:Array) : String {
var local3:int = 0;
var local2:int = 0;
while(local2 < this.labels.length) {
local3 = int(param1.indexOf(this.labels[local2]));
if(local3 > -1) {
return param1[local3];
}
local2++;
}
return "";
}
private function dispatchClickEventForButtonWithLabel(param1:String) : void {
var local3:DisplayObject = null;
var local2:int = 0;
while(local2 < this.alertWindow.numChildren) {
local3 = this.alertWindow.getChildAt(local2);
if(local3 is DefaultButtonBase && DefaultButtonBase(local3).label == param1) {
local3.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
return;
}
local2++;
}
}
private function calculateButtonsWidth() : int {
var local1:int = 80;
var local2:LabelBase = new LabelBase();
var local3:int = 0;
while(local3 < this.labels.length) {
local2.text = this.labels[local3];
if(local2.width > local1) {
local1 = local2.width;
}
local3++;
}
return local1 + 18;
}
private function onStageResize(param1:Event) : void {
this.alertWindow.x = int(stage.stageWidth / 2);
this.alertWindow.y = int(stage.stageHeight / 2 - this.alertWindow.height / 2);
this.drawBackground();
}
private function drawBackground() : void {
graphics.clear();
graphics.beginFill(0,0.5);
graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
graphics.endFill();
}
private function close(param1:MouseEvent) : void {
stage.removeEventListener(Event.RESIZE,this.onStageResize);
stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
this.removeMouseListenerFromButtons();
var local2:DefaultButtonBase = param1.currentTarget as DefaultButtonBase;
if(local2 != null) {
dispatchEvent(new AlertEvent(local2.label));
}
if(parent != null) {
parent.removeChild(this);
}
}
private function removeMouseListenerFromButtons() : void {
var local2:DisplayObject = null;
var local1:int = 0;
while(local1 < this.alertWindow.numChildren) {
local2 = this.alertWindow.getChildAt(local1);
if(local2 is DefaultButtonBase || local2 == this.closeButton) {
local2.removeEventListener(MouseEvent.CLICK,this.close);
}
local1++;
}
}
}
}
|
package alternativa.tanks.view.battlelist.battleitem {
import alternativa.tanks.controllers.battlelist.BattleListItemParams;
import alternativa.tanks.view.battleinfo.BattleInfoBaseParams;
import alternativa.tanks.view.battlelist.friends.FriendsIndicator;
import assets.cellrenderer.battlelist.Abris;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import forms.ColorConstants;
import projects.tanks.client.battleservice.BattleCreateParameters;
import projects.tanks.client.battleservice.model.types.BattleSuspicionLevel;
import projects.tanks.clients.fp10.libraries.tanksservices.utils.BattleInfoUtils;
public class BattleListItem extends Sprite {
private static const DEFAULT_HEIGHT:int = 19;
private static const MAPLABEL_MIN_RIGHT_INDENT:int = 6;
private var _itemWidth:int = 100;
private var proBattleIcon:Bitmap = new Bitmap();
private var privateBattleIcon:Bitmap = new Bitmap();
private var formatBattleIcon:Bitmap = new Bitmap();
private var battleNameLabel:LabelBase = new LabelBase();
private var userCountAbris:Abris = new Abris();
private var blueCountAbris:Abris = new Abris();
private var redCountAbris:Abris = new Abris();
private var dmPlayersCount:LabelBase = new LabelBase();
private var blueCount:LabelBase = new LabelBase();
private var redCount:LabelBase = new LabelBase();
private var friendsIndicator:FriendsIndicator;
private var mapNameLabel:LabelBase = new LabelBase();
private var data:BattleListItemParams;
public function BattleListItem(param1:BattleListItemParams, param2:int) {
super();
this.data = param1;
this._itemWidth = param2;
this.drawDefaultHeight();
if(this.createParams.privateBattle) {
this.addPrivateBattleIcon();
} else if(param1.formatBattle) {
this.addFormatBattleIcon();
} else if(this.createParams.proBattle) {
this.addProBattleIcon();
}
var local3:uint = this.getLabelColorByAccessible();
var local4:uint = this.getMapNameLabelColor(this.params.suspicionLevel);
var local5:int = int(this._itemWidth * 0.55);
if(param1.isDM) {
this.addControlsDM(local5);
} else {
this.addControlsTDM(local5);
}
this.friendsIndicator = new FriendsIndicator(param1.accessible,this.params.friends,local3);
this.friendsIndicator.x = (param1.isDM ? this.dmPlayersCount.x + this.dmPlayersCount.width : this.blueCount.x + this.blueCount.width) + 3;
this.friendsIndicator.y = 2;
this.friendsIndicator.visible = this.params.friends > 0;
addChild(this.friendsIndicator);
this.updateUsersCount();
this.addControlMapName(local4);
this.mapNameLabel.size = 12;
this.mapNameLabel.color = local3;
this.mapNameLabel.autoSize = TextFieldAutoSize.RIGHT;
this.mapNameLabel.align = TextFormatAlign.RIGHT;
this.mapNameLabel.text = param1.params.mapName;
this.mapNameLabel.y = 1;
addChild(this.mapNameLabel);
this.resize(this._itemWidth);
}
private function get createParams() : BattleCreateParameters {
return this.data.params.createParams;
}
private function get params() : BattleInfoBaseParams {
return this.data.params;
}
private function drawDefaultHeight() : void {
graphics.clear();
graphics.beginFill(0,0);
graphics.drawRect(0,0,1,DEFAULT_HEIGHT);
graphics.endFill();
}
private function getLabelColorByAccessible() : uint {
return this.data.accessible ? ColorConstants.GREEN_LABEL : ColorConstants.ACCESS_LABEL;
}
private function addControlMapName(param1:uint) : void {
this.battleNameLabel.color = param1;
this.battleNameLabel.autoSize = TextFieldAutoSize.NONE;
this.battleNameLabel.size = 12;
this.battleNameLabel.width = this._itemWidth / 2;
this.battleNameLabel.height = 18;
this.battleNameLabel.x = 12;
this.battleNameLabel.y = 1;
this.battleNameLabel.text = this.getFullMapName();
addChild(this.battleNameLabel);
}
private function addControlsTDM(param1:int) : void {
this.redCountAbris.x = param1;
this.redCountAbris.y = 3;
addChild(this.redCountAbris);
this.blueCountAbris.x = param1 + 27;
this.blueCountAbris.y = 3;
addChild(this.blueCountAbris);
this.redCount.autoSize = TextFieldAutoSize.NONE;
this.redCount.size = 12;
this.redCount.align = TextFormatAlign.CENTER;
this.redCount.x = int(param1 - 0.5);
this.redCount.y = 1;
this.redCount.width = 27;
this.redCount.height = 16;
addChild(this.redCount);
this.blueCount.autoSize = TextFieldAutoSize.NONE;
this.blueCount.align = TextFormatAlign.CENTER;
this.blueCount.x = int(param1 + 26.5);
this.blueCount.y = 1;
this.blueCount.width = 25;
this.blueCount.height = 16;
addChild(this.blueCount);
}
private function addControlsDM(param1:int) : void {
this.userCountAbris.x = int(param1 - 0.5);
this.userCountAbris.y = 3;
addChild(this.userCountAbris);
this.dmPlayersCount = new LabelBase();
this.dmPlayersCount.autoSize = TextFieldAutoSize.NONE;
this.dmPlayersCount.size = 12;
this.dmPlayersCount.align = TextFormatAlign.CENTER;
this.dmPlayersCount.x = param1 - 20;
this.dmPlayersCount.y = 1;
this.dmPlayersCount.width = 52;
this.dmPlayersCount.height = 16;
addChild(this.dmPlayersCount);
}
private function getFullMapName() : String {
var local1:String = this.createParams.proBattle ? this.params.mapName : this.getMapNameWithoutFormat();
if(this.data.formatBattle) {
local1 = local1 + " " + this.data.formatName;
}
return local1;
}
private function getMapNameWithoutFormat() : String {
return BattleInfoUtils.buildBattleName(this.params.mapName,this.createParams.battleMode.name);
}
private function addProBattleIcon() : void {
this.proBattleIcon.bitmapData = BattleTypeIcon.getProIconData(this.data.accessible);
this.addBattleTypeIcon(this.proBattleIcon);
}
private function addFormatBattleIcon() : void {
this.formatBattleIcon.bitmapData = BattleTypeIcon.getFormatIconData(this.data.accessible);
this.addBattleTypeIcon(this.formatBattleIcon);
}
private function addPrivateBattleIcon() : void {
this.privateBattleIcon.bitmapData = BattleTypeIcon.getPrivateIconData(this.data.accessible);
this.addBattleTypeIcon(this.privateBattleIcon);
}
private function addBattleTypeIcon(param1:Bitmap) : void {
param1.y = 5;
param1.x = 0;
addChild(param1);
}
public function resize(param1:int) : void {
this._itemWidth = param1;
var local2:int = int(this._itemWidth * 0.55);
if(this.data.isDM) {
this.userCountAbris.x = local2;
this.dmPlayersCount.x = int(local2 - 0.5);
this.friendsIndicator.x = this.dmPlayersCount.x + this.dmPlayersCount.width + 4;
} else {
this.redCountAbris.x = local2;
this.blueCountAbris.x = local2 + 27;
this.redCount.x = int(local2 - 0.5);
this.blueCount.x = int(local2 + 26.5);
this.friendsIndicator.x = this.blueCount.x + this.blueCount.width + 4;
}
if(Boolean(this.params.customName)) {
this.battleNameLabel.text = this.params.customName;
} else {
this.battleNameLabel.text = this.getFullMapName();
}
if(this.needCutMapLabelText()) {
this.cutMapLabelText();
}
this.mapNameLabel.x = this._itemWidth - this.mapNameLabel.width;
}
private function cutMapLabelText() : void {
if(this.data.formatBattle) {
this.battleNameLabel.text = this.getMapNameWithoutFormat();
if(this.needCutMapLabelText()) {
this.battleNameLabel.text = this.params.mapName;
}
} else {
this.battleNameLabel.text = this.params.mapName;
}
}
private function needCutMapLabelText() : Boolean {
var local1:Number = this.battleNameLabel.x + this.battleNameLabel.textWidth;
if(this.data.isDM) {
return local1 > this.userCountAbris.x - MAPLABEL_MIN_RIGHT_INDENT;
}
return local1 > this.redCountAbris.x - MAPLABEL_MIN_RIGHT_INDENT;
}
public function updateSuspicion(param1:BattleSuspicionLevel) : void {
this.battleNameLabel.color = this.getMapNameLabelColor(param1);
}
private function getMapNameLabelColor(param1:BattleSuspicionLevel) : uint {
switch(param1) {
case BattleSuspicionLevel.NONE:
return this.getLabelColorByAccessible();
case BattleSuspicionLevel.HIGH:
return ColorConstants.BATTLE_SUSPICIOUS_HIGH;
default:
return ColorConstants.BATTLE_SUSPICIOUS_LOW;
}
}
public function updateUsersCount() : void {
var local3:int = 0;
var local4:Boolean = false;
var local5:int = 0;
var local6:int = 0;
var local7:Boolean = false;
var local8:Boolean = false;
var local1:int = this.createParams.maxPeopleCount;
var local2:int = this.params.friends;
if(this.data.isDM) {
local3 = int(this.data.dmParams.users.length);
local4 = local3 == local1;
this.userCountAbris.gotoAndStop(local4 ? 1 : 2);
this.dmPlayersCount.text = String(local3);
this.dmPlayersCount.color = local4 ? 8816262 : 16777215;
} else {
local5 = int(this.data.teamParams.usersRed.length);
local6 = int(this.data.teamParams.usersBlue.length);
local7 = local5 == local1;
local8 = local6 == local1;
this.redCountAbris.gotoAndStop(local7 ? 3 : 5);
this.redCount.text = String(local5);
this.redCount.color = local7 ? 8816262 : 16777215;
this.blueCountAbris.gotoAndStop(local8 ? 4 : 6);
this.blueCount.text = String(local6);
this.blueCount.color = local8 ? 8816262 : 16777215;
}
this.friendsIndicator.setFriendCount(local2);
this.friendsIndicator.visible = local2 > 0;
}
public function updateBattleName() : void {
var local1:* = this.params.customName != null ? this.params.customName : this.getFullMapName();
this.battleNameLabel.text = local1;
}
public function updateAccessible() : void {
var local1:Boolean = this.data.accessible;
this.updateBattleTypeIconAccessible();
var local2:uint = this.getLabelColorByAccessible();
this.battleNameLabel.color = this.getMapNameLabelColor(this.params.suspicionLevel);
this.friendsIndicator.setAccessable(local1);
}
private function updateBattleTypeIconAccessible() : void {
var local1:Boolean = this.data.accessible;
if(this.createParams.privateBattle) {
this.privateBattleIcon.bitmapData = BattleTypeIcon.getPrivateIconData(local1);
}
if(this.data.formatBattle) {
this.formatBattleIcon.bitmapData = BattleTypeIcon.getFormatIconData(local1);
}
if(this.createParams.proBattle) {
this.proBattleIcon.bitmapData = BattleTypeIcon.getProIconData(local1);
}
}
}
}
|
package alternativa.tanks.physics {
internal class MinMax {
public var min:Number = 0;
public var max:Number = 0;
public function MinMax() {
super();
}
}
}
|
package projects.tanks.client.panel.model.abonements {
import alternativa.types.Long;
import projects.tanks.client.commons.types.ShopAbonementBonusTypeEnum;
import projects.tanks.client.commons.types.ShopCategoryEnum;
public class ShopAbonementData {
private var _bonusType:ShopAbonementBonusTypeEnum;
private var _remainingTime:Long;
private var _shopCategory:ShopCategoryEnum;
public function ShopAbonementData(param1:ShopAbonementBonusTypeEnum = null, param2:Long = null, param3:ShopCategoryEnum = null) {
super();
this._bonusType = param1;
this._remainingTime = param2;
this._shopCategory = param3;
}
public function get bonusType() : ShopAbonementBonusTypeEnum {
return this._bonusType;
}
public function set bonusType(param1:ShopAbonementBonusTypeEnum) : void {
this._bonusType = param1;
}
public function get remainingTime() : Long {
return this._remainingTime;
}
public function set remainingTime(param1:Long) : void {
this._remainingTime = param1;
}
public function get shopCategory() : ShopCategoryEnum {
return this._shopCategory;
}
public function set shopCategory(param1:ShopCategoryEnum) : void {
this._shopCategory = param1;
}
public function toString() : String {
var local1:String = "ShopAbonementData [";
local1 += "bonusType = " + this.bonusType + " ";
local1 += "remainingTime = " + this.remainingTime + " ";
local1 += "shopCategory = " + this.shopCategory + " ";
return local1 + "]";
}
}
}
|
package forms.events {
import flash.events.Event;
public class MainButtonBarEvents extends Event {
public static const SHOP:String = "SHOP";
public static const BATTLE:String = "Battle";
public static const GARAGE:String = "Garage";
public static const CLAN:String = "Clan";
public static const FRIENDS:String = "Friends";
public static const SOUND:String = "Sound";
public static const SETTINGS:String = "Settings";
public static const HELP:String = "Help";
public static const CLOSE:String = "Close";
public static const FULL_SCREEN:String = "FullScreen";
public static const QUESTS:String = "Quests";
public static const PANEL_BUTTON_PRESSED:String = "Close";
private var types:Array = [SHOP,BATTLE,GARAGE,SETTINGS,SOUND,HELP,CLOSE,FRIENDS,FULL_SCREEN,QUESTS,CLAN];
private var _typeButton:String;
public function MainButtonBarEvents(param1:int) {
super(MainButtonBarEvents.PANEL_BUTTON_PRESSED,true,false);
this._typeButton = this.types[param1 - 1];
}
public function get typeButton() : String {
return this._typeButton;
}
}
}
|
package alternativa.tanks.controllers.mathmacking {
import alternativa.tanks.service.battlelist.MatchmakingEvent;
import alternativa.tanks.view.matchmaking.MatchmakingRegistrationDialog;
import flash.events.EventDispatcher;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService;
public class MatchmakingFormController extends EventDispatcher {
[Inject]
public static var dialogService:IDialogsService;
private var view:MatchmakingRegistrationDialog;
public function MatchmakingFormController() {
super();
}
public function showForm(param1:String, param2:int) : void {
if(this.view == null) {
this.view = new MatchmakingRegistrationDialog();
}
this.view.addEventListener(MatchmakingEvent.UNREGISTRATION,this.onUnregister);
this.view.prepareForShowing(param1,param2);
dialogService.addDialog(this.view);
}
public function hideForm() : void {
if(this.view == null) {
return;
}
this.view.removeEventListener(MatchmakingEvent.UNREGISTRATION,this.onUnregister);
this.view.prepareForHiding();
dialogService.removeDialog(this.view);
}
private function onUnregister(param1:MatchmakingEvent) : void {
dispatchEvent(new MatchmakingEvent(MatchmakingEvent.UNREGISTRATION));
}
}
}
|
package projects.tanks.client.panel.model.shop.coinpackage {
public interface ICoinPackageModelBase {
}
}
|
package platform.client.fp10.core.resource {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.logging.LogService;
import alternativa.osgi.service.logging.Logger;
import alternativa.osgi.service.network.INetworkService;
import alternativa.utils.LoaderUtils;
import flash.utils.ByteArray;
import flash.utils.Dictionary;
import platform.client.fp10.core.service.localstorage.IResourceLocalStorage;
public class ResourceLoader implements IResourceLoader, IResourceLoadingListener, IResourceSerializationListener {
[Inject]
public static var localStorage:IResourceLocalStorage;
[Inject]
public static var networkSerice:INetworkService;
private var logger:Logger;
private var localStorageInternal:IResourceLocalStorageInternal;
private var maxParallelLoadings:int = 4;
private var numLoadingsInProgress:int;
private var resourceQueue:PriorityQueue;
private var resourceEntries:Dictionary;
public function ResourceLoader(param1:OSGi) {
super();
var local2:LogService = LogService(param1.getService(LogService));
this.logger = local2.getLogger(ResourceLogChannel.NAME);
this.resourceQueue = new PriorityQueue();
this.resourceEntries = new Dictionary();
this.localStorageInternal = IResourceLocalStorageInternal(param1.getService(IResourceLocalStorageInternal));
}
public function loadResource(param1:Resource, param2:IResourceLoadingListener, param3:int) : void {
this.addResourceListener(param1,param2);
if(!param1.isLoading) {
param1.setFlags(ResourceFlags.IS_LOADING);
param1.status = ResourceStatus.QUEUED;
this.resourceQueue.putData(param1,param3);
this.loadResources();
}
}
public function removeResourceListener(param1:Resource, param2:IResourceLoadingListener) : void {
var local3:ResourceEntry = this.resourceEntries[param1];
if(local3 != null) {
local3.removeListener(param2);
}
}
public function addResourceListener(param1:Resource, param2:IResourceLoadingListener) : void {
var local3:ResourceEntry = this.resourceEntries[param1];
if(local3 == null) {
local3 = new ResourceEntry(param1,param2);
this.resourceEntries[param1] = local3;
} else {
local3.addListener(param2);
}
}
public function onResourceLoadingStart(param1:Resource) : void {
var local3:IResourceLoadingListener = null;
var local2:ResourceEntry = this.resourceEntries[param1];
local2.loadingStarted = true;
for each(local3 in local2.listeners) {
local3.onResourceLoadingStart(param1);
}
}
public function onResourceLoadingComplete(param1:Resource) : void {
var listener:IResourceLoadingListener = null;
var resource:Resource = param1;
var entry:ResourceEntry = this.processLoadedResource(resource);
if(entry != null) {
for each(listener in entry.listeners) {
try {
listener.onResourceLoadingComplete(resource);
}
catch(e:Error) {
logger.error("ResourceLoader::onResourceLoadingComplete() loadingComplete listener invocation error: %1",[e.getStackTrace()]);
}
}
}
this.loadResources();
}
public function onResourceLoadingError(param1:Resource, param2:String) : void {
var entry:ResourceEntry;
var listener:IResourceLoadingListener = null;
var resource:Resource = param1;
var errorDescription:String = param2;
resource.setFlags(ResourceFlags.DUMMY_DATA);
entry = this.processLoadedResource(resource);
try {
for each(listener in entry.listeners) {
listener.onResourceLoadingError(resource,errorDescription);
}
}
catch(e:Error) {
logger.error("ResourceLoader::onResourceLoadingError() %1 %2",[e.getStackTrace(),resource.id]);
}
this.loadResources();
}
public function onResourceLoadingFatalError(param1:Resource, param2:String) : void {
var local4:IResourceLoadingListener = null;
var local3:ResourceEntry = this.removeResourceFromLoading(param1);
this.loadResources();
for each(local4 in local3.listeners) {
local4.onResourceLoadingFatalError(param1,param2);
}
}
public function onSerializationComplete(param1:Resource, param2:ByteArray) : void {
this.localStorageInternal.setResourceData(param1.id,param1.version.low,param2,param1.description,param1.classifier);
}
private function loadResources() : void {
var local1:Resource = null;
while(this.resourceQueue.size > 0 && this.numLoadingsInProgress < this.maxParallelLoadings) {
local1 = Resource(this.resourceQueue.getData());
++this.numLoadingsInProgress;
if(local1.isLoaded) {
this.onResourceLoadingComplete(local1);
} else if(localStorage != null && Boolean(localStorage.enabled)) {
this.loadResourceFromLocalStorage(local1);
} else {
this.loadResourceFromNetwork(local1);
}
}
}
private function loadResourceFromLocalStorage(param1:Resource) : void {
var local2:ByteArray = this.localStorageInternal.getResourceData(param1.id,param1.version.low,param1.classifier);
param1.setFlags(ResourceFlags.LOCAL);
if(local2 == null || !param1.loadBytes(local2,this)) {
this.loadResourceFromNetwork(param1);
}
}
private function loadResourceFromNetwork(param1:Resource) : void {
param1.clearFlags(ResourceFlags.LOCAL);
var local2:String = this.getResourceUrl(param1);
param1.load(local2,this);
}
protected function getResourceUrl(param1:Resource) : String {
return networkSerice.resourcesRootUrl + LoaderUtils.getResourcePath(param1.id.toByteArray(),param1.version.toByteArray());
}
private function processLoadedResource(param1:Resource) : ResourceEntry {
param1.status = ResourceStatus.LOADED;
var local2:ResourceEntry = this.removeResourceFromLoading(param1);
if(!param1.hasAnyFlags(ResourceFlags.LOCAL | ResourceFlags.DUMMY_DATA)) {
this.storeResourceLocally(param1);
}
return local2;
}
private function storeResourceLocally(param1:Resource) : void {
if(localStorage != null && Boolean(localStorage.enabled)) {
param1.serialize(this);
}
}
private function removeResourceFromLoading(param1:Resource) : ResourceEntry {
param1.clearFlags(ResourceFlags.IS_LOADING);
--this.numLoadingsInProgress;
var local2:ResourceEntry = this.resourceEntries[param1];
delete this.resourceEntries[param1];
return local2;
}
}
}
import platform.client.fp10.core.resource.IResourceLoadingListener;
import platform.client.fp10.core.resource.Resource;
class ResourceEntry {
public var resource:Resource;
public var listeners:Vector.<IResourceLoadingListener>;
public var loadingStarted:Boolean;
public function ResourceEntry(param1:Resource, param2:IResourceLoadingListener) {
super();
this.resource = param1;
this.listeners = new Vector.<IResourceLoadingListener>(1);
this.listeners[0] = param2;
}
public function addListener(param1:IResourceLoadingListener) : void {
if(this.listeners.indexOf(param1) < 0) {
this.listeners.push(param1);
if(this.loadingStarted) {
param1.onResourceLoadingStart(this.resource);
}
}
}
public function removeListener(param1:IResourceLoadingListener) : void {
var local2:int = int(this.listeners.indexOf(param1));
if(local2 >= 0) {
this.listeners.splice(local2,1);
}
}
}
class QueueItem {
public var data:Object;
public var priority:int;
public var next:QueueItem;
public var prev:QueueItem;
public function QueueItem(param1:Object, param2:int) {
super();
this.data = param1;
this.priority = param2;
}
}
class PriorityQueue {
private var head:QueueItem;
private var tail:QueueItem;
private var _size:int;
public function PriorityQueue() {
super();
this.head = new QueueItem(null,0);
this.tail = new QueueItem(null,0);
this.head.next = this.tail;
this.tail.prev = this.head;
}
public function get size() : int {
return this._size;
}
public function putData(param1:Object, param2:int) : void {
var local3:QueueItem = this.tail.prev;
while(local3 != this.head && local3.priority < param2) {
local3 = local3.prev;
}
var local4:QueueItem = new QueueItem(param1,param2);
local4.next = local3.next;
local4.prev = local3;
local4.next.prev = local4;
local3.next = local4;
++this._size;
}
public function getData() : Object {
if(this._size == 0) {
return null;
}
var local1:QueueItem = this.head.next;
local1.next.prev = local1.prev;
local1.prev.next = local1.next;
local1.next = null;
local1.prev = null;
--this._size;
return local1.data;
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.guestform {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;
public class TankiLogo extends Sprite {
private var logo:Bitmap;
private var logoDiffuse:BitmapData;
private var logoAlpha:BitmapData;
public function TankiLogo(param1:BitmapData, param2:BitmapData) {
super();
this.logoDiffuse = param1;
this.logoAlpha = param2;
if(this.logo == null && this.logoDiffuse != null && this.logoAlpha != null) {
this.logo = new Bitmap();
this.logo.bitmapData = new BitmapData(this.logoDiffuse.width,this.logoDiffuse.height,true,0);
this.logo.bitmapData.copyPixels(this.logoDiffuse,this.logoDiffuse.rect,new Point());
this.logo.bitmapData.copyChannel(this.logoAlpha,this.logoAlpha.rect,new Point(),1,8);
this.logo.alpha = 0;
addChild(this.logo);
}
addChild(this.logo);
addEventListener(Event.ENTER_FRAME,this.onEnterFrame);
}
private function onEnterFrame(param1:Event) : void {
if(this.logo != null) {
if(this.logo.alpha < 1) {
this.logo.alpha += 0.025;
if(this.logo.alpha > 1) {
this.logo.alpha = 1;
}
}
}
}
public function reposition(param1:int, param2:int) : void {
this.logo.x = param1 - this.logo.width >> 1;
this.logo.y = -150 + (param2 - this.logo.height) >> 1;
}
}
}
|
package _codec.platform.client.core.general.spaces.loading.modelconstructors {
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 platform.client.core.general.spaces.loading.modelconstructors.ModelData;
public class VectorCodecModelDataLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecModelDataLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ModelData,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.<ModelData> = new Vector.<ModelData>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ModelData(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ModelData = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ModelData> = Vector.<ModelData>(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.service.item {
import alternativa.tanks.model.item.properties.ItemPropertyValue;
import alternativa.tanks.model.item.upgradable.UpgradableItemParams;
import controls.timer.CountDownTimer;
import flash.events.IEventDispatcher;
import platform.client.fp10.core.resource.types.ImageResource;
import platform.client.fp10.core.type.IGameClass;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.commons.types.ItemCategoryEnum;
import projects.tanks.client.commons.types.ItemViewCategoryEnum;
import projects.tanks.client.panel.model.garage.GarageItemInfo;
public interface ItemService extends IEventDispatcher {
function getPreviewResource(param1:IGameObject) : ImageResource;
function getCategory(param1:IGameObject) : ItemCategoryEnum;
function getViewCategory(param1:IGameObject) : ItemViewCategoryEnum;
function getName(param1:IGameObject) : String;
function getDescription(param1:IGameObject) : String;
function getModificationIndex(param1:IGameObject) : int;
function getModifications(param1:IGameObject) : Vector.<IGameObject>;
function getModificationsCount(param1:IGameObject) : int;
function getPrice(param1:IGameObject) : int;
function getDiscount(param1:IGameObject) : int;
function getEndDiscountTimer(param1:IGameObject) : CountDownTimer;
function getPriceWithoutDiscount(param1:IGameObject) : int;
function isBuyable(param1:IGameObject) : Boolean;
function getProperties(param1:IGameObject) : Vector.<ItemPropertyValue>;
function getPropertiesForInfoWindow(param1:IGameObject) : Vector.<ItemPropertyValue>;
function getUpgradableItemParams(param1:IGameObject) : UpgradableItemParams;
function getCurrentValue(param1:IGameObject, param2:ItemPropertyValue) : String;
function isUpgradableItem(param1:IGameObject) : Boolean;
function getMinRankIndex(param1:IGameObject) : int;
function getMaxRankIndex(param1:IGameObject) : int;
function getPosition(param1:IGameObject) : int;
function getNextModification(param1:IGameObject) : IGameObject;
function hasNextModification(param1:IGameObject) : Boolean;
function getPreviousModification(param1:IGameObject) : IGameObject;
function getCount(param1:IGameObject) : int;
function setCount(param1:IGameObject, param2:int) : void;
function isCountable(param1:IGameObject) : Boolean;
function isKit(param1:IGameObject) : Boolean;
function isPresent(param1:IGameObject) : Boolean;
function isGrouped(param1:IGameObject) : Boolean;
function getGroup(param1:IGameObject) : int;
function isModificationItem(param1:IGameObject) : Boolean;
function hasItem(param1:IGameObject) : Boolean;
function reset() : void;
function addItem(param1:IGameObject) : void;
function removeItem(param1:IGameObject) : void;
function canBuy(param1:IGameObject) : Boolean;
function addMountableCategories(param1:Vector.<ItemCategoryEnum>) : void;
function isMountable(param1:IGameObject) : Boolean;
function isUpgrading(param1:IGameObject) : Boolean;
function getGarageItemInfo(param1:IGameObject) : GarageItemInfo;
function getMaxUserModificationItem(param1:IGameObject) : IGameObject;
function isMounted(param1:IGameObject) : Boolean;
function mountItem(param1:IGameObject) : void;
function unmountItem(param1:IGameObject) : *;
function isFullUpgraded(param1:IGameObject) : Boolean;
function getTimeLeftInSeconds(param1:IGameObject) : int;
function isEnabledItem(param1:IGameObject) : Boolean;
function isTimelessItem(param1:IGameObject) : Boolean;
function getTimeToStartInSeconds(param1:IGameObject) : int;
function getMaxAvailableOrNextNotAvailableModification(param1:IGameObject) : IGameObject;
function getMaxAvailableModification(param1:IGameObject) : IGameObject;
function isPremiumItem(param1:IGameObject) : Boolean;
function isGivenPresent(param1:IGameObject) : Boolean;
function getUserItemByClass(param1:IGameClass) : IGameObject;
function getMountedItemsByCategory(param1:ItemCategoryEnum) : Vector.<IGameObject>;
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.battlefield.mine {
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.Float;
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.battle.battlefield.mine.BattleMine;
import projects.tanks.client.battlefield.models.battle.battlefield.mine.BattleMineCC;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class CodecBattleMineCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_activateSound:ICodec;
private var codec_activateTimeMsec:ICodec;
private var codec_battleMines:ICodec;
private var codec_blueMineTexture:ICodec;
private var codec_deactivateSound:ICodec;
private var codec_enemyMineTexture:ICodec;
private var codec_explosionMarkTexture:ICodec;
private var codec_explosionSound:ICodec;
private var codec_farVisibilityRadius:ICodec;
private var codec_friendlyMineTexture:ICodec;
private var codec_idleExplosionTexture:ICodec;
private var codec_impactForce:ICodec;
private var codec_mainExplosionTexture:ICodec;
private var codec_minDistanceFromBase:ICodec;
private var codec_model3ds:ICodec;
private var codec_nearVisibilityRadius:ICodec;
private var codec_radius:ICodec;
private var codec_redMineTexture:ICodec;
public function CodecBattleMineCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_activateSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_activateTimeMsec = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_battleMines = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleMine,false),false,1));
this.codec_blueMineTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_deactivateSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_enemyMineTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_explosionMarkTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_explosionSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_farVisibilityRadius = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_friendlyMineTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_idleExplosionTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_impactForce = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_mainExplosionTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_minDistanceFromBase = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_model3ds = param1.getCodec(new TypeCodecInfo(Tanks3DSResource,false));
this.codec_nearVisibilityRadius = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_radius = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_redMineTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BattleMineCC = new BattleMineCC();
local2.activateSound = this.codec_activateSound.decode(param1) as SoundResource;
local2.activateTimeMsec = this.codec_activateTimeMsec.decode(param1) as int;
local2.battleMines = this.codec_battleMines.decode(param1) as Vector.<BattleMine>;
local2.blueMineTexture = this.codec_blueMineTexture.decode(param1) as TextureResource;
local2.deactivateSound = this.codec_deactivateSound.decode(param1) as SoundResource;
local2.enemyMineTexture = this.codec_enemyMineTexture.decode(param1) as TextureResource;
local2.explosionMarkTexture = this.codec_explosionMarkTexture.decode(param1) as TextureResource;
local2.explosionSound = this.codec_explosionSound.decode(param1) as SoundResource;
local2.farVisibilityRadius = this.codec_farVisibilityRadius.decode(param1) as Number;
local2.friendlyMineTexture = this.codec_friendlyMineTexture.decode(param1) as TextureResource;
local2.idleExplosionTexture = this.codec_idleExplosionTexture.decode(param1) as MultiframeTextureResource;
local2.impactForce = this.codec_impactForce.decode(param1) as Number;
local2.mainExplosionTexture = this.codec_mainExplosionTexture.decode(param1) as MultiframeTextureResource;
local2.minDistanceFromBase = this.codec_minDistanceFromBase.decode(param1) as Number;
local2.model3ds = this.codec_model3ds.decode(param1) as Tanks3DSResource;
local2.nearVisibilityRadius = this.codec_nearVisibilityRadius.decode(param1) as Number;
local2.radius = this.codec_radius.decode(param1) as Number;
local2.redMineTexture = this.codec_redMineTexture.decode(param1) as TextureResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:BattleMineCC = BattleMineCC(param2);
this.codec_activateSound.encode(param1,local3.activateSound);
this.codec_activateTimeMsec.encode(param1,local3.activateTimeMsec);
this.codec_battleMines.encode(param1,local3.battleMines);
this.codec_blueMineTexture.encode(param1,local3.blueMineTexture);
this.codec_deactivateSound.encode(param1,local3.deactivateSound);
this.codec_enemyMineTexture.encode(param1,local3.enemyMineTexture);
this.codec_explosionMarkTexture.encode(param1,local3.explosionMarkTexture);
this.codec_explosionSound.encode(param1,local3.explosionSound);
this.codec_farVisibilityRadius.encode(param1,local3.farVisibilityRadius);
this.codec_friendlyMineTexture.encode(param1,local3.friendlyMineTexture);
this.codec_idleExplosionTexture.encode(param1,local3.idleExplosionTexture);
this.codec_impactForce.encode(param1,local3.impactForce);
this.codec_mainExplosionTexture.encode(param1,local3.mainExplosionTexture);
this.codec_minDistanceFromBase.encode(param1,local3.minDistanceFromBase);
this.codec_model3ds.encode(param1,local3.model3ds);
this.codec_nearVisibilityRadius.encode(param1,local3.nearVisibilityRadius);
this.codec_radius.encode(param1,local3.radius);
this.codec_redMineTexture.encode(param1,local3.redMineTexture);
}
}
}
|
package alternativa.tanks.models.battle.battlefield {
import alternativa.tanks.battle.BattleRunnerProvider;
import alternativa.tanks.battle.LogicUnit;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventListener;
import alternativa.tanks.battle.events.BattleFinishEvent;
import flash.utils.getTimer;
public class TimeStatisticsTimer extends BattleRunnerProvider implements LogicUnit, BattleEventListener {
private static const DELAY:int = 60000;
private var battleEventsDispatcher:BattleEventDispatcher;
private var startTime:int;
public function TimeStatisticsTimer(param1:BattleEventDispatcher) {
super();
this.battleEventsDispatcher = param1;
}
public function start() : void {
this.battleEventsDispatcher.addBattleEventListener(BattleFinishEvent,this);
this.battleEventsDispatcher.addBattleEventListener(BattleUnloadEvent,this);
this.startTime = getTimer();
getBattleRunner().addLogicUnit(this);
}
public function handleBattleEvent(param1:Object) : void {
this.destroy();
}
public function runLogic(param1:int, param2:int) : void {
if(param1 - this.startTime > DELAY) {
this.battleEventsDispatcher.dispatchEvent(new TimeStatisticsTimerEvent());
this.destroy();
}
}
private function destroy() : void {
getBattleRunner().removeLogicUnit(this);
this.battleEventsDispatcher.removeBattleEventListener(BattleFinishEvent,this);
this.battleEventsDispatcher.removeBattleEventListener(BattleUnloadEvent,this);
}
}
}
|
package alternativa.tanks.models.battle.assault {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.models.battle.battlefield.BattleUserInfoService;
import alternativa.tanks.models.battle.ctf.FlagMessage;
import alternativa.tanks.models.battle.ctf.MessageColor;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class AssaultMessages {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var userInfoService:BattleUserInfoService;
private var spectatorMessage:FlagMessage;
private var redTeamMessage:FlagMessage;
private var blueTeamMessage:FlagMessage;
public function AssaultMessages() {
super();
this.initMessages();
}
private function initMessages() : void {
var local1:String = localeService.getText(TanksLocale.TEXT_ASSAULT_DELIVER_FLAG);
this.redTeamMessage = new FlagMessage(local1,MessageColor.POSITIVE);
this.blueTeamMessage = new FlagMessage(local1,MessageColor.NEGATIVE);
this.spectatorMessage = new FlagMessage(local1,MessageColor.WHITE);
}
public function getMessage(param1:BattleTeam) : FlagMessage {
switch(param1) {
case BattleTeam.RED:
return this.redTeamMessage;
case BattleTeam.BLUE:
return this.blueTeamMessage;
default:
return this.spectatorMessage;
}
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapCenterTopTableKit.png")]
public class ItemInfoPanelBitmaps_bitmapCenterTopTableKit extends BitmapAsset {
public function ItemInfoPanelBitmaps_bitmapCenterTopTableKit() {
super();
}
}
}
|
package alternativa.tanks.bonuses {
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.scene3d.Renderer;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
public class ParachuteDetachAnimation extends PooledObject implements Renderer {
[Inject]
public static var battleService:BattleService;
private static const ALPHA_SPEED:Number = 0.001;
private static const XY_SCALE_SPEED:Number = 1 / 4000;
private static const Z_SCALE_SPEED:Number = 1 / 3000;
private var parachute:Parachute;
private var cords:Cords;
private var fallSpeed:Number;
public function ParachuteDetachAnimation(param1:Pool) {
super(param1);
}
public function start(param1:Parachute, param2:Cords, param3:Number) : void {
this.parachute = param1;
this.cords = param2;
this.fallSpeed = param3 / 1000;
battleService.getBattleScene3D().addRenderer(this,0);
}
public function render(param1:int, param2:int) : void {
var local3:Number = NaN;
this.parachute.setAlpha(this.parachute.getAlpha() - ALPHA_SPEED * param2);
if(this.parachute.getAlpha() <= 0) {
this.destroy();
} else {
this.cords.setAlpha(this.parachute.getAlpha());
this.parachute.addZ(-this.fallSpeed * param2);
local3 = param2 * XY_SCALE_SPEED;
this.parachute.addScaleXY(local3);
this.parachute.addScaleZ(-param2 * Z_SCALE_SPEED);
this.cords.updateVertices();
}
}
private function destroy() : void {
battleService.getBattleScene3D().removeRenderer(this,0);
this.parachute.removeFromScene();
this.cords.removeFromScene();
this.parachute.recycle();
this.parachute = null;
this.cords.recycle();
this.cords = null;
recycle();
}
}
}
|
package _codec.projects.tanks.client.panel.model.abonements {
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.abonements.ShopAbonementData;
public class VectorCodecShopAbonementDataLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecShopAbonementDataLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ShopAbonementData,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.<ShopAbonementData> = new Vector.<ShopAbonementData>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ShopAbonementData(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ShopAbonementData = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ShopAbonementData> = Vector.<ShopAbonementData>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.model.challenge.battlepass.notifier {
import flash.events.IEventDispatcher;
public interface BattlePassPurchaseService extends IEventDispatcher {
function isPurchased() : Boolean;
function setState(param1:Boolean) : void;
}
}
|
package projects.tanks.client.panel.model.payment.modes.paygarden {
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public interface IPayGardenPaymentModelBase {
function receiveUrl(param1:PaymentRequestUrl) : void;
}
}
|
package mx.core
{
import flash.display.MovieClip;
import mx.utils.NameUtil;
use namespace mx_internal;
public class FlexMovieClip extends MovieClip
{
mx_internal static const VERSION:String = "4.6.0.23201";
public function FlexMovieClip()
{
super();
try
{
name = NameUtil.createUniqueName(this);
}
catch(e:Error)
{
}
}
override public function toString() : String
{
return NameUtil.displayObjectToString(this);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.thunder {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class ThunderShootSFXModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ThunderShootSFXModelServer;
private var client:IThunderShootSFXModelBase = IThunderShootSFXModelBase(this);
private var modelId:Long = Long.getLong(1907120794,-320511521);
public function ThunderShootSFXModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ThunderShootSFXModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ThunderShootSFXCC,false)));
}
protected function getInitParam() : ThunderShootSFXCC {
return ThunderShootSFXCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.view {
import alternativa.tanks.controller.events.CaptchaUpdatedEvent;
import org.robotlegs.mvcs.Mediator;
import projects.tanks.clients.flash.commons.models.captcha.CaptchaSection;
public class CaptchaSectionMediator extends Mediator {
[Inject]
public var view:CaptchaSection;
public function CaptchaSectionMediator() {
super();
}
override public function onRegister() : void {
addContextListener(CaptchaUpdatedEvent.LOGIN_FORM_CAPTCHA_UPDATED,this.onCaptchaUpdated);
addContextListener(CaptchaUpdatedEvent.REGISTRATION_FORM_CAPTCHA_UPDATED,this.onCaptchaUpdated);
addContextListener(CaptchaUpdatedEvent.STAND_ALONE_CAPTCHA_UPDATED,this.onCaptchaUpdated);
addContextListener(CaptchaUpdatedEvent.RESTORE_PASSWORD_FORM_CAPTCHA_UPDATED,this.onCaptchaUpdated);
addContextListener(CaptchaUpdatedEvent.EMAIL_CHANGE_HASH_CAPTCHA_UPDATED,this.onCaptchaUpdated);
}
private function onCaptchaUpdated(param1:CaptchaUpdatedEvent) : void {
this.view.captcha = param1.image;
}
}
}
|
package alternativa.tanks.models.battle.gui.inventory {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_armorGrayIconClass.png")]
public class HudInventoryIcon_armorGrayIconClass extends BitmapAsset {
public function HudInventoryIcon_armorGrayIconClass() {
super();
}
}
}
|
package alternativa.tanks.view.battlelist.battleitem {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlelist.battleitem.BattleItemIcon_ctfGreyClass.png")]
public class BattleItemIcon_ctfGreyClass extends BitmapAsset {
public function BattleItemIcon_ctfGreyClass() {
super();
}
}
}
|
package alternativa.network.command
{
public class ControlCommand
{
public static const HASH_REQUEST:int = 1;
public static const HASH_RESPONCE:int = 2;
public static const HASH_ACCEPT:int = 4;
public static const OPEN_SPACE:int = 3;
public static const LOAD_RESOURCES:int = 5;
public static const RESOURCES_LOADED:int = 7;
public static const UNLOAD_CLASSES_AND_RESOURCES:int = 6;
public static const LOAD_CLASSES:int = 12;
public static const CLASSES_LOADED:int = 13;
public static const LOG:int = 8;
public static const SERVER_MESSAGE:int = 11;
public static const COMMAND_REQUEST:int = 9;
public static const COMMAND_RESPONCE:int = 10;
public var id:int;
public var name:String;
public var params:Array;
public function ControlCommand(id:int, name:String, params:Array)
{
super();
this.id = id;
this.name = name;
this.params = params;
}
public function toString() : String
{
return "[ControlCommand id: " + this.id + " name: " + this.name + "]";
}
}
}
|
package alternativa.tanks.models.weapon.artillery {
import alternativa.tanks.models.weapon.splash.Splash;
import alternativa.tanks.models.weapons.charging.DummyWeaponChargingCommunication;
import alternativa.tanks.models.weapons.charging.WeaponChargingCommunication;
import alternativa.tanks.models.weapons.shell.ShellWeaponObject;
import platform.client.fp10.core.type.IGameObject;
public class ArtilleryObject extends ShellWeaponObject {
public function ArtilleryObject(param1:IGameObject) {
super(param1);
}
public function splash() : Splash {
return Splash(object.adapt(Splash));
}
public function charging() : WeaponChargingCommunication {
if(remote) {
return DummyWeaponChargingCommunication.INSTANCE;
}
return WeaponChargingCommunication(object.adapt(WeaponChargingCommunication));
}
}
}
|
package projects.tanks.client.battlefield.models.user.resistance {
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class TankResistance {
private var _resistanceInPercent:int;
private var _resistanceProperty:ItemProperty;
public function TankResistance(param1:int = 0, param2:ItemProperty = null) {
super();
this._resistanceInPercent = param1;
this._resistanceProperty = param2;
}
public function get resistanceInPercent() : int {
return this._resistanceInPercent;
}
public function set resistanceInPercent(param1:int) : void {
this._resistanceInPercent = param1;
}
public function get resistanceProperty() : ItemProperty {
return this._resistanceProperty;
}
public function set resistanceProperty(param1:ItemProperty) : void {
this._resistanceProperty = param1;
}
public function toString() : String {
var local1:String = "TankResistance [";
local1 += "resistanceInPercent = " + this.resistanceInPercent + " ";
local1 += "resistanceProperty = " + this.resistanceProperty + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.weapon.laser {
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.tank.ITankModel;
import alternativa.tanks.models.tank.LocalTankInfoService;
import alternativa.tanks.models.tank.TankPartReset;
import alternativa.tanks.models.tank.ultimate.hunter.stun.UltimateStunListener;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.impl.NotLoadedGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.laser.ILaserPointerModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.laser.LaserPointerModelBase;
import projects.tanks.client.battlefield.types.Vector3d;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
[ModelInfo]
public class LaserPointerModel extends LaserPointerModelBase implements LaserPointer, ILaserPointerModelBase, TankPartReset, UltimateStunListener {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var localTankInfoService:LocalTankInfoService;
public function LaserPointerModel() {
super();
}
[Obfuscation(rename="false")]
public function updateRemoteDirection(param1:Number) : void {
if(!isNaN(param1)) {
this.doUpdateLaserDirection(param1);
}
}
[Obfuscation(rename="false")]
public function aimRemoteAtTank(param1:IGameObject, param2:Vector3d) : void {
if(param1 == null || BattleUtils.isVector3dNaN(param2) || param1 is NotLoadedGameObject) {
return;
}
var local3:ITankModel = ITankModel(param1.adapt(ITankModel));
this.doAimAtTank(local3.getTank(),BattleUtils.getVector3(param2));
}
[Obfuscation(rename="false")]
public function hideRemote() : void {
this.doHideLaser();
}
public function updateDirection(param1:Vector3) : void {
var local2:Matrix3 = BattleUtils.tmpMatrix3;
local2.setRotationMatrixForObject3D(localTankInfoService.getLocalTank().getTurret3D());
var local3:Vector3 = BattleUtils.tmpVector;
local2.getUp(local3);
var local4:Number = local3.dot(param1);
if(this.doUpdateLaserDirection(local4)) {
server.updateDirection(local4);
}
}
public function aimAtTank(param1:Tank, param2:Vector3) : void {
if(this.doAimAtTank(param1,param2)) {
server.aimAtTank(param1.getUser(),BattleUtils.getVector3d(param2));
}
}
public function hideLaser() : void {
if(this.doHideLaser() && this.isLocalWeapon()) {
server.hide();
}
}
private function isLocalWeapon() : Boolean {
var local1:Tank = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank();
return localTankInfoService.getLocalTankObject() == local1.user;
}
public function doUpdateLaserDirection(param1:Number) : Boolean {
this.showLaserIfNeed();
var local2:LaserPointerEffect = LaserPointerEffect(getData(LaserPointerEffect));
return local2.updateDirection(param1);
}
private function doAimAtTank(param1:Tank, param2:Vector3) : Boolean {
this.showLaserIfNeed();
var local3:LaserPointerEffect = LaserPointerEffect(getData(LaserPointerEffect));
return local3.aimAtTank(param1,param2);
}
private function showLaserIfNeed() : void {
var local1:LaserPointerEffect = this.getOrCreateLaser();
if(local1.isVisible()) {
return;
}
var local2:Tank = this.getTank();
var local3:Boolean = Boolean(ITankModel(local2.getUser().adapt(ITankModel)).isLocal());
if(local3 && !getInitParam().locallyVisible) {
local1.markAsVisible();
return;
}
local1.show(this.getColorForTeam(local2.teamType));
}
private function getOrCreateLaser() : LaserPointerEffect {
var local1:LaserPointerEffect = LaserPointerEffect(getData(LaserPointerEffect));
if(local1 == null) {
local1 = new LaserPointerEffect(getInitParam().fadeInTimeMs,this.getTank());
putData(LaserPointerEffect,local1);
}
return local1;
}
public function resetTankPart(param1:Tank) : void {
this.getOrCreateLaser().reset(param1);
}
private function getTank() : Tank {
return IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank();
}
private function doHideLaser() : Boolean {
var local1:LaserPointerEffect = LaserPointerEffect(getData(LaserPointerEffect));
if(Boolean(local1) && local1.isVisible()) {
local1.hide();
return true;
}
return false;
}
private function getColorForTeam(param1:BattleTeam) : uint {
switch(param1) {
case BattleTeam.BLUE:
return this.getLaserPointerBlueColor();
case BattleTeam.RED:
return this.getLaserPointerRedColor();
default:
return this.getLaserPointerRedColor();
}
}
public function getLaserPointerBlueColor() : uint {
return uint(getInitParam().laserPointerBlueColor);
}
public function getLaserPointerRedColor() : uint {
return uint(getInitParam().laserPointerRedColor);
}
public function onStun(param1:Tank, param2:Boolean) : void {
this.doHideLaser();
}
public function onCalm(param1:Tank, param2:Boolean, param3:int) : void {
}
}
}
|
package alternativa.tanks.model.payment.shop.premium {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PremiumPackageAdapt implements PremiumPackage {
private var object:IGameObject;
private var impl:PremiumPackage;
public function PremiumPackageAdapt(param1:IGameObject, param2:PremiumPackage) {
super();
this.object = param1;
this.impl = param2;
}
public function getDurationInDays() : int {
var result:int = 0;
try {
Model.object = this.object;
result = int(this.impl.getDurationInDays());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.garage.models.garagepreview {
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class GaragePreviewModelCC {
private var _cameraAltitude:Number;
private var _cameraDistance:Number;
private var _cameraFov:Number;
private var _cameraPitch:Number;
private var _garageBox:Tanks3DSResource;
private var _hasBatteries:Boolean;
private var _skyboxFrontSide:TextureResource;
public function GaragePreviewModelCC(param1:Number = 0, param2:Number = 0, param3:Number = 0, param4:Number = 0, param5:Tanks3DSResource = null, param6:Boolean = false, param7:TextureResource = null) {
super();
this._cameraAltitude = param1;
this._cameraDistance = param2;
this._cameraFov = param3;
this._cameraPitch = param4;
this._garageBox = param5;
this._hasBatteries = param6;
this._skyboxFrontSide = param7;
}
public function get cameraAltitude() : Number {
return this._cameraAltitude;
}
public function set cameraAltitude(param1:Number) : void {
this._cameraAltitude = param1;
}
public function get cameraDistance() : Number {
return this._cameraDistance;
}
public function set cameraDistance(param1:Number) : void {
this._cameraDistance = param1;
}
public function get cameraFov() : Number {
return this._cameraFov;
}
public function set cameraFov(param1:Number) : void {
this._cameraFov = param1;
}
public function get cameraPitch() : Number {
return this._cameraPitch;
}
public function set cameraPitch(param1:Number) : void {
this._cameraPitch = param1;
}
public function get garageBox() : Tanks3DSResource {
return this._garageBox;
}
public function set garageBox(param1:Tanks3DSResource) : void {
this._garageBox = param1;
}
public function get hasBatteries() : Boolean {
return this._hasBatteries;
}
public function set hasBatteries(param1:Boolean) : void {
this._hasBatteries = param1;
}
public function get skyboxFrontSide() : TextureResource {
return this._skyboxFrontSide;
}
public function set skyboxFrontSide(param1:TextureResource) : void {
this._skyboxFrontSide = param1;
}
public function toString() : String {
var local1:String = "GaragePreviewModelCC [";
local1 += "cameraAltitude = " + this.cameraAltitude + " ";
local1 += "cameraDistance = " + this.cameraDistance + " ";
local1 += "cameraFov = " + this.cameraFov + " ";
local1 += "cameraPitch = " + this.cameraPitch + " ";
local1 += "garageBox = " + this.garageBox + " ";
local1 += "hasBatteries = " + this.hasBatteries + " ";
local1 += "skyboxFrontSide = " + this.skyboxFrontSide + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.battlefield.effects.levelup.rangs
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class BigRangIcon_rang_16 extends BitmapAsset
{
public function BigRangIcon_rang_16()
{
super();
}
}
}
|
package forms.events {
import flash.events.Event;
public class SliderEvent extends Event {
public static const CHANGE_VALUE:String = "SliderChangeValue";
public var currentValue:Number;
public function SliderEvent(param1:Number) {
this.currentValue = param1;
super(CHANGE_VALUE,true);
}
}
}
|
package alternativa.protocol {
public interface ICodecInfo {
function isOptional() : Boolean;
function toString() : String;
}
}
|
package projects.tanks.client.panel.model.shop.price {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class ShopItemModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ShopItemModelServer;
private var client:IShopItemModelBase = IShopItemModelBase(this);
private var modelId:Long = Long.getLong(161357642,1750616196);
public function ShopItemModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ShopItemModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ShopItemCC,false)));
}
protected function getInitParam() : ShopItemCC {
return ShopItemCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.notifier.battle {
import alternativa.types.Long;
import flash.events.IEventDispatcher;
import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.battle.BattleLinkData;
public interface IBattleNotifierService extends IEventDispatcher {
function setBattle(param1:Vector.<BattleLinkData>) : void;
function leaveBattle(param1:Long) : void;
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.jgr.killstreak {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.battle.jgr.killstreak.KillStreakItem;
public class VectorCodecKillStreakItemLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecKillStreakItemLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(KillStreakItem,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.<KillStreakItem> = new Vector.<KillStreakItem>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = KillStreakItem(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:KillStreakItem = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<KillStreakItem> = Vector.<KillStreakItem>(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.osgi.service.display {
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.display.Stage;
public class Display implements IDisplay {
private var _stage:Stage;
private var _mainContainer:DisplayObjectContainer;
private var _backgroundLayer:DisplayObjectContainer;
private var _contentLayer:DisplayObjectContainer;
private var _contentUILayer:DisplayObjectContainer;
private var _systemLayer:DisplayObjectContainer;
private var _systemUILayer:DisplayObjectContainer;
private var _dialogsLayer:DisplayObjectContainer;
private var _loaderLayer:DisplayObjectContainer;
private var _noticesLayer:DisplayObjectContainer;
private var _cursorLayer:DisplayObjectContainer;
public function Display(param1:DisplayObjectContainer) {
super();
this._stage = param1.stage;
this._mainContainer = param1;
this._backgroundLayer = this.addLayerSprite();
this._contentLayer = this.addLayerSprite();
this._contentUILayer = this.addLayerSprite();
this._systemLayer = this.addLayerSprite();
this._systemUILayer = this.addLayerSprite();
this._dialogsLayer = this.addLayerSprite();
this._loaderLayer = this.addLayerSprite();
this._noticesLayer = this.addLayerSprite();
this._cursorLayer = this.addLayerSprite();
}
private function addLayerSprite() : Sprite {
var local1:Sprite = new Sprite();
local1.mouseEnabled = false;
local1.tabEnabled = false;
this._mainContainer.addChild(local1);
return local1;
}
public function get stage() : Stage {
return this._stage;
}
public function get mainContainer() : DisplayObjectContainer {
return this._mainContainer;
}
public function get backgroundLayer() : DisplayObjectContainer {
return this._backgroundLayer;
}
public function get contentLayer() : DisplayObjectContainer {
return this._contentLayer;
}
public function get contentUILayer() : DisplayObjectContainer {
return this._contentUILayer;
}
public function get systemLayer() : DisplayObjectContainer {
return this._systemLayer;
}
public function get systemUILayer() : DisplayObjectContainer {
return this._systemUILayer;
}
public function get dialogsLayer() : DisplayObjectContainer {
return this._dialogsLayer;
}
public function get loaderLayer() : DisplayObjectContainer {
return this._loaderLayer;
}
public function get noticesLayer() : DisplayObjectContainer {
return this._noticesLayer;
}
public function get cursorLayer() : DisplayObjectContainer {
return this._cursorLayer;
}
}
}
|
package alternativa.tanks.gui.clanmanagement {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.clanmanagement.ClanStateButton_ButtonOverLeft.png")]
public class ClanStateButton_ButtonOverLeft extends BitmapAsset {
public function ClanStateButton_ButtonOverLeft() {
super();
}
}
}
|
package alternativa.tanks.models.battlefield.event
{
import alternativa.tanks.models.battlefield.common.MessageLine;
import flash.events.Event;
public class ChatOutputLineEvent extends Event
{
public static const KILL_ME:String = "KillMe";
private var _line:MessageLine;
public function ChatOutputLineEvent(type:String, line:MessageLine)
{
super(type,false,false);
this._line = line;
}
public function get line() : MessageLine
{
return this._line;
}
}
}
|
package projects.tanks.client.battleservice.model.battle.tdm {
public interface IBattleTDMModelBase {
}
}
|
package _codec.projects.tanks.client.panel.model.payment.types {
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 projects.tanks.client.panel.model.payment.modes.PaymentRequestVariable;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public class CodecPaymentRequestUrl implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_encodeParameters:ICodec;
private var codec_getRequest:ICodec;
private var codec_host:ICodec;
private var codec_parameters:ICodec;
public function CodecPaymentRequestUrl() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_encodeParameters = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_getRequest = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_host = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_parameters = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(PaymentRequestVariable,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:PaymentRequestUrl = new PaymentRequestUrl();
local2.encodeParameters = this.codec_encodeParameters.decode(param1) as Boolean;
local2.getRequest = this.codec_getRequest.decode(param1) as Boolean;
local2.host = this.codec_host.decode(param1) as String;
local2.parameters = this.codec_parameters.decode(param1) as Vector.<PaymentRequestVariable>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:PaymentRequestUrl = PaymentRequestUrl(param2);
this.codec_encodeParameters.encode(param1,local3.encodeParameters);
this.codec_getRequest.encode(param1,local3.getRequest);
this.codec_host.encode(param1,local3.host);
this.codec_parameters.encode(param1,local3.parameters);
}
}
}
|
package projects.tanks.client.panel.model.battlepass.purchasenotifier {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class BattlePassPurchaseNotifierModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BattlePassPurchaseNotifierModelServer;
private var client:IBattlePassPurchaseNotifierModelBase = IBattlePassPurchaseNotifierModelBase(this);
private var modelId:Long = Long.getLong(664877248,-2049851574);
private var _battlePassPurchasedId:Long = Long.getLong(427104330,1176974801);
public function BattlePassPurchaseNotifierModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BattlePassPurchaseNotifierModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(BattlePassPurchaseNotifierCC,false)));
}
protected function getInitParam() : BattlePassPurchaseNotifierCC {
return BattlePassPurchaseNotifierCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._battlePassPurchasedId:
this.client.battlePassPurchased();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.engine3d
{
import alternativa.engine3d.materials.TextureMaterial;
public class TextureAnimation
{
public var material:TextureMaterial;
public var frames:Vector.<UVFrame>;
public var fps:Number;
public function TextureAnimation(param1:TextureMaterial, param2:Vector.<UVFrame>, param3:Number = 0)
{
super();
this.material = param1;
this.frames = param2;
this.fps = param3;
}
}
}
|
package alternativa.tanks.model.item.upgradable {
import controls.timer.CountDownTimer;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class UpgradableItemEvents implements UpgradableItem {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function UpgradableItemEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getUpgradableItem() : UpgradableItemParams {
var result:UpgradableItemParams = null;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = m.getUpgradableItem();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getUpgradableProperties() : Vector.<UpgradableItemPropertyValue> {
var result:Vector.<UpgradableItemPropertyValue> = null;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = m.getUpgradableProperties();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getVisibleUpgradableProperties() : Vector.<UpgradableItemPropertyValue> {
var result:Vector.<UpgradableItemPropertyValue> = null;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = m.getVisibleUpgradableProperties();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function isUpgrading() : Boolean {
var result:Boolean = false;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = Boolean(m.isUpgrading());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function speedUp() : void {
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
m.speedUp();
i++;
}
}
finally {
Model.popObject();
}
}
public function getCountDownTimer() : CountDownTimer {
var result:CountDownTimer = null;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = m.getCountDownTimer();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function traceUpgrades() : void {
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
m.traceUpgrades();
i++;
}
}
finally {
Model.popObject();
}
}
public function hasUpgradeDiscount() : Boolean {
var result:Boolean = false;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = Boolean(m.hasUpgradeDiscount());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function hasSpeedUpDiscount() : Boolean {
var result:Boolean = false;
var i:int = 0;
var m:UpgradableItem = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = UpgradableItem(this.impl[i]);
result = Boolean(m.hasSpeedUpDiscount());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.storage {
import flash.net.SharedObject;
public interface IStorageService {
function getStorage() : SharedObject;
function getAccountsStorage() : SharedObject;
}
}
|
package alternativa.gfx.agal
{
public class VertexShader extends Shader
{
public static const va0:CommonRegister = new CommonRegister(0,0);
public static const va1:CommonRegister = new CommonRegister(1,0);
public static const va2:CommonRegister = new CommonRegister(2,0);
public static const va3:CommonRegister = new CommonRegister(3,0);
public static const va4:CommonRegister = new CommonRegister(4,0);
public static const va5:CommonRegister = new CommonRegister(5,0);
public static const va6:CommonRegister = new CommonRegister(6,0);
public static const va7:CommonRegister = new CommonRegister(7,0);
public static const vt0:CommonRegister = new CommonRegister(0,2);
public static const vt1:CommonRegister = new CommonRegister(1,2);
public static const vt2:CommonRegister = new CommonRegister(2,2);
public static const vt3:CommonRegister = new CommonRegister(3,2);
public static const vt4:CommonRegister = new CommonRegister(4,2);
public static const vt5:CommonRegister = new CommonRegister(5,2);
public static const vt6:CommonRegister = new CommonRegister(6,2);
public static const vt7:CommonRegister = new CommonRegister(7,2);
public static const vc:Vector.<CommonRegister> = getConsts();
public static const op:CommonRegister = new CommonRegister(0,3);
public function VertexShader()
{
super();
data.writeByte(0);
}
private static function getConsts() : Vector.<CommonRegister>
{
var _loc1_:Vector.<CommonRegister> = new Vector.<CommonRegister>();
var _loc2_:int = 0;
while(_loc2_ < 127)
{
_loc1_[_loc2_] = new CommonRegister(_loc2_,1);
_loc2_++;
}
return _loc1_;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.flag {
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 projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlagFlyingData;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.FlagFlyPoint;
public class CodecClientFlagFlyingData implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_currentTime:ICodec;
private var codec_falling:ICodec;
private var codec_points:ICodec;
public function CodecClientFlagFlyingData() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_currentTime = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_falling = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_points = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(FlagFlyPoint,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ClientFlagFlyingData = new ClientFlagFlyingData();
local2.currentTime = this.codec_currentTime.decode(param1) as int;
local2.falling = this.codec_falling.decode(param1) as Boolean;
local2.points = this.codec_points.decode(param1) as Vector.<FlagFlyPoint>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:ClientFlagFlyingData = ClientFlagFlyingData(param2);
this.codec_currentTime.encode(param1,local3.currentTime);
this.codec_falling.encode(param1,local3.falling);
this.codec_points.encode(param1,local3.points);
}
}
}
|
package projects.tanks.client.panel.model.shop.specialkit.view {
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 NewbieKitViewModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:NewbieKitViewModelServer;
private var client:INewbieKitViewModelBase = INewbieKitViewModelBase(this);
private var modelId:Long = Long.getLong(271451623,-874714053);
public function NewbieKitViewModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new NewbieKitViewModelServer(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 _codec.projects.tanks.client.panel.model.challenge.rewarding {
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.challenge.rewarding.Tier;
public class VectorCodecTierLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTierLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(Tier,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.<Tier> = new Vector.<Tier>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = Tier(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:Tier = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<Tier> = Vector.<Tier>(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.partners.impl.odnoklassniki {
public class OdnoklassnikiUrlParams {
public static const API_SERVER:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(0,"API_SERVER");
public static const APICONNECTION:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(1,"APICONNECTION");
public static const APPLICATION_KEY:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(2,"APPLICATION_KEY");
public static const AUTH_SIG:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(3,"AUTH_SIG");
public static const AUTHORIZED:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(4,"AUTHORIZED");
public static const CONTAINER:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(5,"CONTAINER");
public static const CUSTOM_ARGS:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(6,"CUSTOM_ARGS");
public static const FIRST_START:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(7,"FIRST_START");
public static const HEADER_WIDGET:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(8,"HEADER_WIDGET");
public static const LOGGED_USER_ID:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(9,"LOGGED_USER_ID");
public static const REFERER:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(10,"REFERER");
public static const REFPLACE:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(11,"REFPLACE");
public static const SESSION_KEY:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(12,"SESSION_KEY");
public static const SESSION_SECRET_KEY:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(13,"SESSION_SECRET_KEY");
public static const SIG:OdnoklassnikiUrlParams = new OdnoklassnikiUrlParams(14,"SIG");
private var _value:int;
private var _name:String;
public function OdnoklassnikiUrlParams(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<OdnoklassnikiUrlParams> {
var local1:Vector.<OdnoklassnikiUrlParams> = new Vector.<OdnoklassnikiUrlParams>();
local1.push(API_SERVER);
local1.push(APICONNECTION);
local1.push(APPLICATION_KEY);
local1.push(AUTH_SIG);
local1.push(AUTHORIZED);
local1.push(CONTAINER);
local1.push(CUSTOM_ARGS);
local1.push(FIRST_START);
local1.push(HEADER_WIDGET);
local1.push(LOGGED_USER_ID);
local1.push(REFERER);
local1.push(REFPLACE);
local1.push(SESSION_KEY);
local1.push(SESSION_SECRET_KEY);
local1.push(SIG);
return local1;
}
public function toString() : String {
return "OdnoklassnikiUrlParams [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.effects.hornet {
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
public class HornetUltimateCC {
private var _effectEnabled:Boolean;
private var _effectStartSound:SoundResource;
private var _ring:TextureResource;
private var _sonarSound:SoundResource;
public function HornetUltimateCC(param1:Boolean = false, param2:SoundResource = null, param3:TextureResource = null, param4:SoundResource = null) {
super();
this._effectEnabled = param1;
this._effectStartSound = param2;
this._ring = param3;
this._sonarSound = param4;
}
public function get effectEnabled() : Boolean {
return this._effectEnabled;
}
public function set effectEnabled(param1:Boolean) : void {
this._effectEnabled = param1;
}
public function get effectStartSound() : SoundResource {
return this._effectStartSound;
}
public function set effectStartSound(param1:SoundResource) : void {
this._effectStartSound = param1;
}
public function get ring() : TextureResource {
return this._ring;
}
public function set ring(param1:TextureResource) : void {
this._ring = param1;
}
public function get sonarSound() : SoundResource {
return this._sonarSound;
}
public function set sonarSound(param1:SoundResource) : void {
this._sonarSound = param1;
}
public function toString() : String {
var local1:String = "HornetUltimateCC [";
local1 += "effectEnabled = " + this.effectEnabled + " ";
local1 += "effectStartSound = " + this.effectStartSound + " ";
local1 += "ring = " + this.ring + " ";
local1 += "sonarSound = " + this.sonarSound + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.smoke {
public interface IHullSmokeModelBase {
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.address {
import alternativa.osgi.OSGi;
import alternativa.types.Long;
import flash.events.EventDispatcher;
import flash.utils.clearTimeout;
import flash.utils.setTimeout;
import platform.client.fp10.core.service.address.AddressService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.address.events.BattleChangedAddressEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.address.events.TanksAddressEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.servername.ServerNumberToLocaleServerService;
import projects.tanks.clients.fp10.libraries.tanksservices.utils.BattleInfoUtils;
import swfaddress.SWFAddressEvent;
public class TanksAddressServiceImpl extends EventDispatcher implements TanksAddressService {
[Inject]
public static var serverNameService:ServerNumberToLocaleServerService;
[Inject]
public static var addressService:AddressService;
private const DELAY_LISTEN_ADDRESS_CHANGE:int = 1500;
private var currentValue:String;
private var serverName:int;
private var oldServerName:int;
private var battleId:Long;
private var _locked:Boolean = true;
private var timeoutId:uint;
public function TanksAddressServiceImpl() {
super();
var local1:String = AddressService(OSGi.getInstance().getService(AddressService)).getValue();
this.battleId = this.parseBattle(local1);
}
public function hasBattle() : Boolean {
return this.battleId != null;
}
public function getBattleId() : Long {
return this.battleId;
}
public function init(param1:int) : void {
this.oldServerName = this.serverName = param1;
this.locked = false;
}
public function back() : void {
this.serverName = this.oldServerName;
dispatchEvent(new TanksAddressEvent(TanksAddressEvent.BACK));
this.locked = false;
}
public function getServerNumber() : int {
return this.serverName;
}
public function setServer(param1:int) : void {
if(this.locked) {
return;
}
this.setServerByNameAndBattle(param1,null);
this.setParams();
}
private function setServerByNameAndBattle(param1:int, param2:Long) : void {
if(this.serverName == param1) {
this.setBattle(param2);
return;
}
this.serverName = param1;
this.battleId = param2;
this.locked = true;
dispatchEvent(new TanksAddressEvent(TanksAddressEvent.TRY_CHANGE_SERVER));
}
public function setBattle(param1:Long) : void {
if(this.locked) {
return;
}
if(this.battleId == param1) {
return;
}
this.battleId = param1;
dispatchEvent(new BattleChangedAddressEvent(param1));
this.setParams();
}
public function resetBattle() : void {
if(this.locked) {
return;
}
this.battleId = null;
dispatchEvent(new TanksAddressEvent(TanksAddressEvent.BATTLE_RESET));
this.setParams();
}
private function onAddressChange(param1:SWFAddressEvent) : void {
if(this.locked) {
return;
}
this.setServerByNameAndBattle(this.serverName,this.parseBattle(param1.value));
}
private function setParams() : void {
var local1:String = "";
if(this.battleId != null) {
local1 += "battle=" + BattleInfoUtils.getBattleIdUhex(this.battleId);
}
addressService.setValue(local1,false);
this.currentValue = local1;
}
public function parseBattle(param1:String) : Long {
var local2:int = int(param1.indexOf("battle="));
if(local2 != -1) {
return Long.fromHexString(param1.substr(local2 + 7,16));
}
return null;
}
public function get locked() : Boolean {
return this._locked;
}
public function set locked(param1:Boolean) : void {
if(this._locked == param1) {
return;
}
if(param1) {
this.lock();
} else {
this.unlock();
}
}
private function lock() : void {
this._locked = true;
addressService.removeEventListener(SWFAddressEvent.CHANGE,this.onAddressChange);
clearTimeout(this.timeoutId);
}
private function unlock() : void {
this._locked = false;
this.timeoutId = setTimeout(this.listenAddressChange,this.DELAY_LISTEN_ADDRESS_CHANGE);
}
private function listenAddressChange() : void {
addressService.addEventListener(SWFAddressEvent.CHANGE,this.onAddressChange);
var local1:SWFAddressEvent = new SWFAddressEvent(SWFAddressEvent.CHANGE);
this.onAddressChange(local1);
}
}
}
|
package projects.tanks.client.battleservice.model.statistics.team {
import projects.tanks.client.battleservice.model.statistics.UserInfo;
public class StatisticsTeamCC {
private var _blueScore:int;
private var _redScore:int;
private var _usersInfoBlue:Vector.<UserInfo>;
private var _usersInfoRed:Vector.<UserInfo>;
public function StatisticsTeamCC(param1:int = 0, param2:int = 0, param3:Vector.<UserInfo> = null, param4:Vector.<UserInfo> = null) {
super();
this._blueScore = param1;
this._redScore = param2;
this._usersInfoBlue = param3;
this._usersInfoRed = param4;
}
public function get blueScore() : int {
return this._blueScore;
}
public function set blueScore(param1:int) : void {
this._blueScore = param1;
}
public function get redScore() : int {
return this._redScore;
}
public function set redScore(param1:int) : void {
this._redScore = param1;
}
public function get usersInfoBlue() : Vector.<UserInfo> {
return this._usersInfoBlue;
}
public function set usersInfoBlue(param1:Vector.<UserInfo>) : void {
this._usersInfoBlue = param1;
}
public function get usersInfoRed() : Vector.<UserInfo> {
return this._usersInfoRed;
}
public function set usersInfoRed(param1:Vector.<UserInfo>) : void {
this._usersInfoRed = param1;
}
public function toString() : String {
var local1:String = "StatisticsTeamCC [";
local1 += "blueScore = " + this.blueScore + " ";
local1 += "redScore = " + this.redScore + " ";
local1 += "usersInfoBlue = " + this.usersInfoBlue + " ";
local1 += "usersInfoRed = " + this.usersInfoRed + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.controller.events {
import flash.events.Event;
public class InviteCodeEnteredEvent extends Event {
public static const INVITE_ENTERED:String = "INVITE_ENTERED";
private var _inviteCode:String;
public function InviteCodeEnteredEvent(param1:String) {
this._inviteCode = param1;
super(INVITE_ENTERED);
}
public function get inviteCode() : String {
return this._inviteCode;
}
}
}
|
package projects.tanks.client.garage.models.garage.passtoshop {
public interface IPassToShopModelBase {
}
}
|
package alternativa.tanks.model.payment.modes.description {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PayModeBottomDescriptionInternalAdapt implements PayModeBottomDescriptionInternal {
private var object:IGameObject;
private var impl:PayModeBottomDescriptionInternal;
public function PayModeBottomDescriptionInternalAdapt(param1:IGameObject, param2:PayModeBottomDescriptionInternal) {
super();
this.object = param1;
this.impl = param2;
}
public function setEnabled(param1:Boolean) : void {
var enabled:Boolean = param1;
try {
Model.object = this.object;
this.impl.setEnabled(enabled);
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.model.payment.saveprocessed {
public class ProcessedPaymentInfo {
public var payModeId:String;
public var payModeName:String;
public var itemId:String;
public var itemFinalPrice:String;
public var currencyName:String;
public var date:String;
public var time:String;
public function ProcessedPaymentInfo() {
super();
}
}
}
|
package alternativa.tanks.model.info.team {
[ModelInterface]
public interface BattleTeamInfo {
function getUsersCountBlue() : int;
function getUsersCountRed() : int;
}
}
|
package com.reygazu.anticheat.managers
{
import alternativa.init.Main;
import com.reygazu.anticheat.events.CheatManagerEvent;
import flash.display.Stage;
import flash.events.Event;
import flash.events.EventDispatcher;
[Event(name="cheatDetection",type="com.reygazu.anticheat.events.CheatManagerEvent")]
[Event(name="forceHop",type="com.reygazu.anticheat.events.CheatManagerEvent")]
public class CheatManager extends EventDispatcher
{
protected static var _instance:CheatManager;
private var _focusHop:Boolean;
private var _secureVars:Array;
private var stage:Stage;
public function CheatManager(caller:Function = null)
{
super();
if(caller != CheatManager.getInstance)
{
throw new Error("CheatManager is a singleton class, use getInstance() instead");
}
if(CheatManager._instance != null)
{
throw new Error("Only one CheatManager instance should be instantiated");
}
}
public static function getInstance() : CheatManager
{
if(_instance == null)
{
_instance = new CheatManager(arguments.callee);
_instance.init();
}
return _instance;
}
private function init() : void
{
this._secureVars = new Array();
this._focusHop = false;
this.stage = Main.stage;
this.stage.addEventListener(Event.DEACTIVATE,this.onLostFocusHandler);
}
public function set enableFocusHop(value:Boolean) : void
{
this._focusHop = value;
}
private function onLostFocusHandler(evt:Event) : void
{
if(this._focusHop)
{
this.doHop();
}
}
public function doHop() : void
{
trace("* CheatManager : Force Hop Event Dispatched *");
this.dispatchEvent(new CheatManagerEvent(CheatManagerEvent.FORCE_HOP));
}
public function detectCheat(name:String, fakeValue:Object, realValue:Object) : void
{
trace("* CheatManager : cheat detection in " + name + " fake value : " + fakeValue + " != real value " + realValue + " *");
var event:CheatManagerEvent = new CheatManagerEvent(CheatManagerEvent.CHEAT_DETECTION);
event.data = {
"variableName":name,
"fakeValue":fakeValue,
"realValue":realValue
};
CheatManager.getInstance().dispatchEvent(event);
}
}
}
|
package _codec.projects.tanks.client.panel.model.payment.panel {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.payment.panel.PaymentButtonCC;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public class CodecPaymentButtonCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_enabledFullPayment:ICodec;
private var codec_paymentUrl:ICodec;
public function CodecPaymentButtonCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_enabledFullPayment = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_paymentUrl = param1.getCodec(new TypeCodecInfo(PaymentRequestUrl,true));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:PaymentButtonCC = new PaymentButtonCC();
local2.enabledFullPayment = this.codec_enabledFullPayment.decode(param1) as Boolean;
local2.paymentUrl = this.codec_paymentUrl.decode(param1) as PaymentRequestUrl;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:PaymentButtonCC = PaymentButtonCC(param2);
this.codec_enabledFullPayment.encode(param1,local3.enabledFullPayment);
this.codec_paymentUrl.encode(param1,local3.paymentUrl);
}
}
}
|
package alternativa.tanks.models.weapon.thunder {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventSupport;
import alternativa.tanks.battle.events.StateCorrectionEvent;
import alternativa.tanks.battle.events.TankUnloadedEvent;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.models.tank.ITankModel;
import alternativa.tanks.models.tank.ultimate.hunter.stun.UltimateStunListener;
import alternativa.tanks.models.weapon.IWeaponModel;
import alternativa.tanks.models.weapon.WeaponForces;
import alternativa.tanks.models.weapon.WeaponObject;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import alternativa.tanks.models.weapon.common.WeaponBuffListener;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.shared.shot.WeaponReloadTimeChangedListener;
import alternativa.tanks.models.weapon.splash.Splash;
import alternativa.tanks.models.weapon.weakening.DistanceWeakening;
import alternativa.tanks.models.weapon.weakening.IWeaponWeakeningModel;
import alternativa.tanks.models.weapons.targeting.CommonTargetingSystem;
import alternativa.tanks.models.weapons.targeting.TargetingSystem;
import flash.utils.Dictionary;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.thunder.IThunderModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.thunder.ThunderModelBase;
import projects.tanks.client.battlefield.types.Vector3d;
[ModelInfo]
public class ThunderModel extends ThunderModelBase implements IThunderModelBase, IWeaponModel, ThunderCallback, WeaponBuffListener, WeaponReloadTimeChangedListener, UltimateStunListener {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
private static const MAX_DISTANCE:Number = 1000000;
private var weapons:Dictionary = new Dictionary();
private var battleEventSupport:BattleEventSupport;
public function ThunderModel() {
super();
this.battleEventSupport = new BattleEventSupport(battleEventDispatcher);
this.battleEventSupport.addEventHandler(TankUnloadedEvent,this.onTankUnloaded);
this.battleEventSupport.activateHandlers();
}
private static function getCommonData() : WeaponCommonData {
var local1:IWeaponCommonModel = IWeaponCommonModel(object.adapt(IWeaponCommonModel));
return local1.getCommonData();
}
private static function getWeakening() : DistanceWeakening {
var local1:IWeaponWeakeningModel = IWeaponWeakeningModel(object.adapt(IWeaponWeakeningModel));
return local1.getDistanceWeakening();
}
private static function getEffects() : IThunderEffects {
var local1:IThunderSFXModel = IThunderSFXModel(object.adapt(IThunderSFXModel));
return local1.getEffects();
}
public function createLocalWeapon(param1:IGameObject) : Weapon {
var local2:WeaponObject = new WeaponObject(object);
var local3:WeaponCommonData = local2.commonData();
var local4:DistanceWeakening = getWeakening();
var local5:Splash = Splash(object.adapt(Splash));
var local6:IThunderEffects = getEffects();
var local7:TargetingSystem = new CommonTargetingSystem(param1,local2,MAX_DISTANCE);
var local8:WeaponForces = new WeaponForces(local3.getImpactForce(),local3.getRecoilForce());
var local9:Weapon = new ThunderWeapon(local2,local8,local4,local7,local5,local6,ThunderCallback(object.adapt(ThunderCallback)));
this.weapons[param1] = local9;
return local9;
}
public function createRemoteWeapon(param1:IGameObject) : Weapon {
var local2:WeaponCommonData = getCommonData();
var local3:DistanceWeakening = getWeakening();
var local4:IThunderEffects = getEffects();
var local5:Splash = Splash(object.adapt(Splash));
var local6:WeaponForces = new WeaponForces(local2.getImpactForce(),local2.getRecoilForce());
var local7:Weapon = new RemoteThunderWeapon(local6,local3,local5,local4);
this.weapons[param1] = local7;
return local7;
}
private function onTankUnloaded(param1:TankUnloadedEvent) : void {
delete this.weapons[param1.tank.getUser()];
}
[Obfuscation(rename="false")]
public function shoot(param1:IGameObject) : void {
var local2:RemoteThunderWeapon = this.weapons[param1];
if(local2 != null) {
local2.shoot();
}
}
[Obfuscation(rename="false")]
public function shootStatic(param1:IGameObject, param2:Vector3d) : void {
var local3:RemoteThunderWeapon = this.weapons[param1];
if(local3 != null) {
local3.shootStatic(BattleUtils.getVector3(param2));
}
}
[Obfuscation(rename="false")]
public function shootTarget(param1:IGameObject, param2:IGameObject, param3:Vector3d) : void {
var local5:ITankModel = null;
var local6:Tank = null;
var local7:Vector3 = null;
var local4:RemoteThunderWeapon = this.weapons[param1];
if(local4 != null) {
local5 = ITankModel(param2.adapt(ITankModel));
local6 = local5.getTank();
if(local6.getBody() != null) {
local7 = BattleUtils.getVector3(param3);
BattleUtils.localToGlobal(local6.getBody(),local7);
local4.shootTarget(local6,local7);
}
}
}
public function onShot(param1:int) : void {
server.shootCommand(param1);
}
public function onShotStatic(param1:int, param2:Vector3) : void {
this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.shootStaticCommand(param1,BattleUtils.getVector3d(param2));
}
public function onShotTarget(param1:int, param2:Vector3, param3:Body) : void {
var local4:Vector3 = param2.clone();
BattleUtils.globalToLocal(param3,local4);
var local5:Vector3d = BattleUtils.getVector3d(local4);
var local6:Tank = param3.tank;
var local7:int = local6.incarnation;
var local8:Vector3d = BattleUtils.getVector3d(param3.state.position);
this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.shootTargetCommand(param1,local5,local6.getUser(),local7,local8,BattleUtils.getVector3d(param2));
}
private function isLocalWeapon() : Boolean {
var local1:Tank = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank();
return ITankModel(local1.user.adapt(ITankModel)).isLocal();
}
public function weaponReloadTimeChanged(param1:int, param2:int) : void {
var local3:Tank = null;
if(this.isLocalWeapon()) {
local3 = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank();
Weapon(this.weapons[local3.user]).weaponReloadTimeChanged(param1,param2);
}
}
public function weaponBuffStateChanged(param1:IGameObject, param2:Boolean, param3:Number) : void {
var local4:Weapon = this.weapons[param1];
local4.updateRecoilForce(param3);
if(!param2) {
local4.fullyRecharge();
}
}
public function onStun(param1:Tank, param2:Boolean) : void {
if(param2) {
Weapon(this.weapons[param1.user]).stun();
}
}
public function onCalm(param1:Tank, param2:Boolean, param3:int) : void {
if(param2) {
Weapon(this.weapons[param1.user]).calm(param3);
}
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.effects.dictator {
import alternativa.osgi.OSGi;
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 platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import platform.client.fp10.core.type.IGameObject;
public class DictatorUltimateModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:DictatorUltimateModelServer;
private var client:IDictatorUltimateModelBase = IDictatorUltimateModelBase(this);
private var modelId:Long = Long.getLong(1534471818,-1953347155);
private var _showUltimateUsedId:Long = Long.getLong(489471790,-1556831693);
private var _showUltimateUsed_tanksInspiredCodec:ICodec;
public function DictatorUltimateModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new DictatorUltimateModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(DictatorUltimateCC,false)));
this._showUltimateUsed_tanksInspiredCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1));
}
protected function getInitParam() : DictatorUltimateCC {
return DictatorUltimateCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._showUltimateUsedId:
this.client.showUltimateUsed(this._showUltimateUsed_tanksInspiredCodec.decode(param2) as Vector.<IGameObject>);
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist.candidates {
import alternativa.tanks.gui.clanmanagement.clanmemberlist.list.*;
import flash.events.MouseEvent;
public class ClanIncomingListRenderer extends ClanUserListRenderer {
public function ClanIncomingListRenderer() {
super();
}
override public function set data(param1:Object) : void {
item = new ClanIncomingRequestItem(param1.id);
super.data = param1;
}
override protected function onRollOut(param1:MouseEvent) : void {
item.deleteIndicator.visible = false;
item.acceptedIndicator.visible = false;
ClanIncomingRequestItem(item).newIndicator.show();
ClanIncomingRequestItem(item).newIndicator.updateNotifications();
super.onRollOut(param1);
}
override protected function onRollOver(param1:MouseEvent) : void {
item.acceptedIndicator.visible = true;
ClanIncomingRequestItem(item).newIndicator.hide();
ClanIncomingRequestItem(item).newIndicator.updateNotifications();
super.onRollOver(param1);
}
}
}
|
package alternativa.tanks.models.weapon.shaft.cameracontrollers {
import alternativa.math.Matrix3;
import alternativa.math.Quaternion;
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.camera.CameraController;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.shaft.LinearInterpolator;
public class AimingActivationCameraController implements CameraController {
private var weaponPlatform:WeaponPlatform;
private var transitionDuration:Number = 0;
private var transitionTime:Number = 0;
private const initialPosition:Vector3 = new Vector3();
private const currentPosition:Vector3 = new Vector3();
private const initialRotation:Quaternion = new Quaternion();
private const targetRotation:Quaternion = new Quaternion();
private const currentRotation:Quaternion = new Quaternion();
private const currentEulerAngles:Vector3 = new Vector3();
private const gunParams:AllGlobalGunParams = new AllGlobalGunParams();
private var fovInterpolator:LinearInterpolator = new LinearInterpolator();
private var targetCameraFov:Number;
private const yAxis:Vector3 = new Vector3();
private const m3:Matrix3 = new Matrix3();
public function AimingActivationCameraController(param1:WeaponPlatform, param2:int, param3:Number) {
super();
this.weaponPlatform = param1;
this.transitionDuration = param2;
this.targetCameraFov = param3;
}
public function activate(param1:GameCamera) : void {
param1.readPosition(this.initialPosition);
param1.readQRotation(this.initialRotation);
this.transitionTime = this.transitionDuration;
this.fovInterpolator.setInterval(param1.fov,this.targetCameraFov);
}
public function deactivate() : void {
}
public function update(param1:GameCamera, param2:int, param3:int) : void {
this.transitionTime -= param3;
var local4:Number = 1 - this.transitionTime / this.transitionDuration;
if(local4 > 1) {
local4 = 1;
}
this.weaponPlatform.getAllGunParams(this.gunParams);
this.currentPosition.interpolate(local4,this.initialPosition,this.gunParams.barrelOrigin);
this.calculateTargetRotation(this.gunParams,this.targetRotation);
this.currentRotation.slerp(this.initialRotation,this.targetRotation,local4);
this.currentRotation.normalize();
this.currentRotation.getEulerAngles(this.currentEulerAngles);
param1.setPosition(this.currentPosition);
param1.setRotation(this.currentEulerAngles);
param1.fov = this.fovInterpolator.interpolate(local4);
}
private function calculateTargetRotation(param1:AllGlobalGunParams, param2:Quaternion) : void {
var local3:Vector3 = param1.elevationAxis;
var local4:Vector3 = param1.direction;
this.yAxis.cross2(local4,local3);
this.m3.setAxis(local3,this.yAxis,local4);
this.m3.getEulerAngles(this.currentEulerAngles);
param2.setFromEulerAngles(this.currentEulerAngles);
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.effects.hornet.radar {
import alternativa.types.Long;
public interface IBattleUltimateRadarModelBase {
function updateDiscoveredTanksList(param1:Vector.<Long>) : void;
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangIcon_p29 extends BitmapAsset
{
public function RangIcon_p29()
{
super();
}
}
}
|
package alternativa.tanks.models.weapons.discrete {
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.StateCorrectionEvent;
import alternativa.tanks.battle.objects.tank.Tank;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.DiscreteWeaponCommunicationModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.IDiscreteWeaponCommunicationModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.TargetHit;
import projects.tanks.client.battlefield.types.Vector3d;
[ModelInfo]
public class DiscreteWeaponCommunicationModel extends DiscreteWeaponCommunicationModelBase implements IDiscreteWeaponCommunicationModelBase, DiscreteWeapon {
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
public function DiscreteWeaponCommunicationModel() {
super();
}
[Obfuscation(rename="false")]
public function shoot(param1:IGameObject, param2:Vector3d, param3:Vector.<TargetHit>) : void {
var local4:DiscreteWeaponListener = DiscreteWeaponListener(object.event(DiscreteWeaponListener));
local4.onShot(param1,BattleUtils.getVector3(param2),param3);
}
public function tryToShoot(param1:int, param2:Vector3, param3:Vector.<Tank>) : void {
battleEventDispatcher.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.tryToShoot(param1,BattleUtils.getVector3d(param2),BattleUtils.getTargetsPositions(param3));
}
public function tryToDummyShoot(param1:int, param2:Vector3) : void {
battleEventDispatcher.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.tryToDummyShoot(param1,BattleUtils.getVector3d(param2));
}
}
}
|
package alternativa.tanks.controller.events.showform {
import flash.events.Event;
public class ShowChangeEmailAndPasswordFormEvent extends Event {
public static const SHOW:String = "ShowChangeEmailAndPasswordFormEvent.SHOW";
private var _email:String;
public function ShowChangeEmailAndPasswordFormEvent(param1:String) {
super(SHOW);
this._email = param1;
}
public function get email() : String {
return this._email;
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.score {
import alternativa.tanks.models.battle.battlefield.BattleType;
import alternativa.tanks.models.battle.gui.gui.statistics.field.IconField;
import alternativa.tanks.models.battle.gui.gui.statistics.field.LayoutManager;
import alternativa.tanks.models.battle.gui.gui.statistics.field.Widget;
import alternativa.tanks.models.battle.gui.gui.statistics.field.fund.FundAndLimits;
import alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf.CTFScoreIndicator;
import alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf.ComplexTeamScoreIndicator;
import alternativa.types.Long;
import assets.icons.BattleInfoIcons;
import flash.display.DisplayObject;
import flash.display.Sprite;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
import projects.tanks.client.battleservice.model.createparams.BattleLimits;
import projects.tanks.client.battleservice.model.statistics.StatisticsModelCC;
public class BattleStatistics extends Sprite implements Widget {
private var battleType:BattleType;
private var fundAndLimits:FundAndLimits;
private var playerScoreField:PlayerScoreField;
private var teamScoreField:TeamScoreIndicator;
private var localUserId:Long;
private var layoutManager:LayoutManager;
private var showFund:Boolean;
public function BattleStatistics(param1:Long, param2:StatisticsModelCC, param3:BattleType, param4:Boolean) {
super();
this.battleType = param3;
this.localUserId = param1;
this.showFund = Boolean(param2.valuableRound) && !param2.matchBattle;
this.initFields(param2.fund,param2.limits,param2.timeLeft,param4);
}
public function setLayoutManager(param1:LayoutManager) : void {
this.layoutManager = param1;
this.adjustFields();
}
public function setIndicatorState(param1:BattleTeam, param2:int) : void {
ComplexTeamScoreIndicator(this.teamScoreField).setIndicatorState(param1,param2);
}
public function setBothIndicatorsState(param1:int, param2:int) : void {
ComplexTeamScoreIndicator(this.teamScoreField).setBothIndicatorsState(param1,param2);
}
private function initFields(param1:int, param2:BattleLimits, param3:int, param4:Boolean) : void {
this.createFundAndLimits(param1,param2,param3,param4);
this.createScoreField(0,0);
this.adjustFields();
}
private function createFundAndLimits(param1:int, param2:BattleLimits, param3:int, param4:Boolean) : void {
this.fundAndLimits = new FundAndLimits(this.battleType,param1,param2,param3,param4,this.showFund);
addChild(this.fundAndLimits);
}
private function createScoreField(param1:int, param2:int) : void {
if(!this.battleType.isTeam()) {
this.playerScoreField = new PlayerScoreField(IconField.getIcon(BattleInfoIcons.KILL_LIMIT));
addChild(this.playerScoreField);
} else {
this.teamScoreField = this.createTeamScoreField();
this.setTeamScore(BattleTeam.BLUE,param1);
this.setTeamScore(BattleTeam.RED,param2);
addChild(DisplayObject(this.teamScoreField));
}
}
private function createTeamScoreField() : TeamScoreIndicator {
switch(this.battleType) {
case BattleType.TDM:
return new TDMScoreField();
case BattleType.CTF:
return new CTFScoreIndicator();
case BattleType.DOMINATION:
return new DominationScoreField();
case BattleType.AS:
return new ASScoreIndicator();
case BattleType.RUGBY:
return new RugbyScoreIndicator();
default:
throw new Error();
}
}
public function updateUserKills(param1:Long, param2:int) : void {
if(this.battleType == BattleType.DM || this.battleType == BattleType.TDM || this.battleType == BattleType.JGR) {
this.fundAndLimits.onScoreChanged(param2);
if(!this.battleType.isTeam() && param1 == this.localUserId) {
this.playerScoreField.setScore(param2);
}
this.adjustFields();
}
}
public function setTeamScore(param1:BattleTeam, param2:int) : void {
this.teamScoreField.setTeamScore(param1,param2);
this.fundAndLimits.onScoreChanged(param2);
this.adjustFields();
}
public function updateFund(param1:int) : void {
this.fundAndLimits.setFund(param1);
this.adjustFields();
}
public function resetFields() : void {
this.fundAndLimits.reset();
if(this.battleType.isTeam()) {
this.teamScoreField.setScore(0,0);
} else {
this.playerScoreField.setScore(0);
}
this.adjustFields();
}
public function initOnRoundStart(param1:Boolean) : void {
this.resetFields();
this.fundAndLimits.initScoreLimitField(param1);
this.adjustFields();
}
public function finish() : void {
this.fundAndLimits.stopWink();
this.adjustFields();
}
public function adjustFields() : void {
this.fundAndLimits.adjustFields();
var local1:DisplayObject = this.battleType.isTeam() ? DisplayObject(this.teamScoreField) : this.playerScoreField;
local1.x = this.fundAndLimits.width + 10;
if(this.layoutManager != null) {
this.layoutManager.onWidgetChanged(this);
}
}
public function turnOnTimerToRestoreBalance(param1:int) : void {
this.fundAndLimits.turnOnTimerToRestoreBalance(param1);
this.adjustFields();
}
public function turnOffTimerToRestoreBalance() : void {
this.fundAndLimits.turnOffTimerToRestoreBalance();
this.adjustFields();
}
public function startCountdownTimeLimit(param1:int) : void {
this.fundAndLimits.startCountdownTimeLimit(param1);
}
public function stopCountdownTimeLimit() : void {
this.fundAndLimits.stopCountdownTimeLimit();
}
}
}
|
package alternativa.engine3d.core
{
public class MipMapping
{
public static const NONE:int = 0;
public static const OBJECT_DISTANCE:int = 1;
public static const PER_PIXEL:int = 2;
public function MipMapping()
{
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.androidspecialoffer.banner {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.panel.model.shop.androidspecialoffer.banner.AndroidBannerType;
public class CodecAndroidBannerType implements ICodec {
public function CodecAndroidBannerType() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:AndroidBannerType = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = AndroidBannerType.BEGINNER_QUEST;
break;
case 1:
local2 = AndroidBannerType.BATTLE_PASS;
break;
case 2:
local2 = AndroidBannerType.BEGINNER_STARTER_PACK;
break;
case 3:
local2 = AndroidBannerType.PREMIUM_SPECIAL_OFFER;
break;
case 4:
local2 = AndroidBannerType.MEDIUM_TIME_PACK;
break;
case 5:
local2 = AndroidBannerType.KIT_FULL_OFFER;
break;
case 6:
local2 = AndroidBannerType.PROGRESS_OFFER;
}
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:int = int(param2.value);
param1.writer.writeInt(local3);
}
}
}
|
package alternativa.tanks.camera {
public class AngleValues {
private var currentAngle:Number;
private var totalAngle:Number;
private var angularAcceleration:Number;
private var angularSpeed:Number;
private var angleDirection:Number;
public function AngleValues() {
super();
}
public function init(param1:Number, param2:Number, param3:Number) : void {
this.totalAngle = param2 - param1;
if(this.totalAngle < 0) {
this.totalAngle = -this.totalAngle;
this.angleDirection = -1;
} else {
this.angleDirection = 1;
}
if(this.totalAngle > Math.PI) {
this.angleDirection = -this.angleDirection;
this.totalAngle = 2 * Math.PI - this.totalAngle;
}
this.angularAcceleration = param3 * this.totalAngle;
this.angularSpeed = 0;
this.currentAngle = 0;
}
public function reverseAcceleration() : void {
this.angularAcceleration = -this.angularAcceleration;
}
public function update(param1:Number) : Number {
var local2:Number = NaN;
var local3:Number = NaN;
var local4:Number = NaN;
if(this.currentAngle < this.totalAngle) {
local2 = this.angularAcceleration * param1;
local3 = (this.angularSpeed + 0.5 * local2) * param1;
this.angularSpeed += local2;
local4 = this.totalAngle - this.currentAngle;
if(local4 < local3) {
local3 = local4;
}
this.currentAngle += local3;
return local3 * this.angleDirection;
}
return 0;
}
}
}
|
package alternativa.tanks.models.statistics {
import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo;
import alternativa.types.Long;
[ModelInterface]
public interface IClientUserInfo {
function getShortUserInfo(param1:Long) : ShortUserInfo;
function suspiciousnessChanged(param1:Long, param2:Boolean) : void;
function rankChanged(param1:Long, param2:int) : void;
function getUsersCount() : int;
function isLoaded(param1:Long) : Boolean;
}
}
|
package scpacker.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GTanksI_coldload9 extends BitmapAsset
{
public function GTanksI_coldload9()
{
super();
}
}
}
|
package alternativa.tanks.models.battlefield
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.containers.KDContainer;
import alternativa.engine3d.core.Light3D;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Object3DContainer;
import alternativa.engine3d.core.Shadow;
import alternativa.engine3d.core.View;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Decal;
import alternativa.init.Main;
import alternativa.math.Vector3;
import alternativa.physics.collision.ICollisionDetector;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.display.AxisIndicator;
import alternativa.tanks.models.battlefield.decals.DecalFactory;
import alternativa.tanks.models.battlefield.decals.FadingDecalsRenderer;
import alternativa.tanks.models.battlefield.decals.Queue;
import alternativa.tanks.models.battlefield.decals.RotationState;
import alternativa.tanks.models.battlefield.scene3dcontainer.Object3DContainerProxy;
import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer;
import flash.display.Sprite;
import flash.display.StageQuality;
import flash.geom.Point;
import flash.utils.Dictionary;
use namespace alternativa3d;
public class BattleView3D extends Sprite
{
private static const MAX_TEMPORARY_DECALS:int = 10;
private static const DECAL_FADING_TIME_MS:int = 20000;
public static const MAX_SCREEN_SIZE:int = 10;
public var camera:GameCamera;
private var rootContainer:Object3DContainer;
private var skyboxContainer:Object3DContainer;
private var mainContainer:Object3DContainer;
private var frontContainer:Object3DContainer;
private var mapContainer:Object3DContainer;
private var mapContainerProxy:Object3DContainerProxy;
private var frontContainerProxy:Object3DContainerProxy;
private var _showAxisIndicator:Boolean;
private var axisIndicator:AxisIndicator;
private var decalFactory:DecalFactory;
private const temporaryDecals:Queue = new Queue();
private const allDecals:Dictionary = new Dictionary();
private var fadingDecalRenderer:FadingDecalsRenderer;
public var overlay:Sprite;
private const BG_COLOR:uint = 10066176;
private var container:Point;
public const shaftRaycastExcludedObjects:Dictionary = new Dictionary();
private var ambientShadows:AmbientShadows;
private const excludedObjects:Dictionary = new Dictionary();
public function BattleView3D(showAxisIndicator:Boolean, collisionDetector:ICollisionDetector, bs:BattlefieldModel)
{
this.container = new Point();
super();
mouseEnabled = false;
tabEnabled = false;
focusRect = false;
this.camera = new GameCamera();
this.camera.nearClipping = 10;
this.camera.farClipping = 50000;
this.camera.view = new View(100,100);
this.camera.view.hideLogo();
this.camera.view.focusRect = false;
this.camera.softTransparency = true;
this.camera.softAttenuation = 130;
this.camera.softTransparencyStrength = 1;
this.camera.z += 10000;
this.camera.rotationX = Math.PI;
this.decalFactory = new DecalFactory(collisionDetector);
this.fadingDecalRenderer = bs.fadingDecalRenderer;
addChild(this.camera.view);
this.mapContainerProxy = new Object3DContainerProxy();
this.rootContainer = new Object3DContainer();
this.rootContainer.addChild(this.skyboxContainer = new Object3DContainer());
this.rootContainer.addChild(this.mainContainer = new Object3DContainer());
this.rootContainer.addChild(this.frontContainer = new Object3DContainer());
this.frontContainerProxy = new Object3DContainerProxy(this.frontContainer);
this.rootContainer.addChild(this.camera);
Main.stage.quality = StageQuality.HIGH;
this.overlay = new Sprite();
addChild(this.overlay);
this.showAxisIndicator = false;
this.ambientShadows = new AmbientShadows(this.camera);
}
public function addObjectToExclusion(param1:Object3D) : void
{
this.excludedObjects[param1] = true;
}
public function removeObjectFromExclusion(param1:Object3D) : void
{
delete this.excludedObjects[param1];
}
public function getExcludedObjects() : Dictionary
{
return this.excludedObjects;
}
public function enableAmbientShadows(param1:Boolean) : void
{
if(param1)
{
this.ambientShadows.enable();
}
else
{
this.ambientShadows.disable();
}
}
public function addAmbientShadow(param1:Shadow) : void
{
this.ambientShadows.add(param1);
}
public function removeAmbientShadow(param1:Shadow) : void
{
this.ambientShadows.remove(param1);
}
public function addDecal(param1:Vector3, param2:Vector3, param3:Number, param4:TextureMaterial, param5:RotationState = null, param6:Boolean = false) : void
{
var _loc6_:Decal = this.createDecal(param1,param2,param3,param4,param5);
if(_loc6_ != null && !param6)
{
this.temporaryDecals.put(_loc6_);
if(this.temporaryDecals.getSize() > MAX_TEMPORARY_DECALS)
{
this.fadingDecalRenderer.add(this.temporaryDecals.pop());
}
}
}
private function createDecal(param1:Vector3, param2:Vector3, param3:Number, param4:TextureMaterial, param5:RotationState = null) : Decal
{
var _loc6_:Decal = null;
if(param5 == null)
{
param5 = RotationState.USE_RANDOM_ROTATION;
}
_loc6_ = this.decalFactory.createDecal(param1,param2,param3,param4,KDContainer(this._mapContainer),param5);
KDContainer(this._mapContainer).addChildAt(_loc6_,0);
this.allDecals[_loc6_] = true;
return _loc6_;
}
public function removeDecal(param1:Decal) : void
{
if(param1 != null)
{
KDContainer(this._mapContainer).removeChild(param1);
delete this.allDecals[param1];
}
}
public function enableSoftParticles() : void
{
this.camera.softTransparency = true;
}
public function disableSoftParticles() : void
{
this.camera.softTransparency = false;
}
public function enableFog() : void
{
this.camera.fogNear = 5000;
this.camera.fogFar = 10000;
this.camera.fogStrength = 1;
this.camera.fogAlpha = 0.35;
}
public function disableFog() : void
{
this.camera.fogStrength = 0;
}
public function set showAxisIndicator(value:Boolean) : void
{
if(this._showAxisIndicator == value)
{
return;
}
this._showAxisIndicator = value;
if(value)
{
this.axisIndicator = new AxisIndicator(50);
addChild(this.axisIndicator);
}
else
{
removeChild(this.axisIndicator);
this.axisIndicator = null;
}
}
public function resize(w:Number, h:Number) : void
{
this.camera.view.width = w;
this.camera.view.height = h;
if(this._showAxisIndicator)
{
this.axisIndicator.y = (h + this.camera.view.height >> 1) - 2 * this.axisIndicator.size;
}
this.camera.updateFov();
this.container.x = this.stage.stageWidth - this.camera.view.width >> 1;
this.container.y = this.stage.stageHeight - this.camera.view.height >> 1;
}
public function getX() : Number
{
return this.container.x;
}
public function getY() : Number
{
return this.container.y;
}
public function update() : void
{
if(this._showAxisIndicator)
{
this.axisIndicator.update(this.camera);
}
this.camera.render();
}
public function get _mapContainer() : Object3DContainer
{
return this.mapContainer;
}
public function set _mapContainer(value:Object3DContainer) : void
{
if(this.mapContainer != null)
{
this.mainContainer.removeChild(this.mapContainer);
this.mapContainer = null;
}
this.mapContainerProxy.setContainer(value);
this.mapContainer = value;
if(this.mapContainer != null)
{
this.mainContainer.addChild(this.mapContainer);
}
this.frontContainer.name = "FRONT CONTAINER";
this.mapContainer.name = "MAP CONTAINER";
this.mapContainer.mouseEnabled = true;
this.mapContainer.mouseChildren = true;
}
public function initLights(lights:Vector.<Light3D>) : void
{
var l:Light3D = null;
for each(l in lights)
{
this.skyboxContainer.addChild(l);
}
}
public function clearContainers() : void
{
this.clear(this.rootContainer);
this.clear(this.mapContainer);
this.clear(this.skyboxContainer);
this.clear(this.frontContainer);
}
private function clear(container:Object3DContainer) : void
{
while(container.numChildren > 0)
{
container.removeChildAt(0);
}
}
public function addDynamicObject(object:Object3D) : void
{
if(this.mapContainer != null)
{
this.mapContainer.addChild(object);
if(object.name != Object3DNames.STATIC && object.name != Object3DNames.TANK_PART)
{
this.shaftRaycastExcludedObjects[object] = true;
}
}
}
public function removeDynamicObject(object:Object3D) : void
{
if(this.mapContainer != null)
{
this.mapContainer.removeChild(object);
if(object.name != Object3DNames.STATIC && object.name != Object3DNames.TANK_PART)
{
delete this.shaftRaycastExcludedObjects[object];
}
}
}
public function getFrontContainer() : Scene3DContainer
{
return this.frontContainerProxy;
}
public function getMapContainer() : Scene3DContainer
{
return this.mapContainerProxy;
}
public function setSkyBox(param1:Object3D) : void
{
if(this.skyboxContainer.numChildren > 0)
{
this.skyboxContainer.removeChildAt(0);
}
this.skyboxContainer.addChild(param1);
}
}
}
|
package platform.client.fp10.core.type {
import alternativa.types.Long;
public interface IGameObject {
function get id() : Long;
function get name() : String;
function get gameClass() : IGameClass;
function get space() : ISpace;
function hasModel(param1:Class) : Boolean;
function adapt(param1:Class) : Object;
function event(param1:Class) : Object;
}
}
|
package alternativa.tanks.servermodels.invite {
import alternativa.tanks.service.IEntranceClientFacade;
import platform.client.fp10.core.model.IObjectLoadListener;
import projects.tanks.client.entrance.model.entrance.invite.IInviteEntranceModelBase;
import projects.tanks.client.entrance.model.entrance.invite.InviteEntranceModelBase;
[ModelInfo]
public class InviteModel extends InviteEntranceModelBase implements IInviteEntranceModelBase, IInvite, IObjectLoadListener {
[Inject]
public static var clientFacade:IEntranceClientFacade;
public function InviteModel() {
super();
}
public function objectLoaded() : void {
clientFacade.inviteEnabled = getInitParam().enabled;
}
public function inviteNotFound() : void {
clientFacade.inviteNotFound();
}
public function inviteFree() : void {
clientFacade.inviteIsFree();
}
public function inviteAlreadyActivated(param1:String) : void {
clientFacade.inviteAlreadyActivated(param1);
}
public function checkInvite(param1:String) : void {
server.activateInvite(param1);
}
public function objectLoadedPost() : void {
}
public function objectUnloaded() : void {
}
public function objectUnloadedPost() : void {
}
}
}
|
package alternativa.protocol.codec.primitive {
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
public class IntCodec implements IPrimitiveCodec {
public function IntCodec() {
super();
}
public function nullValue() : Object {
return int.MIN_VALUE;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
param1.writer.writeInt(int(param2));
}
public function decode(param1:ProtocolBuffer) : Object {
return param1.reader.readInt();
}
public function init(param1:IProtocol) : void {
}
}
}
|
package _codec.projects.tanks.client.users.model.friends {
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.users.model.friends.FriendsCC;
public class VectorCodecFriendsCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecFriendsCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(FriendsCC,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.<FriendsCC> = new Vector.<FriendsCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = FriendsCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:FriendsCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<FriendsCC> = Vector.<FriendsCC>(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 platform.client.fp10.core.resource {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.console.IConsole;
import alternativa.osgi.service.launcherparams.ILauncherParams;
import alternativa.osgi.service.logging.LogService;
import alternativa.osgi.service.logging.Logger;
import alternativa.types.Long;
import flash.events.NetStatusEvent;
import flash.net.SharedObject;
import flash.net.SharedObjectFlushStatus;
import flash.system.Capabilities;
import flash.utils.ByteArray;
import platform.client.fp10.core.service.errormessage.IErrorMessageService;
import platform.client.fp10.core.service.errormessage.errors.SharedObjectUsNotAccessibleError;
import platform.client.fp10.core.service.localstorage.IResourceLocalStorage;
public class ResourceLocalStorage implements IResourceLocalStorage, IResourceLocalStorageInternal {
private var logger:Logger;
private var _enabled:Boolean;
private var soStorage:SharedObject;
private var resourceIndex:ResourceIndex;
private var temporaryStorageState:Boolean;
private var consoleCommands:Object;
public function ResourceLocalStorage(param1:OSGi) {
super();
var local2:LogService = LogService(param1.getService(LogService));
this.logger = local2.getLogger(ResourceLogChannel.NAME);
this.soStorage = SharedObject.getLocal("localstorage","/");
this.resourceIndex = new ResourceIndex(this.soStorage);
var local3:ILauncherParams = ILauncherParams(param1.getService(ILauncherParams));
var local4:String = local3.getParameter("uselocalstorage");
if(local4 == "1") {
this.enableStorage(true);
} else if(local4 == "0") {
this._enabled = false;
} else {
this._enabled = this.soStorage.data.enabled;
}
this.initConsoleCommands(param1);
}
public function get enabled() : Boolean {
return this._enabled;
}
public function set enabled(param1:Boolean) : void {
if(param1) {
this.enableStorage(false);
} else {
this.temporaryStorageState = false;
this.setEnabledInternal(false);
}
}
public function getResourceData(param1:Long, param2:int, param3:String) : ByteArray {
var local4:ResourceObject = new ResourceObject(param1.toString(),param3);
if(local4.resourceVersion == param2) {
return local4.data;
}
this.resourceIndex.removeResourceData(local4.resourceId,param3);
local4.clear();
return null;
}
public function setResourceData(param1:Long, param2:int, param3:ByteArray, param4:String, param5:String) : void {
param5 ||= Resource.DEFAULT_CLASSIFIER;
var local6:ResourceObject = new ResourceObject(param1.toString(),param5);
local6.resourceVersion = param2;
local6.data = param3;
local6.flush();
this.resourceIndex.addResourceData(local6.resourceId,param5,param4);
}
public function clearResourceData(param1:Long) : void {
this.clearResourceDataStr(param1.toString());
}
public function clear() : void {
var local2:String = null;
var local1:Vector.<String> = this.resourceIndex.getResourceIds();
for each(local2 in local1) {
this.clearResourceDataStr(local2);
}
}
public function flushIndex() : void {
this.soStorage.flush();
}
public function clearResourceDataStr(param1:String) : void {
var local3:String = null;
var local4:ResourceObject = null;
var local2:ResourceInfo = this.resourceIndex.getResourceInfo(param1);
if(local2.empty) {
return;
}
for each(local3 in local2.classifiers) {
local4 = new ResourceObject(param1,local3);
local4.clear();
}
this.resourceIndex.removeResourceInfo(param1);
}
public function getResourceIndex() : ResourceIndex {
return this.resourceIndex;
}
private function enableStorage(param1:Boolean) : void {
var flushStatus:String = null;
var errorType:SharedObjectUsNotAccessibleError = null;
var messageBoxService:IErrorMessageService = null;
var temporary:Boolean = param1;
this.temporaryStorageState = temporary;
try {
flushStatus = this.soStorage.flush(100 * (1 << 20));
}
catch(e:Error) {
errorType = new SharedObjectUsNotAccessibleError();
logger.warning(errorType.getMessage());
messageBoxService = IErrorMessageService(OSGi.getInstance().getService(IErrorMessageService));
messageBoxService.showMessage(errorType);
}
switch(flushStatus) {
case SharedObjectFlushStatus.FLUSHED:
this.setEnabledInternal(true);
break;
case SharedObjectFlushStatus.PENDING:
this.soStorage.addEventListener(NetStatusEvent.NET_STATUS,this.onNetStatus);
}
}
private function onNetStatus(param1:NetStatusEvent) : void {
var local2:int = 0;
var local3:int = 0;
var local4:int = 0;
this.soStorage.removeEventListener(NetStatusEvent.NET_STATUS,this.onNetStatus);
if(param1.info.code == "SharedObject.Flush.Failed") {
local2 = Capabilities.os.indexOf("Windows");
local3 = Capabilities.os.indexOf("Linux");
local4 = Capabilities.os.indexOf("Mac");
if(local2 >= 0 || (local3 >= 0 || local4 >= 0) && this.soStorage.flush(100 * (1 << 20)) == SharedObjectFlushStatus.PENDING) {
this.setEnabledInternal(false);
} else {
this.setEnabledInternal(true);
}
} else {
this.setEnabledInternal(true);
}
}
private function setEnabledInternal(param1:Boolean) : void {
if(!this.temporaryStorageState) {
this.soStorage.data.enabled = param1;
}
this._enabled = param1;
}
private function initConsoleCommands(param1:OSGi) : void {
var local2:IConsole = IConsole(param1.getService(IConsole));
local2.setCommandHandler("locstor",this.onConsoleCommand);
this.consoleCommands = {};
this.addConsoleCommand(new PrintIndexCommand("ls",this));
this.addConsoleCommand(new DeleteResourceCommand("del",this));
this.addConsoleCommand(new ClearStorageCommand("clear",this));
this.addConsoleCommand(new StatusCommand("status",this));
this.addConsoleCommand(new EnableStorageCommand("enable",this));
this.addConsoleCommand(new DisableStorageCommand("disable",this));
this.addConsoleCommand(new FlushStorageIndexCommand("flush",this));
}
private function addConsoleCommand(param1:ConsoleCommand) : void {
this.consoleCommands[param1.name] = param1;
}
private function onConsoleCommand(param1:IConsole, param2:Array) : void {
var local4:Array = null;
var local5:String = null;
var local3:ConsoleCommand = this.consoleCommands[param2.shift()];
if(local3 == null) {
param1.addText("Usage: locstor command [command arguments]");
param1.addText("Available commands are:");
local4 = [];
for(local5 in this.consoleCommands) {
local4.push(local5);
}
local4.sort();
for each(local5 in local4) {
param1.addText(ConsoleCommand(this.consoleCommands[local5]).description);
}
return;
}
local3.execute(param1,param2);
}
}
}
import alternativa.osgi.service.console.IConsole;
import flash.net.SharedObject;
import flash.utils.ByteArray;
import platform.client.fp10.core.resource.ResourceLocalStorage;
class ResourceObject {
private var sharedObject:SharedObject;
private var _resourceId:String;
public function ResourceObject(param1:String, param2:String) {
super();
var local3:String = param1 + "-" + param2;
this.sharedObject = SharedObject.getLocal(local3,"/");
this._resourceId = param1;
}
public function get resourceId() : String {
return this._resourceId;
}
public function get resourceVersion() : int {
return this.sharedObject.data.version;
}
public function set resourceVersion(param1:int) : void {
this.sharedObject.data.version = param1;
}
public function get data() : ByteArray {
return this.sharedObject.data.data;
}
public function set data(param1:ByteArray) : void {
this.sharedObject.data.data = param1;
}
public function flush() : void {
this.sharedObject.flush();
}
public function clear() : void {
this.sharedObject.clear();
}
}
class ResourceIndex {
private var sharedObject:SharedObject;
private var index:Object;
public function ResourceIndex(param1:SharedObject) {
super();
this.sharedObject = param1;
this.index = param1.data.index;
if(this.index == null) {
this.index = {};
param1.data.index = this.index;
}
}
public function getResourceInfo(param1:String) : LocalResourceInfo {
return new LocalResourceInfo(this.index[param1]);
}
public function setResourceInfo(param1:String, param2:LocalResourceInfo) : void {
if(param2 == null) {
this.removeResourceInfo(param1);
} else {
this.index[param1] = param2.rawData;
}
}
public function removeResourceInfo(param1:String) : void {
delete this.index[param1];
}
public function addResourceData(param1:String, param2:String, param3:String) : void {
var local4:LocalResourceInfo = this.getResourceInfo(param1);
local4.description = param3;
var local5:Array = local4.classifiers;
if(local5.indexOf(param2) < 0) {
local5.push(param2);
}
this.setResourceInfo(param1,local4);
}
public function removeResourceData(param1:String, param2:String) : void {
var local3:LocalResourceInfo = this.getResourceInfo(param1);
if(local3.empty) {
return;
}
var local4:Array = local3.classifiers;
var local5:int = local4.indexOf(param2);
if(local5 >= 0) {
if(local4.length == 1) {
this.removeResourceInfo(param1);
} else {
local4.splice(local5,1);
this.setResourceInfo(param1,local3);
}
}
}
public function getResourceIds() : Vector.<String> {
var local2:String = null;
var local1:Vector.<String> = new Vector.<String>();
for(local2 in this.index) {
local1.push(local2);
}
return local1;
}
}
class ConsoleCommand {
public var name:String;
public var description:String;
protected var storage:ResourceLocalStorage;
public function ConsoleCommand(param1:String, param2:ResourceLocalStorage) {
super();
this.name = param1;
this.storage = param2;
}
public function execute(param1:IConsole, param2:Array) : void {
}
}
class PrintIndexCommand extends ConsoleCommand {
public function PrintIndexCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " -- lists all locally stored resources";
}
override public function execute(param1:IConsole, param2:Array) : void {
var counter:int = 0;
var sid:String = null;
var resourceInfo:LocalResourceInfo = null;
var console:IConsole = param1;
var params:Array = param2;
var resourceIndex:ResourceIndex = storage.getResourceIndex();
var resourceIds:Vector.<String> = resourceIndex.getResourceIds();
resourceIds.sort(function(param1:String, param2:String):Number {
if(param1 < param2) {
return -1;
}
if(param1 > param2) {
return 1;
}
return 0;
});
for each(sid in resourceIds) {
resourceInfo = resourceIndex.getResourceInfo(sid);
console.addText(++counter + ". " + sid + ": " + resourceInfo.description + ", " + resourceInfo.classifiers);
}
}
}
class DeleteResourceCommand extends ConsoleCommand {
public function DeleteResourceCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " resource_id -- removes locally stored resource with given id";
}
override public function execute(param1:IConsole, param2:Array) : void {
var local3:String = param2[0];
if(!local3) {
param1.addText("Resource id should be specified");
return;
}
storage.clearResourceDataStr(local3);
param1.addText("Resource " + local3 + " has been removed from local storage");
}
}
class ClearStorageCommand extends ConsoleCommand {
public function ClearStorageCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " -- wipes out all locally stored resources";
}
override public function execute(param1:IConsole, param2:Array) : void {
storage.clear();
param1.addText("Local storage has been cleared");
}
}
class StatusCommand extends ConsoleCommand {
public function StatusCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " -- prints local storage status";
}
override public function execute(param1:IConsole, param2:Array) : void {
param1.addText("Local storage is " + (!!storage.enabled ? "enabled" : "disabled"));
}
}
class EnableStorageCommand extends ConsoleCommand {
public function EnableStorageCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " -- enables local storage";
}
override public function execute(param1:IConsole, param2:Array) : void {
storage.enabled = true;
param1.addText("Locale storage enabled");
}
}
class DisableStorageCommand extends ConsoleCommand {
public function DisableStorageCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " -- disables local storage";
}
override public function execute(param1:IConsole, param2:Array) : void {
storage.enabled = false;
param1.addText("Locale storage disabled");
}
}
class FlushStorageIndexCommand extends ConsoleCommand {
public function FlushStorageIndexCommand(param1:String, param2:ResourceLocalStorage) {
super(param1,param2);
description = param1 + " -- writes storage index to disk";
}
override public function execute(param1:IConsole, param2:Array) : void {
storage.flushIndex();
}
}
// Narukami rename (class ResourceInfo) - SDK bug:
// This [ResourceInfo] conflicts with [platform.client.fp10.core.resource.ResourceInfo].
class LocalResourceInfo {
public var empty:Boolean;
public var rawData:Object;
public function LocalResourceInfo(param1:Object) {
super();
if(param1 == null) {
this.empty = true;
this.rawData = {};
} else {
this.rawData = param1;
}
}
public function get description() : String {
return this.rawData.description;
}
public function set description(param1:String) : void {
this.rawData.description = param1;
}
public function get classifiers() : Array {
var local1:Array = this.rawData.classifiers;
if(local1 == null) {
local1 = [];
this.rawData.classifiers = local1;
}
return local1;
}
}
|
package alternativa.tanks.models.effects.common.bonuscommon
{
import alternativa.math.Matrix3;
import alternativa.math.Matrix4;
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.CollisionPrimitiveListItem;
import alternativa.physics.collision.CollisionPrimitive;
import alternativa.physics.collision.primitives.CollisionBox;
import alternativa.tanks.battle.Trigger;
import alternativa.tanks.models.battlefield.BattlefieldModel;
import alternativa.tanks.physics.CollisionGroup;
public class BonusTrigger implements Trigger
{
private var bonus:ParaBonus;
private var collisionBox:CollisionBox;
private var battleRunner:BattlefieldModel;
public function BonusTrigger(bonus:ParaBonus)
{
super();
this.bonus = bonus;
var bonusHalfSize:Number = BonusConst.BONUS_HALF_SIZE;
this.collisionBox = new CollisionBox(new Vector3(bonusHalfSize,bonusHalfSize,bonusHalfSize),CollisionGroup.BONUS_WITH_TANK);
}
public function activate(battleRunner:BattlefieldModel) : void
{
if(this.battleRunner == null)
{
this.battleRunner = battleRunner;
battleRunner.addTrigger(this);
}
}
public function deactivate() : void
{
if(this.battleRunner != null)
{
this.battleRunner.removeTrigger(this);
this.battleRunner = null;
}
}
public function update(x:Number, y:Number, z:Number, rx:Number, ry:Number, rz:Number) : void
{
var transform:Matrix4 = this.collisionBox.transform;
transform.setMatrix(x,y,z,rx,ry,rz);
this.collisionBox.calculateAABB();
}
public function setTransform(position:Vector3, m:Matrix3) : void
{
var transform:Matrix4 = this.collisionBox.transform;
transform.setFromMatrix3(m,position);
this.collisionBox.calculateAABB();
}
public function checkTrigger(body:Body) : void
{
var primitive:CollisionPrimitive = null;
var item:CollisionPrimitiveListItem = body.collisionPrimitives.head;
while(item != null)
{
primitive = item.primitive;
if(this.battleRunner.bfData.collisionDetector.testCollision(primitive,this.collisionBox))
{
this.bonus.onTriggerActivated();
return;
}
item = item.next;
}
}
}
}
|
package projects.tanks.client.battleselect.model.matchmaking.queue {
public class MatchmakingMode {
public static const TEAM_MODE:MatchmakingMode = new MatchmakingMode(0,"TEAM_MODE");
public static const DM_ONLY:MatchmakingMode = new MatchmakingMode(1,"DM_ONLY");
public static const TDM_ONLY:MatchmakingMode = new MatchmakingMode(2,"TDM_ONLY");
public static const CTF_ONLY:MatchmakingMode = new MatchmakingMode(3,"CTF_ONLY");
public static const CP_ONLY:MatchmakingMode = new MatchmakingMode(4,"CP_ONLY");
public static const AS_ONLY:MatchmakingMode = new MatchmakingMode(5,"AS_ONLY");
public static const RUGBY_ONLY:MatchmakingMode = new MatchmakingMode(6,"RUGBY_ONLY");
public static const JGR_ONLY:MatchmakingMode = new MatchmakingMode(7,"JGR_ONLY");
public static const HOLIDAY:MatchmakingMode = new MatchmakingMode(8,"HOLIDAY");
private var _value:int;
private var _name:String;
public function MatchmakingMode(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<MatchmakingMode> {
var local1:Vector.<MatchmakingMode> = new Vector.<MatchmakingMode>();
local1.push(TEAM_MODE);
local1.push(DM_ONLY);
local1.push(TDM_ONLY);
local1.push(CTF_ONLY);
local1.push(CP_ONLY);
local1.push(AS_ONLY);
local1.push(RUGBY_ONLY);
local1.push(JGR_ONLY);
local1.push(HOLIDAY);
return local1;
}
public function toString() : String {
return "MatchmakingMode [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package projects.tanks.client.panel.model.donationalert.user.donation {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class DonationProfileModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:DonationProfileModelServer;
private var client:IDonationProfileModelBase = IDonationProfileModelBase(this);
private var modelId:Long = Long.getLong(1259588891,1134912464);
public function DonationProfileModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new DonationProfileModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(DonationProfileCC,false)));
}
protected function getInitParam() : DonationProfileCC {
return DonationProfileCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package assets.combo {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.combo.combolist_OVER_CENTER.png")]
public dynamic class combolist_OVER_CENTER extends BitmapData {
public function combolist_OVER_CENTER(param1:int = 5, param2:int = 20) {
super(param1,param2);
}
}
}
|
package projects.tanks.client.entrance.model.entrance.invite {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class InviteEntranceModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _activateInviteId:Long = Long.getLong(1008500026,1853720811);
private var _activateInvite_inviteCodec:ICodec;
private var model:IModel;
public function InviteEntranceModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._activateInvite_inviteCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function activateInvite(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._activateInvite_inviteCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._activateInviteId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.mapbonuslight {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.mapbonuslight.MapBonusLightCC;
public class VectorCodecMapBonusLightCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecMapBonusLightCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(MapBonusLightCC,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.<MapBonusLightCC> = new Vector.<MapBonusLightCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = MapBonusLightCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:MapBonusLightCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<MapBonusLightCC> = Vector.<MapBonusLightCC>(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.sfx {
import alternativa.math.Vector3;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.engine3d.AnimatedSprite3D;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.geom.ColorTransform;
public class LimitedDistanceAnimatedSpriteEffect extends PooledObject implements GraphicEffect {
private static const effectPosition:Vector3 = new Vector3();
private var sprite:AnimatedSprite3D;
private var currentFrame:Number;
private var framesPerMs:Number;
private var loopsCount:int;
private var positionProvider:Object3DPositionProvider;
private var fallOffStart:Number;
private var distanceToDisable:Number;
private var alphaMultiplier:Number;
private var container:Scene3DContainer;
public function LimitedDistanceAnimatedSpriteEffect(param1:Pool) {
super(param1);
this.sprite = new AnimatedSprite3D(1,1);
}
public function init(param1:Number, param2:Number, param3:TextureAnimation, param4:Number, param5:Object3DPositionProvider, param6:Number = 0.5, param7:Number = 0.5, param8:ColorTransform = null, param9:Number = 130, param10:String = "normal", param11:Number = 1000000, param12:Number = 1000000, param13:Number = 1, param14:Boolean = false) : void {
this.alphaMultiplier = param13;
this.initSprite(param1,param2,param4,param6,param7,param8,param3,param9,param10);
this.fallOffStart = param11;
this.distanceToDisable = param12;
param5.initPosition(this.sprite);
this.framesPerMs = 0.001 * param3.fps;
this.positionProvider = param5;
this.currentFrame = 0;
this.loopsCount = 1;
this.sprite.useShadowMap = param14;
this.sprite.useLight = param14;
}
public function addedToScene(param1:Scene3DContainer) : void {
this.container = param1;
param1.addChild(this.sprite);
}
public function play(param1:int, param2:GameCamera) : Boolean {
this.sprite.setFrameIndex(this.currentFrame);
this.currentFrame += param1 * this.framesPerMs;
this.positionProvider.updateObjectPosition(this.sprite,param2,param1);
if(this.loopsCount > 0 && this.currentFrame >= this.sprite.getNumFrames()) {
--this.loopsCount;
if(this.loopsCount == 0) {
return false;
}
this.currentFrame -= this.sprite.getNumFrames();
}
effectPosition.x = this.sprite.x;
effectPosition.y = this.sprite.y;
effectPosition.z = this.sprite.z;
var local3:Number = effectPosition.distanceTo(param2.position);
if(local3 > this.distanceToDisable) {
this.sprite.visible = false;
} else {
this.sprite.visible = true;
if(local3 > this.fallOffStart) {
this.sprite.alpha = this.alphaMultiplier * (this.distanceToDisable - local3) / (this.distanceToDisable - this.fallOffStart);
} else {
this.sprite.alpha = this.alphaMultiplier;
}
}
return true;
}
public function destroy() : void {
this.container.removeChild(this.sprite);
this.container = null;
this.sprite.clear();
this.positionProvider.destroy();
this.positionProvider = null;
recycle();
}
public function kill() : void {
this.loopsCount = 1;
this.currentFrame = this.sprite.getNumFrames();
}
private function initSprite(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number, param6:ColorTransform, param7:TextureAnimation, param8:Number, param9:String) : void {
this.sprite.width = param1;
this.sprite.height = param2;
this.sprite.rotation = param3;
this.sprite.originX = param4;
this.sprite.originY = param5;
this.sprite.blendMode = param9;
this.sprite.colorTransform = param6;
this.sprite.softAttenuation = param8;
this.sprite.setAnimationData(param7);
}
}
}
|
package _codec {
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 alternativa.types.Long;
public class VectorCodeclongLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(Long,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.<Long> = new Vector.<Long>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = Long(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:Long = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<Long> = Vector.<Long>(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.payment.modes.paypal {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class PayPalPaymentModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _getPaymentUrlId:Long = Long.getLong(1110947780,-1862247576);
private var _getPaymentUrl_shopItemIdCodec:ICodec;
private var model:IModel;
public function PayPalPaymentModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._getPaymentUrl_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
}
public function getPaymentUrl(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._getPaymentUrl_shopItemIdCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._getPaymentUrlId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.