code
stringlengths 57
237k
|
|---|
package projects.tanks.client.battleselect.model.matchmaking.spectator {
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 MatchmakingSpectatorEntranceModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:MatchmakingSpectatorEntranceModelServer;
private var client:IMatchmakingSpectatorEntranceModelBase = IMatchmakingSpectatorEntranceModelBase(this);
private var modelId:Long = Long.getLong(2143871783,-1643323062);
private var _enterFailedNoSuitableBattlesId:Long = Long.getLong(57273342,86368579);
public function MatchmakingSpectatorEntranceModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new MatchmakingSpectatorEntranceModelServer(IModel(this));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._enterFailedNoSuitableBattlesId:
this.client.enterFailedNoSuitableBattles();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.sfx.shoot.shaft
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Mesh;
use namespace alternativa3d;
class Trail2 extends Mesh
{
private var a:Vertex;
private var b:Vertex;
private var c:Vertex;
private var d:Vertex;
private var face:Face;
function Trail2()
{
super();
this.a = this.createVertex(-1,0,0,0,0.5);
this.b = this.createVertex(1,0,0,1,0.5);
this.c = this.createVertex(1,1,0,1,1);
this.d = this.createVertex(-1,1,0,0,1);
this.face = this.createQuad(this.a,this.b,this.c,this.d);
calculateFacesNormals();
sorting = Sorting.DYNAMIC_BSP;
shadowMapAlphaThreshold = 2;
depthMapAlphaThreshold = 2;
useShadowMap = false;
useLight = false;
}
public function init(param1:Number, param2:Number, param3:Number, param4:Material) : void
{
alpha = 1;
var _loc5_:Number = param1 / 2;
boundMinX = this.a.x = this.d.x = -_loc5_;
boundMaxX = this.b.x = this.c.x = _loc5_;
boundMinY = this.c.y = this.d.y = param2;
boundMaxY = 0;
boundMinZ = boundMaxZ = 0;
this.a.v = this.b.v = param3;
this.face.material = param4;
}
public function set width(param1:Number) : void
{
var _loc2_:Number = param1 / 2;
boundMinX = this.a.x = this.d.x = -_loc2_;
boundMaxX = this.b.x = this.c.x = _loc2_;
}
public function get length() : Number
{
return this.d.y;
}
public function set length(param1:Number) : void
{
if(param1 < 10)
{
param1 = 10;
}
boundMaxY = this.c.y = this.d.y = param1;
}
private function createVertex(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number) : Vertex
{
var _loc6_:Vertex = new Vertex();
_loc6_.next = vertexList;
vertexList = _loc6_;
_loc6_.x = param1;
_loc6_.y = param2;
_loc6_.z = param3;
_loc6_.u = param4;
_loc6_.v = param5;
return _loc6_;
}
private function createQuad(param1:Vertex, param2:Vertex, param3:Vertex, param4:Vertex) : Face
{
var _loc5_:Face = new Face();
_loc5_.next = faceList;
faceList = _loc5_;
_loc5_.wrapper = new Wrapper();
_loc5_.wrapper.vertex = param1;
_loc5_.wrapper.next = new Wrapper();
_loc5_.wrapper.next.vertex = param2;
_loc5_.wrapper.next.next = new Wrapper();
_loc5_.wrapper.next.next.vertex = param3;
_loc5_.wrapper.next.next.next = new Wrapper();
_loc5_.wrapper.next.next.next.vertex = param4;
return _loc5_;
}
}
}
|
package projects.tanks.client.panel.model.kitoffer {
import platform.client.fp10.core.resource.types.LocalizedImageResource;
import platform.client.fp10.core.type.IGameObject;
public class KitOfferInfo {
private var _currencyName:String;
private var _currencyRoundPrecision:int;
private var _image:LocalizedImageResource;
private var _price:Number;
private var _shopItem:IGameObject;
public function KitOfferInfo(param1:String = null, param2:int = 0, param3:LocalizedImageResource = null, param4:Number = 0, param5:IGameObject = null) {
super();
this._currencyName = param1;
this._currencyRoundPrecision = param2;
this._image = param3;
this._price = param4;
this._shopItem = param5;
}
public function get currencyName() : String {
return this._currencyName;
}
public function set currencyName(param1:String) : void {
this._currencyName = param1;
}
public function get currencyRoundPrecision() : int {
return this._currencyRoundPrecision;
}
public function set currencyRoundPrecision(param1:int) : void {
this._currencyRoundPrecision = param1;
}
public function get image() : LocalizedImageResource {
return this._image;
}
public function set image(param1:LocalizedImageResource) : void {
this._image = param1;
}
public function get price() : Number {
return this._price;
}
public function set price(param1:Number) : void {
this._price = param1;
}
public function get shopItem() : IGameObject {
return this._shopItem;
}
public function set shopItem(param1:IGameObject) : void {
this._shopItem = param1;
}
public function toString() : String {
var local1:String = "KitOfferInfo [";
local1 += "currencyName = " + this.currencyName + " ";
local1 += "currencyRoundPrecision = " + this.currencyRoundPrecision + " ";
local1 += "image = " + this.image + " ";
local1 += "price = " + this.price + " ";
local1 += "shopItem = " + this.shopItem + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.view.mainview {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.mainview.BattleTypesPanel_tdmBtnClass.png")]
public class BattleTypesPanel_tdmBtnClass extends BitmapAsset {
public function BattleTypesPanel_tdmBtnClass() {
super();
}
}
}
|
package alternativa.tanks.model.mobilelootbox {
import projects.tanks.client.garage.models.item.mobilelootbox.deliverylootbox.IMobileLootBoxDeliveryModelBase;
import projects.tanks.client.garage.models.item.mobilelootbox.deliverylootbox.MobileLootBoxDeliveryModelBase;
[ModelInfo]
public class MobileLootBoxDeliveryModel extends MobileLootBoxDeliveryModelBase implements IMobileLootBoxDeliveryModelBase {
public function MobileLootBoxDeliveryModel() {
super();
}
}
}
|
package alternativa.tanks.service.battle {
import alternativa.osgi.service.logging.LogService;
import alternativa.types.Long;
import flash.utils.Dictionary;
import platform.client.fp10.core.type.IGameObject;
public class BattleUserInfoService implements IBattleUserInfoService {
[Inject]
public static var logService:LogService;
private var battleUsers:Dictionary = new Dictionary();
public function BattleUserInfoService() {
super();
}
public function userInBattle(param1:Long) : Boolean {
return param1 in this.battleUsers;
}
public function getBattle(param1:Long) : IGameObject {
return this.battleUsers[param1];
}
public function connect(param1:Long, param2:IGameObject) : void {
this.battleUsers[param1] = param2;
}
public function disconnect(param1:Long) : void {
delete this.battleUsers[param1];
}
public function deleteBattleItem(param1:IGameObject) : void {
var local2:* = undefined;
var local3:Long = null;
for(local2 in this.battleUsers) {
local3 = this.battleUsers[local2].id;
if(local3 == param1.id) {
this.disconnect(local2);
}
}
}
}
}
|
package platform.client.fp10.core.service.errormessage.errors {
public class TransportError implements ErrorType {
public function TransportError() {
super();
}
public function getMessage() : String {
return "Connection closed because of transport error";
}
}
}
|
package alternativa.tanks.models.dom.sfx
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
use namespace alternativa3d;
public class AnimatedBeam extends Mesh
{
public var animationSpeed:Number;
private var a:Vertex;
private var b:Vertex;
private var c:Vertex;
private var d:Vertex;
private var e:Vertex;
private var f:Vertex;
private var g:Vertex;
private var h:Vertex;
private var i:Vertex;
private var j:Vertex;
private var k:Vertex;
private var l:Vertex;
private var unitLength:Number;
private var vOffset:Number = 0;
public function AnimatedBeam(param1:Number, param2:Number, param3:Number, param4:Number)
{
super();
this.unitLength = param3;
this.animationSpeed = param4;
useShadowMap = false;
useLight = false;
shadowMapAlphaThreshold = 2;
depthMapAlphaThreshold = 2;
var _loc5_:Number = param1 / 2;
var _loc6_:Vector.<Number> = Vector.<Number>([-_loc5_,0,0,_loc5_,0,0,_loc5_,param2,0,-_loc5_,param2,0,-_loc5_,param2,0,_loc5_,param2,0,_loc5_,param2 + 1,0,-_loc5_,param2 + 1,0,-_loc5_,param2 + 1,0,_loc5_,param2 + 1,0,_loc5_,2 * param2 + 1,0,-_loc5_,2 * param2 + 1,0]);
var _loc7_:Vector.<Number> = Vector.<Number>([0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,1,0,1,1,0,1]);
var _loc8_:Vector.<int> = Vector.<int>([4,0,1,2,3,4,4,5,6,7,4,8,9,10,11]);
addVerticesAndFaces(_loc6_,_loc7_,_loc8_,true);
sorting = Sorting.DYNAMIC_BSP;
this.writeVertices();
calculateFacesNormals();
this.updateV();
boundMinX = -_loc5_;
boundMaxX = _loc5_;
boundMinY = 0;
boundMaxY = length;
boundMinZ = 0;
boundMaxZ = 0;
}
public function setMaterials(param1:TextureMaterial, param2:TextureMaterial) : void
{
var _loc3_:Face = faceList;
_loc3_.material = param1;
_loc3_.next.material = param2;
_loc3_.next.next.material = param1;
}
private function writeVertices() : void
{
var _loc1_:Vector.<Vertex> = this.vertices;
this.a = _loc1_[0];
this.b = _loc1_[1];
this.c = _loc1_[2];
this.d = _loc1_[3];
this.e = _loc1_[4];
this.f = _loc1_[5];
this.g = _loc1_[6];
this.h = _loc1_[7];
this.i = _loc1_[8];
this.j = _loc1_[9];
this.k = _loc1_[10];
this.l = _loc1_[11];
}
private function updateV() : void
{
this.e.v = this.vOffset;
this.f.v = this.vOffset;
var _loc1_:Number = (this.g.y - this.f.y) / this.unitLength + this.vOffset;
this.g.v = _loc1_;
this.h.v = _loc1_;
}
public function clear() : void
{
setMaterialToAllFaces(null);
}
public function setTipLength(param1:Number) : void
{
var _loc2_:Number = this.c.y;
this.c.y = param1;
this.d.y = param1;
this.e.y = param1;
this.f.y = param1;
this.setLength(this.k.y + param1 - _loc2_);
}
public function resize(param1:Number, param2:Number) : void
{
this.setWidth(param1);
this.setLength(param2);
}
public function setWidth(param1:Number) : void
{
var _loc2_:Number = param1 / 2;
boundMinX = -_loc2_;
boundMaxX = _loc2_;
this.a.x = -_loc2_;
this.d.x = -_loc2_;
this.e.x = -_loc2_;
this.h.x = -_loc2_;
this.i.x = -_loc2_;
this.l.x = -_loc2_;
this.b.x = _loc2_;
this.c.x = _loc2_;
this.f.x = _loc2_;
this.g.x = _loc2_;
this.j.x = _loc2_;
this.k.x = _loc2_;
}
public function setLength(param1:Number) : void
{
if(param1 < 1 + 2 * this.c.y)
{
visible = false;
}
else
{
visible = true;
boundMaxY = param1;
this.g.y = param1 - this.c.y;
this.h.y = this.g.y;
this.i.y = this.g.y;
this.j.y = this.g.y;
this.k.y = param1;
this.l.y = param1;
this.updateV();
}
}
public function setURange(param1:Number) : void
{
this.a.u = 0.5 * (1 - param1);
this.d.u = this.a.u;
this.e.u = this.a.u;
this.h.u = this.a.u;
this.i.u = this.a.u;
this.l.u = this.a.u;
this.b.u = 0.5 * (1 + param1);
this.c.u = this.b.u;
this.f.u = this.b.u;
this.g.u = this.b.u;
this.j.u = this.b.u;
this.k.u = this.b.u;
}
public function update(param1:Number) : void
{
this.vOffset += this.animationSpeed * param1;
if(this.vOffset < 0)
{
this.vOffset += 1;
}
else if(this.vOffset > 1)
{
this.vOffset -= 1;
}
this.updateV();
}
public function setUnitLength(param1:Number) : void
{
this.unitLength = param1;
this.updateV();
}
}
}
|
package projects.tanks.client.entrance.model.entrance.timezone {
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 TimeZoneOffsetModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:TimeZoneOffsetModelServer;
private var client:ITimeZoneOffsetModelBase = ITimeZoneOffsetModelBase(this);
private var modelId:Long = Long.getLong(615172736,1458878101);
public function TimeZoneOffsetModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new TimeZoneOffsetModelServer(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.chat.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.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import projects.tanks.client.chat.types.UserStatus;
import projects.tanks.client.users.services.chatmoderator.ChatModeratorLevel;
public class CodecUserStatus implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_chatModeratorLevel:ICodec;
private var codec_ip:ICodec;
private var codec_rankIndex:ICodec;
private var codec_uid:ICodec;
private var codec_userId:ICodec;
public function CodecUserStatus() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_chatModeratorLevel = param1.getCodec(new EnumCodecInfo(ChatModeratorLevel,false));
this.codec_ip = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_rankIndex = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_uid = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_userId = param1.getCodec(new TypeCodecInfo(Long,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:UserStatus = new UserStatus();
local2.chatModeratorLevel = this.codec_chatModeratorLevel.decode(param1) as ChatModeratorLevel;
local2.ip = this.codec_ip.decode(param1) as String;
local2.rankIndex = this.codec_rankIndex.decode(param1) as int;
local2.uid = this.codec_uid.decode(param1) as String;
local2.userId = this.codec_userId.decode(param1) as Long;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:UserStatus = UserStatus(param2);
this.codec_chatModeratorLevel.encode(param1,local3.chatModeratorLevel);
this.codec_ip.encode(param1,local3.ip);
this.codec_rankIndex.encode(param1,local3.rankIndex);
this.codec_uid.encode(param1,local3.uid);
this.codec_userId.encode(param1,local3.userId);
}
}
}
|
package projects.tanks.client.battleselect.model.buyabonement {
public interface IBuyProAbonementModelBase {
}
}
|
package projects.tanks.client.commons.models.moveusertoclient {
public interface IMoveUserToServerModelBase {
function move(param1:int) : void;
}
}
|
package projects.tanks.client.battlefield.models.user.speedcharacteristics {
public interface ISpeedCharacteristicsModelBase {
function setSpecification(param1:Number, param2:Number, param3:Number, param4:Number, param5:int, param6:Boolean) : void;
}
}
|
package controls.buttons.h30px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h30px.GreenMediumButtonSkin_rightOverClass.png")]
public class GreenMediumButtonSkin_rightOverClass extends BitmapAsset {
public function GreenMediumButtonSkin_rightOverClass() {
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.payment.modes {
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.modes.PaymentRequestVariable;
public class CodecPaymentRequestVariable implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_value:ICodec;
private var codec_variable:ICodec;
public function CodecPaymentRequestVariable() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_value = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_variable = param1.getCodec(new TypeCodecInfo(String,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:PaymentRequestVariable = new PaymentRequestVariable();
local2.value = this.codec_value.decode(param1) as String;
local2.variable = this.codec_variable.decode(param1) as String;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:PaymentRequestVariable = PaymentRequestVariable(param2);
this.codec_value.encode(param1,local3.value);
this.codec_variable.encode(param1,local3.variable);
}
}
}
|
package projects.tanks.client.battlefield.gui.models.statistics
{
import scpacker.Base;
public class StatisticsModelBase extends Base
{
public function StatisticsModelBase()
{
super();
}
}
}
|
package projects.tanks.client.panel.model.challenge.stars {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class StarsInfoModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function StarsInfoModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.loader.dishonestprogressbar {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.loader.dishonestprogressbar.DishonestProgressBar_bgdCenterClass.png")]
public class DishonestProgressBar_bgdCenterClass extends BitmapAsset {
public function DishonestProgressBar_bgdCenterClass() {
super();
}
}
}
|
package platform.client.fp10.core.network.connection {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.types.Long;
import platform.client.fp10.core.network.ICommandHandler;
public class ConnectionInitializers {
private var _protocol:IProtocol;
private var _commandCodec:ICodec;
private var _commandHandler:ICommandHandler;
private var _secure:Boolean;
private var _connectionId:Long;
private var _protectionContext:IProtectionContext;
public function ConnectionInitializers(param1:IProtocol, param2:ICodec, param3:ICommandHandler, param4:Boolean, param5:Long, param6:IProtectionContext) {
super();
this._protocol = param1;
this._commandCodec = param2;
this._commandHandler = param3;
this._secure = param4;
this._connectionId = param5;
this._protectionContext = param6;
}
public function get protocol() : IProtocol {
return this._protocol;
}
public function get commandCodec() : ICodec {
return this._commandCodec;
}
public function get commandHandler() : ICommandHandler {
return this._commandHandler;
}
public function get secure() : Boolean {
return this._secure;
}
public function get protectionContext() : IProtectionContext {
return this._protectionContext;
}
public function get connectionId() : Long {
return this._connectionId;
}
}
}
|
package platform.client.fp10.core.network.handler {
import alternativa.osgi.service.logging.LogService;
import alternativa.osgi.service.logging.Logger;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.network.ICommandSender;
import platform.client.fp10.core.network.command.SpaceOpenedCommand;
import platform.client.fp10.core.network.connection.ConnectionCloseStatus;
import platform.client.fp10.core.registry.ModelRegistry;
import platform.client.fp10.core.registry.SpaceRegistry;
import platform.client.fp10.core.service.transport.ITransportService;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.impl.Space;
public class SpaceCommandHandler implements ISpaceCommandHandler {
[Inject]
public static var logService:LogService;
private static var logger:Logger;
[Inject]
public static var spaceRegistry:SpaceRegistry;
[Inject]
public static var modelRegistry:ModelRegistry;
[Inject]
public static var protocol:IProtocol;
[Inject]
public static var transportService:ITransportService;
private var space:Space;
private var commandSender:ICommandSender;
private var hashCode:ByteArray;
private var longCodec:ICodec;
public function SpaceCommandHandler(param1:ByteArray) {
super();
this.hashCode = param1;
this.longCodec = protocol.getCodec(new TypeCodecInfo(Long,false));
logger = logger || logService.getLogger("space");
}
public function setSpace(param1:Space) : void {
this.space = param1;
}
public function onConnectionOpen(param1:ICommandSender) : void {
this.commandSender = param1;
param1.sendCommand(new SpaceOpenedCommand(this.space.id,this.hashCode));
}
public function onConnectionClose(param1:ConnectionCloseStatus, param2:String = null) : void {
spaceRegistry.currentSpace = this.space;
this.destroyAllObjects();
spaceRegistry.removeSpace(this.space);
this.commandSender = null;
}
public function executeCommand(param1:Object) : void {
var methodId:Long = null;
var object:IGameObject = null;
var message:String = null;
var command:Object = param1;
var buffer:ProtocolBuffer = ProtocolBuffer(command);
var objectId:Long = Long(this.longCodec.decode(buffer));
methodId = Long(this.longCodec.decode(buffer));
object = this.space.getObject(objectId);
if(object != null) {
try {
spaceRegistry.currentSpace = this.space;
modelRegistry.invoke(object,methodId,buffer);
}
catch(e:Error) {
throw new Error("Command execution error. Object id=" + object.id + ", method id=" + methodId + ", Error=" + e.getStackTrace());
}
return;
}
message = "Вызов метода модели поведения для незагруженного объекта (objectId: " + objectId + ", methodId: " + methodId + ")";
throw new Error(message);
}
private function destroyAllObjects() : void {
var local1:Vector.<IGameObject> = null;
var local2:int = 0;
if(this.space.objects.length > 0) {
local1 = this.space.objects.slice();
local2 = local1.length - 1;
while(local2 >= 0) {
this.space.destroyObject(local1[local2].id);
local2--;
}
}
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.teamlight {
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.teamlight.TeamLightCC;
import projects.tanks.client.battlefield.models.teamlight.TeamLightParams;
public class CodecTeamLightCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_lightModes:ICodec;
public function CodecTeamLightCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_lightModes = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(TeamLightParams,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TeamLightCC = new TeamLightCC();
local2.lightModes = this.codec_lightModes.decode(param1) as Vector.<TeamLightParams>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:TeamLightCC = TeamLightCC(param2);
this.codec_lightModes.encode(param1,local3.lightModes);
}
}
}
|
package alternativa.tanks.model.item.device {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.garage.models.item.device.ItemDevicesCC;
public class ItemDevicesGarageAdapt implements ItemDevicesGarage {
private var object:IGameObject;
private var impl:ItemDevicesGarage;
public function ItemDevicesGarageAdapt(param1:IGameObject, param2:ItemDevicesGarage) {
super();
this.object = param1;
this.impl = param2;
}
public function buyDevice(param1:IGameObject, param2:int) : void {
var device:IGameObject = param1;
var expectedPrice:int = param2;
try {
Model.object = this.object;
this.impl.buyDevice(device,expectedPrice);
}
finally {
Model.popObject();
}
}
public function insertDevice(param1:IGameObject) : void {
var device:IGameObject = param1;
try {
Model.object = this.object;
this.impl.insertDevice(device);
}
finally {
Model.popObject();
}
}
public function removeDevice() : void {
try {
Model.object = this.object;
this.impl.removeDevice();
}
finally {
Model.popObject();
}
}
public function getParams() : ItemDevicesCC {
var result:ItemDevicesCC = null;
try {
Model.object = this.object;
result = this.impl.getParams();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.view.battlelist.modefilter {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlelist.modefilter.BattleModeCheckBox_normalStateClass.png")]
public class BattleModeCheckBox_normalStateClass extends BitmapAsset {
public function BattleModeCheckBox_normalStateClass() {
super();
}
}
}
|
package alternativa.tanks.model.item.skins {
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.garage.skins.AvailableSkinsItemModelBase;
import projects.tanks.client.garage.skins.IAvailableSkinsItemModelBase;
[ModelInfo]
public class AvailableSkinsItemModel extends AvailableSkinsItemModelBase implements IAvailableSkinsItemModelBase, AvailableSkins {
public function AvailableSkinsItemModel() {
super();
}
public function getSkins() : Vector.<IGameObject> {
return getInitParam().skins;
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.android {
public class PurchaseData {
private var _currency:String;
private var _itemId:String;
private var _token:String;
public function PurchaseData(param1:String = null, param2:String = null, param3:String = null) {
super();
this._currency = param1;
this._itemId = param2;
this._token = param3;
}
public function get currency() : String {
return this._currency;
}
public function set currency(param1:String) : void {
this._currency = param1;
}
public function get itemId() : String {
return this._itemId;
}
public function set itemId(param1:String) : void {
this._itemId = param1;
}
public function get token() : String {
return this._token;
}
public function set token(param1:String) : void {
this._token = param1;
}
public function toString() : String {
var local1:String = "PurchaseData [";
local1 += "currency = " + this.currency + " ";
local1 += "itemId = " + this.itemId + " ";
local1 += "token = " + this.token + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.gui.payment.forms.leogaming {
import alternativa.osgi.service.locale.ILocaleService;
import base.DiscreteSprite;
import controls.base.TankInputBase;
import controls.labels.MouseDisabledLabel;
import flash.events.Event;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class LeogamingCodeConfirmForm extends DiscreteSprite {
[Inject]
public static var localeService:ILocaleService;
private static const LABEL_GAP:int = 7;
private static const WIDTH:int = 280;
private static const MIN_CHARS:int = 5;
private var codeInput:TankInputBase;
private var codeLabel:MouseDisabledLabel;
public function LeogamingCodeConfirmForm() {
super();
this.addPhoneLabel();
this.addCodeInput();
this.render();
}
public function getCodeConfirm() : String {
return this.codeInput.value;
}
private function addPhoneLabel() : void {
this.codeLabel = new MouseDisabledLabel();
this.codeLabel.text = localeService.getText(TanksLocale.TEXT_CODE_CONFIRM);
addChild(this.codeLabel);
}
private function addCodeInput() : void {
this.codeInput = new TankInputBase();
this.codeInput.width = 150;
this.codeInput.textField.width = 90;
this.codeInput.textField.text = "";
this.codeInput.textField.maxChars = 6;
this.codeInput.textField.restrict = "0-9";
this.codeInput.validValue = true;
this.codeInput.addEventListener(Event.CHANGE,this.onCodeChanged);
addChild(this.codeInput);
}
private function onCodeChanged(param1:Event) : void {
if(this.codeInput.textField.text.length >= MIN_CHARS) {
dispatchEvent(new ValidationEvent(ValidationEvent.VALID));
} else {
dispatchEvent(new ValidationEvent(ValidationEvent.INVALID));
}
}
public function clear() : void {
this.codeInput.textField.text = "";
}
public function destroy() : void {
this.codeInput.removeEventListener(Event.CHANGE,this.onCodeChanged);
}
private function render() : void {
this.codeInput.x = WIDTH - this.codeInput.width;
this.codeLabel.x = this.codeInput.x - LABEL_GAP - this.codeLabel.width;
this.codeLabel.y = this.codeInput.height - this.codeLabel.height >> 1;
}
}
}
|
package alternativa.tanks.models.weapon.shared
{
import alternativa.physics.Body;
public interface ITargetValidator
{
function isValidTarget(param1:Body) : Boolean;
}
}
|
package alternativa.tanks.model.garage {
import alternativa.tanks.gui.tankpreview.TankPreviewWindow;
import alternativa.tanks.service.item.ItemService;
import alternativa.tanks.service.item3d.ITank3DViewer;
import flash.display.BitmapData;
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class Tank3DViewer implements ITank3DViewer {
[Inject]
public static var itemService:ItemService;
private var tankPreview:TankPreviewWindow;
private var armorResource3DS:Tanks3DSResource;
private var weaponResource3DS:Tanks3DSResource;
private var droneResource3DS:Tanks3DSResource;
private var color:BitmapData;
private var animation:MultiframeTextureResource;
private var isPreviewing:Boolean;
public function Tank3DViewer() {
super();
}
public function setView(param1:TankPreviewWindow) : void {
this.tankPreview = param1;
if(this.armorResource3DS != null) {
this.tankPreview.setHull(this.armorResource3DS);
this.armorResource3DS = null;
}
if(this.weaponResource3DS != null) {
this.tankPreview.setTurret(this.weaponResource3DS);
this.weaponResource3DS = null;
}
if(this.droneResource3DS != null) {
this.tankPreview.setDrone(this.droneResource3DS);
this.droneResource3DS = null;
}
if(this.color != null) {
this.tankPreview.setColorMap(this.color);
this.color = null;
}
if(this.animation != null) {
this.tankPreview.setTextureAnimation(this.animation);
this.animation = null;
}
}
public function resetView() : void {
this.tankPreview = null;
}
public function setArmor(param1:Tanks3DSResource) : void {
if(this.tankPreview != null) {
this.tankPreview.setHull(param1);
} else {
this.armorResource3DS = param1;
}
}
public function setWeapon(param1:Tanks3DSResource) : void {
if(this.tankPreview != null) {
this.tankPreview.setTurret(param1);
} else {
this.weaponResource3DS = param1;
}
}
public function setDrone(param1:Tanks3DSResource) : void {
if(this.tankPreview != null) {
this.tankPreview.setDrone(param1);
} else {
this.droneResource3DS = param1;
}
}
public function setPreviewColor(param1:BitmapData) : void {
this.isPreviewing = true;
if(this.tankPreview != null) {
this.tankPreview.setColorMap(param1);
}
}
public function setColor(param1:BitmapData) : void {
this.animation = null;
this.color = param1;
if(this.tankPreview != null) {
this.tankPreview.setColorMap(param1);
}
}
public function setPreviewAnimation(param1:MultiframeTextureResource) : void {
this.isPreviewing = true;
if(this.tankPreview != null) {
this.tankPreview.setTextureAnimation(param1);
}
}
public function setAnimation(param1:MultiframeTextureResource) : void {
this.color = null;
this.animation = param1;
if(this.tankPreview != null) {
this.tankPreview.setTextureAnimation(param1);
}
}
public function closePreview() : void {
if(!this.isPreviewing) {
return;
}
this.isPreviewing = false;
if(this.tankPreview == null) {
return;
}
if(this.color != null) {
this.tankPreview.setColorMap(this.color);
}
if(this.animation != null) {
this.tankPreview.setTextureAnimation(this.animation);
}
}
}
}
|
package alternativa.tanks.controller.commands {
import alternativa.tanks.controller.events.EntranceErrorEvent;
import alternativa.tanks.controller.events.LoginViaPartnerEvent;
import alternativa.tanks.controller.events.NavigationEvent;
import alternativa.tanks.model.EntranceServerParamsModel;
import alternativa.tanks.model.EntranceUrlParamsModel;
import alternativa.tanks.service.AccountService;
import alternativa.tanks.service.IEntranceServerFacade;
import org.robotlegs.mvcs.Command;
import platform.clients.fp10.libraries.alternativapartners.service.IPartnerService;
public class ChooseInitialStateCommand extends Command {
[Inject]
public var serverFacade:IEntranceServerFacade;
[Inject]
public var urlParams:EntranceUrlParamsModel;
[Inject]
public var accountService:AccountService;
[Inject]
public var serverParams:EntranceServerParamsModel;
[Inject]
public var partnerService:IPartnerService;
public function ChooseInitialStateCommand() {
super();
}
override public function execute() : void {
var local1:String = null;
if(this.serverParams.serverFrozen) {
dispatch(new EntranceErrorEvent(EntranceErrorEvent.SERVER_FROZEN));
} else if(this.serverParams.serverHalt) {
dispatch(new EntranceErrorEvent(EntranceErrorEvent.SERVER_HALT));
} else if(Boolean(this.urlParams.singleUseHash)) {
this.serverFacade.loginBySingleUseHash(this.urlParams.singleUseHash);
} else if(Boolean(this.urlParams.emailChangeHash)) {
this.serverFacade.checkEmailChangeHash(this.urlParams.emailChangeHash);
} else if(this.partnerService.isRunningInsidePartnerEnvironment()) {
dispatch(new LoginViaPartnerEvent(this.partnerService.getEnvironmentPartnerId()));
} else if(this.serverParams.inviteEnabled) {
dispatch(new NavigationEvent(NavigationEvent.GO_TO_INVITE_FORM));
} else if(Boolean(this.urlParams.emailConfirmHash) && Boolean(this.urlParams.email)) {
this.serverFacade.confirmEmail(this.urlParams.emailConfirmHash,this.urlParams.email);
} else if(Boolean(this.urlParams.changeUidHash) && Boolean(this.urlParams.email)) {
this.serverFacade.checkChangeUidHash(this.urlParams.changeUidHash,this.urlParams.email);
} else if(Boolean(this.urlParams.referralHash)) {
dispatch(new NavigationEvent(NavigationEvent.GO_TO_REGISTRATION_FORM));
} else if(Boolean(this.urlParams.tutorialHash)) {
dispatch(new NavigationEvent(NavigationEvent.GO_TO_REGISTRATION_FORM));
} else if(Boolean(this.urlParams.entranceHash) || Boolean(this.accountService.entranceHash)) {
local1 = this.urlParams.entranceHash || this.accountService.entranceHash;
this.serverFacade.loginByHash(local1);
} else if(this.accountService.haveVisitedTankiAlready) {
dispatch(new NavigationEvent(NavigationEvent.GO_TO_LOGIN_FORM));
} else {
this.accountService.haveVisitedTankiAlready = true;
dispatch(new NavigationEvent(NavigationEvent.GO_TO_REGISTRATION_FORM));
}
}
}
}
|
package alternativa.engine3d.loaders.collada {
use namespace collada;
public class DaeEffectParam extends DaeElement {
private var effect:DaeEffect;
public function DaeEffectParam(param1:XML, param2:DaeEffect) {
super(param1,param2.document);
this.effect = param2;
}
public function getFloat(param1:Object) : Number {
var local4:DaeParam = null;
var local2:XML = data.float[0];
if(local2 != null) {
return parseNumber(local2);
}
var local3:XML = data.param.@ref[0];
if(local3 != null) {
local4 = this.effect.getParam(local3.toString(),param1);
if(local4 != null) {
return local4.getFloat();
}
}
return NaN;
}
public function getColor(param1:Object) : Array {
var local4:DaeParam = null;
var local2:XML = data.color[0];
if(local2 != null) {
return parseNumbersArray(local2);
}
var local3:XML = data.param.@ref[0];
if(local3 != null) {
local4 = this.effect.getParam(local3.toString(),param1);
if(local4 != null) {
return local4.getFloat4();
}
}
return null;
}
private function get texture() : String {
var local1:XML = data.texture.@texture[0];
return local1 == null ? null : local1.toString();
}
public function getSampler(param1:Object) : DaeParam {
var local2:String = this.texture;
if(local2 != null) {
return this.effect.getParam(local2,param1);
}
return null;
}
public function getImage(param1:Object) : DaeImage {
var local3:String = null;
var local4:DaeParam = null;
var local2:DaeParam = this.getSampler(param1);
if(local2 != null) {
local3 = local2.surfaceSID;
if(local3 != null) {
local4 = this.effect.getParam(local3,param1);
if(local4 != null) {
return local4.image;
}
return null;
}
return local2.image;
}
return document.findImageByID(this.texture);
}
public function get texCoord() : String {
var local1:XML = data.texture.@texcoord[0];
return local1 == null ? null : local1.toString();
}
}
}
|
package alternativa.tanks.gui.settings.tabs {
import alternativa.tanks.gui.settings.SettingsWindow;
import alternativa.tanks.gui.settings.controls.GridLayout;
import alternativa.tanks.service.settings.SettingEnum;
import controls.TankWindowInner;
import controls.checkbox.CheckBoxBase;
import flash.events.MouseEvent;
import projects.tanks.clients.flash.commons.models.gpu.GPUCapabilities;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class GraphicSettingsTab extends SettingsTabView {
private var performanceInner:TankWindowInner;
private var cbShowFPS:CheckBoxBase;
private var cbAdaptiveFPS:CheckBoxBase;
private var cbShowSkyBox:CheckBoxBase;
private var cbAntialiasing:CheckBoxBase;
private var cbDynamicLighting:CheckBoxBase;
private var cbMipMapping:CheckBoxBase;
private var cbFog:CheckBoxBase;
private var cbTankShadow:CheckBoxBase;
private var cbDynamicShadows:CheckBoxBase;
private var cbSoftParticles:CheckBoxBase;
private var cbDust:CheckBoxBase;
private var cbSSAO:CheckBoxBase;
private var cbGraphicsAutoQuality:CheckBoxBase;
public function GraphicSettingsTab() {
var local2:int = 0;
super();
this.performanceInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT);
this.performanceInner.width = SettingsWindow.TAB_VIEW_MAX_WIDTH;
this.performanceInner.x = this.performanceInner.y = 0;
addChild(this.performanceInner);
this.cbShowFPS = createCheckBox(SettingEnum.SHOW_FPS,localeService.getText(TanksLocale.TEXT_SETTINGS_SHOW_FPS_CHECKBOX),settingsService.showFPS);
addChild(this.cbShowFPS);
this.cbAdaptiveFPS = createCheckBox(SettingEnum.ADAPTIVE_FPS,localeService.getText(TanksLocale.TEXT_SETTINGS_ENABLE_ADAPTIVE_FPS_CHECKBOX_LABEL_TEXT),settingsService.adaptiveFPS);
addChild(this.cbAdaptiveFPS);
this.cbShowSkyBox = createCheckBox(SettingEnum.SHOW_SKY_BOX,localeService.getText(TanksLocale.TEXT_SETTINGS_SHOW_SKYBOX_CHECKBOX_LABEL_TEXT),settingsService.showSkyBox);
addChild(this.cbShowSkyBox);
this.cbMipMapping = createCheckBox(SettingEnum.MIPMAPPING,localeService.getText(TanksLocale.TEXT_SETTINGS_MIPMAPPING_LABEL_TEXT),settingsService.mipMapping);
addChild(this.cbMipMapping);
var local1:GridLayout = new GridLayout(MARGIN,MARGIN,SettingsWindow.TAB_VIEW_MAX_WIDTH * 0.5,this.cbShowFPS.height + MARGIN);
if(this.gpuAvailable()) {
this.cbFog = createCheckBox(SettingEnum.FOG,localeService.getText(TanksLocale.TEXT_SETTINGS_FOG_LABEL_TEXT),settingsService.fog);
addChild(this.cbFog);
this.cbTankShadow = createCheckBox(SettingEnum.SHADOWS_UNDER_TANK,localeService.getText(TanksLocale.TEXT_SETTINGS_SHADOWS_LABEL_TEXT),settingsService.shadows);
addChild(this.cbTankShadow);
this.cbDynamicShadows = createCheckBox(SettingEnum.DYNAMIC_SHADOWS,localeService.getText(TanksLocale.TEXT_SETTINGS_DYNAMIC_SHADOWS_LABEL_TEXT),settingsService.dynamicShadows);
addChild(this.cbDynamicShadows);
this.cbSoftParticles = createCheckBox(SettingEnum.SOFT_PARTICLES,localeService.getText(TanksLocale.TEXT_SETTINGS_SOFT_PARTICLES_LABEL_TEXT),settingsService.softParticles);
addChild(this.cbSoftParticles);
this.cbSoftParticles.addEventListener(MouseEvent.CLICK,this.onSoftParticlesClick);
this.cbDust = createCheckBox(SettingEnum.DUST,localeService.getText(TanksLocale.TEXT_SETTINGS_DUST_LABEL_TEXT),settingsService.dust);
addChild(this.cbDust);
this.cbSSAO = createCheckBox(SettingEnum.SSAO,localeService.getText(TanksLocale.TEXT_SETTINGS_SSAO),settingsService.ssao);
addChild(this.cbSSAO);
this.cbAntialiasing = createCheckBox(SettingEnum.ANTIALIASING,localeService.getText(TanksLocale.TEXT_SETTINGS_ANTIALIASING),settingsService.antialiasing);
addChild(this.cbAntialiasing);
this.cbDynamicLighting = createCheckBox(SettingEnum.DYNAMIC_LIGHTING,localeService.getText(TanksLocale.TEXT_SETTINGS_DYNAMIC_LIGHTING),settingsService.dynamicLighting);
addChild(this.cbDynamicLighting);
this.createGraphicsAutoQualityCheckBox();
local2 = this.layoutPerformanceFull(local1);
if(this.cbGraphicsAutoQuality.checked) {
local2 = this.cbGraphicsAutoQuality.y + this.cbGraphicsAutoQuality.height;
}
} else {
local2 = this.layoutPerformanceConstrained(local1);
}
this.performanceInner.height = local2 + MARGIN;
}
private function gpuAvailable() : Boolean {
return GPUCapabilities.gpuEnabled && !GPUCapabilities.constrained;
}
private function onSoftParticlesClick(param1:MouseEvent) : void {
this.checkDustAvailable();
}
private function checkDustAvailable() : void {
this.cbDust.visible = Boolean(this.cbSoftParticles) && !this.cbGraphicsAutoQuality.checked && this.cbSoftParticles.checked;
}
private function createGraphicsAutoQualityCheckBox() : void {
this.cbGraphicsAutoQuality = createCheckBox(SettingEnum.GRAPHICS_AUTO_QUALITY,localeService.getText(TanksLocale.TEXT_SETTINGS_GRAPHICS_AUTO_QUALITY),settingsService.graphicsAutoQuality);
addChild(this.cbGraphicsAutoQuality);
this.onGraphicsAutQualityClick();
this.cbGraphicsAutoQuality.addEventListener(MouseEvent.CLICK,this.onGraphicsAutQualityClick);
}
private function onGraphicsAutQualityClick(param1:MouseEvent = null) : void {
var local2:Boolean = !this.cbGraphicsAutoQuality.checked;
this.cbFog.visible = local2;
this.cbTankShadow.visible = local2;
this.cbDynamicShadows.visible = local2;
this.cbSoftParticles.visible = local2;
this.cbSSAO.visible = local2;
this.cbDynamicLighting.visible = local2;
this.cbAntialiasing.visible = local2;
this.performanceInner.height = local2 ? 7 * this.cbShowFPS.height + 8 * MARGIN : 3 * this.cbShowFPS.height + 4 * MARGIN;
this.checkDustAvailable();
}
private function layoutPerformanceConstrained(param1:GridLayout) : int {
return param1.layout([[this.cbShowFPS,this.cbAdaptiveFPS],[this.cbShowSkyBox,this.cbMipMapping]]);
}
private function layoutPerformanceFull(param1:GridLayout) : int {
return param1.layout([[this.cbShowFPS,this.cbAdaptiveFPS],[this.cbShowSkyBox,this.cbMipMapping],[this.cbGraphicsAutoQuality],[this.cbDynamicShadows,this.cbSSAO],[this.cbDynamicLighting,this.cbFog],[this.cbTankShadow,this.cbAntialiasing],[this.cbSoftParticles,this.cbDust]]);
}
override public function destroy() : void {
if(this.gpuAvailable()) {
this.cbGraphicsAutoQuality.removeEventListener(MouseEvent.CLICK,this.onGraphicsAutQualityClick);
this.cbSoftParticles.removeEventListener(MouseEvent.CLICK,this.onSoftParticlesClick);
}
super.destroy();
}
}
}
|
package alternativa.tanks.models.battle.assault {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.assault.AssaultHudIndicators_flagAssault.png")]
public class AssaultHudIndicators_flagAssault extends BitmapAsset {
public function AssaultHudIndicators_flagAssault() {
super();
}
}
}
|
package controls.chat {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.chat.BattleChatInput_bitmapNR.png")]
public class BattleChatInput_bitmapNR extends BitmapAsset {
public function BattleChatInput_bitmapNR() {
super();
}
}
}
|
package alternativa.tanks.models.continuebattle {
[ModelInterface]
public interface ContinueBattle {
function continueBattle() : void;
}
}
|
package alternativa.tanks.services.materialregistry
{
import alternativa.tanks.engine3d.IMaterialSequenceRegistry;
import alternativa.tanks.engine3d.ITextureMaterialRegistry;
import alternativa.tanks.engine3d.IndexedTextureConstructor;
import alternativa.tanks.vehicles.tanks.ISkinTextureRegistry;
public interface IMaterialRegistry
{
function get useMipMapping() : Boolean;
function set useMipMapping(param1:Boolean) : void;
function get textureMaterialRegistry() : ITextureMaterialRegistry;
function get materialSequenceRegistry() : IMaterialSequenceRegistry;
function get skinTextureRegistry() : ISkinTextureRegistry;
function get mapMaterialRegistry() : ITextureMaterialRegistry;
function clear() : void;
function createTextureConstructor() : IndexedTextureConstructor;
}
}
|
package alternativa.tanks.camera.controllers.spectator {
import alternativa.tanks.camera.CameraBookmark;
public interface BookmarkListener {
function onBookmarkSelected(param1:CameraBookmark) : void;
}
}
|
package alternativa.resource.factory
{
import alternativa.resource.Resource;
public interface IResourceFactory
{
function createResource(param1:int) : Resource;
}
}
|
package alternativa.register
{
import flash.utils.Dictionary;
public class ClientClass
{
private var _name:String;
private var _id:String;
private var _parent:ClientClass;
private var _children:Vector.<ClientClass>;
private var _models:Vector.<String>;
private var _modelsParams:Dictionary;
public function ClientClass(id:String, parent:ClientClass, name:String, models:Vector.<String> = null)
{
super();
this._id = id;
this._parent = parent;
this._name = name;
this._children = new Vector.<ClientClass>();
this._modelsParams = new Dictionary();
if(models != null)
{
this._models = models;
}
else
{
this._models = new Vector.<String>();
}
}
public function addChild(child:ClientClass) : void
{
this._children.push(child);
}
public function removeChild(child:ClientClass) : void
{
this._children.splice(this._children.indexOf(child),1);
}
public function get id() : String
{
return this._id;
}
public function get parent() : ClientClass
{
return this._parent;
}
public function get children() : Vector.<ClientClass>
{
return this._children;
}
public function get name() : String
{
return this._name;
}
public function get models() : Vector.<String>
{
return this._models;
}
public function get modelsParams() : Dictionary
{
return this._modelsParams;
}
public function setModelParams(modelId:String, params:Object) : void
{
this._modelsParams[modelId] = params;
}
public function toString() : String
{
var i:int = 0;
var key:* = undefined;
var s:String = "\nClientClass";
s += "\n id: " + this._id;
s += "\n name: " + this._name;
if(this._parent != null)
{
s += "\n parent id: " + this._parent.id;
}
if(this._children.length > 0)
{
s += "\n children id:";
for(i = 0; i < this._children.length; i++)
{
s += " " + ClientClass(this._children[i]).id;
}
}
if(this._models.length > 0)
{
s += "\n models: " + this._models;
s += "\n modelParams: \n";
for(key in this._modelsParams)
{
s += "\n " + key.toString() + ": " + this._modelsParams[key];
}
}
return s + "\n";
}
}
}
|
package projects.tanks.client.partners.impl.odnoklassniki.payment {
public interface IOdnoklassnikiPaymentModelBase {
function receivePaymentTransaction(param1:String, param2:String, param3:String) : void;
}
}
|
package projects.tanks.client.entrance.model.entrance.externalentrance {
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 ExternalEntranceModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _createLinkForExistingUserId:Long = Long.getLong(585546371,-672024828);
private var _createLinkForExistingUser_uidOrEmailCodec:ICodec;
private var _createLinkForExistingUser_passwordCodec:ICodec;
private var _registerNewUserId:Long = Long.getLong(603440169,-914721987);
private var _registerNewUser_uidCodec:ICodec;
private var _registerNewUser_referralHashCodec:ICodec;
private var _setLoginDataId:Long = Long.getLong(828747821,-1429059850);
private var _setLoginData_rememberMeCodec:ICodec;
private var _setLoginData_domainCodec:ICodec;
private var model:IModel;
public function ExternalEntranceModelServer(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._createLinkForExistingUser_uidOrEmailCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._createLinkForExistingUser_passwordCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerNewUser_uidCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerNewUser_referralHashCodec = this.protocol.getCodec(new TypeCodecInfo(String,true));
this._setLoginData_rememberMeCodec = this.protocol.getCodec(new TypeCodecInfo(Boolean,false));
this._setLoginData_domainCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function createLinkForExistingUser(param1:String, param2:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._createLinkForExistingUser_uidOrEmailCodec.encode(this.protocolBuffer,param1);
this._createLinkForExistingUser_passwordCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._createLinkForExistingUserId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
public function registerNewUser(param1:String, param2:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._registerNewUser_uidCodec.encode(this.protocolBuffer,param1);
this._registerNewUser_referralHashCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._registerNewUserId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
public function setLoginData(param1:Boolean, param2:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._setLoginData_rememberMeCodec.encode(this.protocolBuffer,param1);
this._setLoginData_domainCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._setLoginDataId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.client.tanksservices.model.notifier.premium {
public interface IPremiumNotifierModelBase {
function updateTimeLeft(param1:int) : void;
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.weakening {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class WeaponWeakeningModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:WeaponWeakeningModelServer;
private var client:IWeaponWeakeningModelBase = IWeaponWeakeningModelBase(this);
private var modelId:Long = Long.getLong(1486543535,-1939817925);
private var _reconfigureWeaponId:Long = Long.getLong(215209601,1065005749);
private var _reconfigureWeapon_maxDamageRadiusCodec:ICodec;
private var _reconfigureWeapon_minDamageRadiusCodec:ICodec;
public function WeaponWeakeningModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new WeaponWeakeningModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(WeaponWeakeningCC,false)));
this._reconfigureWeapon_maxDamageRadiusCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_minDamageRadiusCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
}
protected function getInitParam() : WeaponWeakeningCC {
return WeaponWeakeningCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._reconfigureWeaponId:
this.client.reconfigureWeapon(Number(this._reconfigureWeapon_maxDamageRadiusCodec.decode(param2)),Number(this._reconfigureWeapon_minDamageRadiusCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.chat {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.chat.BattleChatInput_bitmapBL.png")]
public class BattleChatInput_bitmapBL extends BitmapAsset {
public function BattleChatInput_bitmapBL() {
super();
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ModTable_upgradeSelectionCenterClass.png")]
public class ModTable_upgradeSelectionCenterClass extends BitmapAsset {
public function ModTable_upgradeSelectionCenterClass() {
super();
}
}
}
|
package controls.cellrenderer {
import flash.display.Bitmap;
import flash.display.BitmapData;
public class CellUnavailable extends CellRendererDefault {
private static const normalLeft:Class = CellUnavailable_normalLeft;
private static const normalLeftData:BitmapData = Bitmap(new normalLeft()).bitmapData;
private static const normalCenter:Class = CellUnavailable_normalCenter;
private static const normalCenterData:BitmapData = Bitmap(new normalCenter()).bitmapData;
private static const normalRight:Class = CellUnavailable_normalRight;
private static const normalRightData:BitmapData = Bitmap(new normalRight()).bitmapData;
public function CellUnavailable() {
super();
bmpLeft = normalLeftData;
bmpCenter = normalCenterData;
bmpRight = normalRightData;
}
}
}
|
package projects.tanks.client.battlefield.models.teamlight {
public class TeamLightCC {
private var _lightModes:Vector.<TeamLightParams>;
public function TeamLightCC(param1:Vector.<TeamLightParams> = null) {
super();
this._lightModes = param1;
}
public function get lightModes() : Vector.<TeamLightParams> {
return this._lightModes;
}
public function set lightModes(param1:Vector.<TeamLightParams>) : void {
this._lightModes = param1;
}
public function toString() : String {
var local1:String = "TeamLightCC [";
local1 += "lightModes = " + this.lightModes + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher.sfx {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class RocketLauncherSfxEvents implements RocketLauncherSfx {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function RocketLauncherSfxEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getSfxData() : RocketLauncherSfxData {
var result:RocketLauncherSfxData = null;
var i:int = 0;
var m:RocketLauncherSfx = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = RocketLauncherSfx(this.impl[i]);
result = m.getSfxData();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.panel.model.tutorialhints {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class TutorialHintsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function TutorialHintsModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package _codec.projects.tanks.client.clans.clan.info {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.clans.clan.info.ClanInfoCC;
public class VectorCodecClanInfoCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecClanInfoCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ClanInfoCC,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.<ClanInfoCC> = new Vector.<ClanInfoCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ClanInfoCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ClanInfoCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ClanInfoCC> = Vector.<ClanInfoCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist {
import alternativa.types.Long;
[ModelInterface]
public interface ISourceData {
function addByUid(param1:String) : void;
function checkUid(param1:String) : void;
function setSearchInput(param1:ISearchInput) : void;
function accept(param1:Long) : void;
}
}
|
package controls.chat {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.chat.BattleChatInput_bitmapRL.png")]
public class BattleChatInput_bitmapRL extends BitmapAsset {
public function BattleChatInput_bitmapRL() {
super();
}
}
}
|
package controls.resultassets
{
import assets.resultwindow.bres_BG_GRAY_PIXEL;
import assets.resultwindow.bres_BG_GRAY_TL;
public class ResultWindowGray extends ResultWindowBase
{
public function ResultWindowGray()
{
super();
tl = new bres_BG_GRAY_TL(1,1);
px = new bres_BG_GRAY_PIXEL(1,1);
}
}
}
|
package controls.buttons.h30px {
import controls.buttons.FixedHeightButtonSkin;
import controls.buttons.FixedHeightRectangleSkin;
public class OrangeMediumButtonSkin extends FixedHeightButtonSkin {
private static const leftUpClass:Class = OrangeMediumButtonSkin_leftUpClass;
private static const middleUpClass:Class = OrangeMediumButtonSkin_middleUpClass;
private static const rightUpClass:Class = OrangeMediumButtonSkin_rightUpClass;
private static const leftOverClass:Class = OrangeMediumButtonSkin_leftOverClass;
private static const middleOverClass:Class = OrangeMediumButtonSkin_middleOverClass;
private static const rightOverClass:Class = OrangeMediumButtonSkin_rightOverClass;
private static const leftDownClass:Class = OrangeMediumButtonSkin_leftDownClass;
private static const middleDownClass:Class = OrangeMediumButtonSkin_middleDownClass;
private static const rightDownClass:Class = OrangeMediumButtonSkin_rightDownClass;
public function OrangeMediumButtonSkin() {
super(createStateSkin(leftUpClass,middleUpClass,rightUpClass),createStateSkin(leftOverClass,middleOverClass,rightOverClass),createStateSkin(leftDownClass,middleDownClass,rightDownClass),createStateSkin(leftUpClass,middleUpClass,rightUpClass));
}
private static function createStateSkin(param1:Class, param2:Class, param3:Class) : FixedHeightRectangleSkin {
return new FixedHeightRectangleSkin(param1,param2,param3);
}
}
}
|
package alternativa.tanks.service.battleinfo {
import alternativa.tanks.view.battleinfo.dm.BattleInfoDmParams;
import alternativa.tanks.view.battleinfo.team.BattleInfoTeamParams;
import alternativa.types.Long;
import flash.events.IEventDispatcher;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battleselect.model.battle.entrance.user.BattleInfoUser;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public interface IBattleInfoFormService extends IEventDispatcher {
function showDmForm(param1:BattleInfoDmParams) : void;
function showTeamForm(param1:BattleInfoTeamParams) : void;
function hideForms() : void;
function hideBattleForms() : void;
function destroy() : void;
function updateTeamScore(param1:BattleTeam, param2:int) : void;
function removeUser(param1:Long) : void;
function updateUserScore(param1:Long, param2:int) : void;
function updateUserSuspiciousState(param1:Long, param2:Boolean) : void;
function swapTeams() : void;
function roundStart(param1:int) : void;
function roundFinish() : void;
function battleStop() : void;
function showLastShowedForm() : void;
function removeFormFromStage() : void;
function getSelectedBattle() : IGameObject;
function updateBattleName() : void;
function addUser(param1:BattleInfoUser, param2:BattleTeam = null) : void;
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.partners.mailru {
import alternativa.osgi.service.launcherparams.ILauncherParams;
import flash.utils.Dictionary;
import platform.client.core.general.socialnetwork.types.LoginParameters;
import platform.clients.fp10.libraries.alternativapartners.type.IParametersListener;
import platform.clients.fp10.libraries.alternativapartners.type.IPartner;
import projects.tanks.client.partners.impl.mailru.login.IMailruGamesLoginModelBase;
import projects.tanks.client.partners.impl.mailru.login.MailruGamesLoginModelBase;
[ModelInfo]
public class MailruGamesLoginModel extends MailruGamesLoginModelBase implements IMailruGamesLoginModelBase, IPartner {
[Inject]
public static var paramsService:ILauncherParams;
public function MailruGamesLoginModel() {
super();
}
public function getLoginParameters(param1:IParametersListener) : void {
var local2:Dictionary = new Dictionary();
local2["tokenUrl"] = paramsService.getParameter("tokenUrl").replace(/\|/g,"&");
param1.onSetParameters(new LoginParameters(local2));
}
public function hasPaymentAction() : Boolean {
return false;
}
public function paymentAction() : void {
}
public function getFailRedirectUrl() : String {
return "https://games.mail.ru/app/3436";
}
public function isExternalLoginAllowed() : Boolean {
return false;
}
public function hasRatings() : Boolean {
return false;
}
}
}
|
package platform.clients.fp10.libraries.alternativapartners.type {
public class Callback {
private var _onSuccess:Function;
private var _onFailure:Function;
public function Callback(param1:Function, param2:Function = null) {
super();
this._onSuccess = param1;
this._onFailure = param2;
}
public function get onSuccess() : Function {
return this._onSuccess;
}
public function get onFailure() : Function {
return this._onFailure;
}
}
}
|
package alternativa.osgi.service.loaderParams
{
public interface ILoaderParamsService
{
function get params() : Object;
}
}
|
package alternativa.tanks.models.battlefield.effects.levelup.rangs
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class BigRangIcon_rang_30 extends BitmapAsset
{
public function BigRangIcon_rang_30()
{
super();
}
}
}
|
package alternativa.tanks.model.payment.modes.sms {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.panel.model.payment.modes.sms.types.Country;
public class SMSPayModeEvents implements SMSPayMode {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function SMSPayModeEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getCountries() : Vector.<Country> {
var result:Vector.<Country> = null;
var i:int = 0;
var m:SMSPayMode = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = SMSPayMode(this.impl[i]);
result = m.getCountries();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.artillery.rotation {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class ArtilleryRotatingTurretModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ArtilleryRotatingTurretModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.model.payment.modes.sms {
import alternativa.tanks.gui.payment.events.SMSformEvent;
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.SMSForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.CrystalsOnlyPaymentMode;
import alternativa.tanks.model.payment.modes.PayModeDescription;
import alternativa.tanks.model.payment.modes.description.PayModeBottomDescriptionInternal;
import flash.net.SharedObject;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.modes.sms.ISMSPayModeModelBase;
import projects.tanks.client.panel.model.payment.modes.sms.SMSPayModeModelBase;
import projects.tanks.client.panel.model.payment.modes.sms.types.Country;
import projects.tanks.client.panel.model.payment.modes.sms.types.SMSNumber;
import projects.tanks.client.panel.model.payment.modes.sms.types.SMSOperator;
import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService;
[ModelInfo]
public class SMSPayModeModel extends SMSPayModeModelBase implements ISMSPayModeModelBase, SMSPayMode, PayModeDescription, PayModeView, ObjectLoadListener, ObjectUnloadListener, CrystalsOnlyPaymentMode {
[Inject]
public static var storageService:IStorageService;
public function SMSPayModeModel() {
super();
}
public function getCountries() : Vector.<Country> {
return getInitParam().countries;
}
public function setOperators(param1:Vector.<SMSOperator>) : void {
this.view().setOperators(param1);
}
public function setNumbers(param1:Vector.<SMSNumber>) : void {
this.view().setNumbers(param1);
}
public function getDescription() : String {
var local1:String = this.view().getDescription();
if(this.view().selectedCountry == "IT") {
local1 += "\n" + "<font color=\'#00ff0b\'><u><a href=\'http://smshelp.me/tankionline/\' target=\'_blank\'>Dettagli di aquisto</a></u></font>\n" + "Supporto tecnico:\n" + "+390689970531\n\n" + "<font color=\'#00ff0b\'><u><a href=\'http://www.parlamento.it/parlam/leggi/deleghe/03196dl.htm\' target=\'_blank\'>Decreto196/2003</a></u></font>\n";
}
return local1;
}
public function rewriteCategoryDescription() : Boolean {
return true;
}
private function view() : SMSForm {
return SMSForm(this.getView());
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectLoaded() : void {
this.createView();
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
private function createView() : void {
var local1:SMSForm = new SMSForm(object);
local1.addEventListener(SMSformEvent.SELECT_COUNTRY,getFunctionWrapper(this.onSMSformCountrySelected));
local1.addEventListener(SMSformEvent.SELECT_OPERATOR,getFunctionWrapper(this.onSMSformOperatorSelected));
putData(PayModeForm,local1);
}
private function onSMSformCountrySelected(param1:SMSformEvent) : void {
var local2:SMSForm = param1.form;
var local3:SharedObject = storageService.getStorage();
var local4:String = String(getData(String));
var local5:String = local2.selectedCountry;
if(local5 != "" && local5 != local4) {
putData(String,local5);
local3.data.userCountryId = local5;
local3.flush();
server.getOperators(local5);
}
var local6:PayModeBottomDescriptionInternal = PayModeBottomDescriptionInternal(object.adapt(PayModeBottomDescriptionInternal));
local6.setEnabled(local5 == "FR");
}
private function onSMSformOperatorSelected(param1:SMSformEvent) : void {
var local2:SMSForm = param1.form;
var local3:SharedObject = storageService.getStorage();
var local4:int = local2.selectedOperator;
if(local4 != -1) {
local3.data.userOperatorId = local4;
local3.flush();
server.getNumbers(local4);
}
}
}
}
|
package projects.tanks.client.battlefield.models.user.tank {
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.Byte;
import alternativa.types.Float;
import alternativa.types.Long;
import alternativa.types.Short;
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;
import projects.tanks.client.battlefield.models.user.tank.commands.MoveCommand;
public class TankModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _deathConfirmationCommandId:Long = Long.getLong(674088239,-466180297);
private var _handleCollisionWithOtherTankId:Long = Long.getLong(27305946,689085087);
private var _handleCollisionWithOtherTank_otherTankZVelocityCodec:ICodec;
private var _moveCommandId:Long = Long.getLong(2114337908,577714981);
private var _moveCommand_clientTimeCodec:ICodec;
private var _moveCommand_specificationIdCodec:ICodec;
private var _moveCommand_moveCommandCodec:ICodec;
private var _movementControlCommandId:Long = Long.getLong(1028282615,1943158798);
private var _movementControlCommand_clientTimeCodec:ICodec;
private var _movementControlCommand_specificationIdCodec:ICodec;
private var _movementControlCommand_controlCodec:ICodec;
private var _movementControlCommand_turnSpeedNumberCodec:ICodec;
private var model:IModel;
public function TankModelServer(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._handleCollisionWithOtherTank_otherTankZVelocityCodec = this.protocol.getCodec(new TypeCodecInfo(Float,false));
this._moveCommand_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._moveCommand_specificationIdCodec = this.protocol.getCodec(new TypeCodecInfo(Short,false));
this._moveCommand_moveCommandCodec = this.protocol.getCodec(new TypeCodecInfo(MoveCommand,false));
this._movementControlCommand_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._movementControlCommand_specificationIdCodec = this.protocol.getCodec(new TypeCodecInfo(Short,false));
this._movementControlCommand_controlCodec = this.protocol.getCodec(new TypeCodecInfo(Byte,false));
this._movementControlCommand_turnSpeedNumberCodec = this.protocol.getCodec(new TypeCodecInfo(Byte,false));
}
public function deathConfirmationCommand() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._deathConfirmationCommandId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function handleCollisionWithOtherTank(param1:Number) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._handleCollisionWithOtherTank_otherTankZVelocityCodec.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._handleCollisionWithOtherTankId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function moveCommand(param1:int, param2:int, param3:MoveCommand) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._moveCommand_clientTimeCodec.encode(this.protocolBuffer,param1);
this._moveCommand_specificationIdCodec.encode(this.protocolBuffer,param2);
this._moveCommand_moveCommandCodec.encode(this.protocolBuffer,param3);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local4:SpaceCommand = new SpaceCommand(Model.object.id,this._moveCommandId,this.protocolBuffer);
var local5:IGameObject = Model.object;
var local6:ISpace = local5.space;
local6.commandSender.sendCommand(local4);
this.protocolBuffer.optionalMap.clear();
}
public function movementControlCommand(param1:int, param2:int, param3:int, param4:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._movementControlCommand_clientTimeCodec.encode(this.protocolBuffer,param1);
this._movementControlCommand_specificationIdCodec.encode(this.protocolBuffer,param2);
this._movementControlCommand_controlCodec.encode(this.protocolBuffer,param3);
this._movementControlCommand_turnSpeedNumberCodec.encode(this.protocolBuffer,param4);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local5:SpaceCommand = new SpaceCommand(Model.object.id,this._movementControlCommandId,this.protocolBuffer);
var local6:IGameObject = Model.object;
var local7:ISpace = local6.space;
local7.commandSender.sendCommand(local5);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.clients.flash.commons.services.timeunit {
public interface ITimeUnitService {
function getLocalizedTimeString(param1:int, param2:int, param3:int) : String;
function getTimeUnitNames(param1:int, param2:int, param3:int) : TimeUnitNames;
function getLocalizedDaysString(param1:int) : String;
function getLocalizedDaysName(param1:int) : String;
function getLocalizedShortDaysName(param1:int) : String;
}
}
|
package _codec.projects.tanks.client.panel.model.garage.rankupsupplybonus {
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.garage.rankupsupplybonus.RankUpSupplyBonusInfo;
public class VectorCodecRankUpSupplyBonusInfoLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecRankUpSupplyBonusInfoLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(RankUpSupplyBonusInfo,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.<RankUpSupplyBonusInfo> = new Vector.<RankUpSupplyBonusInfo>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = RankUpSupplyBonusInfo(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:RankUpSupplyBonusInfo = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<RankUpSupplyBonusInfo> = Vector.<RankUpSupplyBonusInfo>(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.payment.modes.paygarden {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.GoToUrlForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.PayUrl;
import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.modes.paygarden.IPayGardenPaymentModelBase;
import projects.tanks.client.panel.model.payment.modes.paygarden.PayGardenPaymentModelBase;
import projects.tanks.client.panel.model.payment.modes.paygarden.PayGardenProductType;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
[ModelInfo]
public class PayGardenPaymentModel extends PayGardenPaymentModelBase implements IPayGardenPaymentModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, ObjectUnloadListener, PayGardenPayment {
[Inject]
public static var paymentWindowService:PaymentWindowService;
public function PayGardenPaymentModel() {
super();
}
public function receiveUrl(param1:PaymentRequestUrl) : void {
PayUrl(object.adapt(PayUrl)).forceGoToOrderedUrl(param1);
}
public function requestAsyncUrl() : void {
var local1:Long = paymentWindowService.getChosenItem().id;
server.getPaymentUrl(local1);
}
public function objectLoaded() : void {
putData(PayModeForm,new GoToUrlForm(object));
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
public function getProductType() : PayGardenProductType {
return getInitParam().productType;
}
}
}
|
package alternativa.tanks.models.weapon.healing {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IHealingGunSFXModelAdapt implements IHealingGunSFXModel {
private var object:IGameObject;
private var impl:IHealingGunSFXModel;
public function IHealingGunSFXModelAdapt(param1:IGameObject, param2:IHealingGunSFXModel) {
super();
this.object = param1;
this.impl = param2;
}
public function getHealingGunEffects() : HealingGunEffects {
var result:HealingGunEffects = null;
try {
Model.object = this.object;
result = this.impl.getHealingGunEffects();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.view.mainview.grouplist.item {
import alternativa.types.Long;
import fl.data.DataProvider;
import projects.tanks.client.battleselect.model.matchmaking.group.notify.MatchmakingUserData;
import projects.tanks.client.battleselect.model.matchmaking.group.notify.MountItemsUserData;
import projects.tanks.client.commons.types.ItemCategoryEnum;
import projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup.MatchmakingGroupService;
public class GroupUsersDataProvider extends DataProvider {
[Inject]
public static var matchmakingGroupService:MatchmakingGroupService;
private static const MAX_USERS_IN_GROUP:int = 3;
private static var inviteUserSlot:Object = {"isInviteSlot":true};
private static var emptySlot:Object = {"id":null};
private var currentUsersCount:int = 0;
public function GroupUsersDataProvider() {
super();
var local1:int = 0;
while(local1 < MAX_USERS_IN_GROUP) {
addItem(emptySlot);
local1++;
}
}
public function addUser(param1:MatchmakingUserData) : void {
var local2:Object = {};
local2.id = param1.id;
local2.weaponName = param1.weaponName + " M" + param1.weaponModification;
local2.armorName = param1.armorName + " M" + param1.armorModification;
local2.ready = param1.userIsReady;
replaceItemAt(local2,this.currentUsersCount);
invalidateItemAt(this.currentUsersCount);
++this.currentUsersCount;
if(this.currentUsersCount < MAX_USERS_IN_GROUP && Boolean(matchmakingGroupService.isGroupInviteEnabled())) {
replaceItemAt(inviteUserSlot,this.currentUsersCount);
}
invalidate();
}
public function removeUser(param1:Long) : void {
var local2:int = this.getItemIndexByUserId(param1);
if(local2 >= 0) {
removeItemAt(local2);
}
--this.currentUsersCount;
addItem(emptySlot);
if(matchmakingGroupService.isGroupInviteEnabled()) {
replaceItemAt(inviteUserSlot,this.currentUsersCount);
}
invalidate();
}
public function setUserReady(param1:Long) : void {
var local2:int = this.getItemIndexByUserId(param1);
getItemAt(local2).ready = true;
invalidateItemAt(local2);
}
public function setUserNotReady(param1:Long) : void {
var local2:int = this.getItemIndexByUserId(param1);
getItemAt(local2).ready = false;
invalidateItemAt(local2);
}
public function updateMountedItem(param1:MountItemsUserData) : void {
var local2:Long = param1.id;
var local3:ItemCategoryEnum = param1.itemCategory;
var local4:int = this.getItemIndexByUserId(local2);
this.updateMountedItemByCategory(getItemAt(local4),param1,local3);
invalidateItemAt(local4);
}
private function updateMountedItemByCategory(param1:Object, param2:MountItemsUserData, param3:ItemCategoryEnum) : void {
switch(param3) {
case ItemCategoryEnum.WEAPON:
param1.weaponName = param2.name + " M" + param2.modification;
break;
case ItemCategoryEnum.ARMOR:
param1.armorName = param2.name + " M" + param2.modification;
}
}
public function removeAllUsers() : void {
var local1:int = 0;
while(local1 < MAX_USERS_IN_GROUP) {
replaceItemAt(emptySlot,local1);
local1++;
}
invalidate();
this.currentUsersCount = 0;
}
public function isEveryoneReady() : Boolean {
var local1:int = 0;
while(local1 < this.currentUsersCount) {
if(!getItemAt(local1).ready) {
return false;
}
local1++;
}
return true;
}
private function getItemIndexByUserId(param1:Long) : int {
var local2:Object = null;
var local3:int = 0;
while(local3 < this.currentUsersCount) {
local2 = super.getItemAt(local3);
if(local2["id"] == param1) {
return local3;
}
local3++;
}
return -1;
}
}
}
|
package alternativa.tanks.models.weapon.thunder {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IThunderSFXModelEvents implements IThunderSFXModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IThunderSFXModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getEffects() : IThunderEffects {
var result:IThunderEffects = null;
var i:int = 0;
var m:IThunderSFXModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IThunderSFXModel(this.impl[i]);
result = m.getEffects();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.statistics.targetingmode {
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.EnumCodecInfo;
import projects.tanks.client.battlefield.models.statistics.targetingmode.TargetingMode;
public class VectorCodecTargetingModeLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTargetingModeLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(TargetingMode,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.<TargetingMode> = new Vector.<TargetingMode>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TargetingMode(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TargetingMode = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TargetingMode> = Vector.<TargetingMode>(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.launcher {
import alternativa.startup.ConnectionParameters;
public interface ServerConfigLoaderListener {
function onServerConfigLoadingStart() : void;
function onServerConfigLoadingComplete() : void;
function onServerConfigLoadingError(param1:String) : void;
function onServerConfigLoadingProgress(param1:uint, param2:uint) : void;
function onServerUnavailable() : void;
function onServerOverloaded() : void;
function onServerConfigParsed(param1:ConnectionParameters) : void;
function log(param1:String) : void;
}
}
|
package alternativa.tanks.model.challenge.greenpanel.green
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GreenPack_bg extends BitmapAsset
{
public function GreenPack_bg()
{
super();
}
}
}
|
package projects.tanks.client.panel.model.donationalert {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.panel.model.donationalert.types.DonationData;
public class DonationAlertModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:DonationAlertModelServer;
private var client:IDonationAlertModelBase = IDonationAlertModelBase(this);
private var modelId:Long = Long.getLong(790638048,-212453148);
private var _showDonationAlertId:Long = Long.getLong(1759230741,1008086188);
private var _showDonationAlert_dataCodec:ICodec;
private var _showDonationAlertWithEmailBlockId:Long = Long.getLong(268614093,535858133);
private var _showDonationAlertWithEmailBlock_dataCodec:ICodec;
private var _showEmailIsBusyId:Long = Long.getLong(1383818686,-1315591703);
private var _showEmailIsBusy_emailCodec:ICodec;
private var _showEmailIsForbiddenId:Long = Long.getLong(1589408480,-2143336969);
private var _showEmailIsForbidden_emailCodec:ICodec;
private var _showEmailIsFreeId:Long = Long.getLong(1383818686,-1315475876);
private var _showEmailIsFree_emailCodec:ICodec;
public function DonationAlertModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new DonationAlertModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(DonationAlertCC,false)));
this._showDonationAlert_dataCodec = this._protocol.getCodec(new TypeCodecInfo(DonationData,false));
this._showDonationAlertWithEmailBlock_dataCodec = this._protocol.getCodec(new TypeCodecInfo(DonationData,false));
this._showEmailIsBusy_emailCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._showEmailIsForbidden_emailCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._showEmailIsFree_emailCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
}
protected function getInitParam() : DonationAlertCC {
return DonationAlertCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._showDonationAlertId:
this.client.showDonationAlert(DonationData(this._showDonationAlert_dataCodec.decode(param2)));
break;
case this._showDonationAlertWithEmailBlockId:
this.client.showDonationAlertWithEmailBlock(DonationData(this._showDonationAlertWithEmailBlock_dataCodec.decode(param2)));
break;
case this._showEmailIsBusyId:
this.client.showEmailIsBusy(String(this._showEmailIsBusy_emailCodec.decode(param2)));
break;
case this._showEmailIsForbiddenId:
this.client.showEmailIsForbidden(String(this._showEmailIsForbidden_emailCodec.decode(param2)));
break;
case this._showEmailIsFreeId:
this.client.showEmailIsFree(String(this._showEmailIsFree_emailCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.battlefield.models.user.resistance {
public class TankResistancesCC {
private var _resistances:Vector.<TankResistance>;
public function TankResistancesCC(param1:Vector.<TankResistance> = null) {
super();
this._resistances = param1;
}
public function get resistances() : Vector.<TankResistance> {
return this._resistances;
}
public function set resistances(param1:Vector.<TankResistance>) : void {
this._resistances = param1;
}
public function toString() : String {
var local1:String = "TankResistancesCC [";
local1 += "resistances = " + this.resistances + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.news
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class NewsIcons_shaft_secret extends BitmapAsset
{
public function NewsIcons_shaft_secret()
{
super();
}
}
}
|
package alternativa.tanks.models.battlefield.gamemode
{
import alternativa.engine3d.core.ShadowMap;
import alternativa.engine3d.lights.DirectionalLight;
import alternativa.init.Main;
import alternativa.osgi.service.storage.IStorageService;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.model.panel.IBattleSettings;
import alternativa.tanks.models.battlefield.BattleView3D;
import flash.display.Bitmap;
import flash.display.BitmapData;
public class FogGameMode implements IGameMode
{
private var camera:GameCamera;
public function FogGameMode()
{
super();
}
public function applyChanges(viewport:BattleView3D) : void
{
var light:DirectionalLight = null;
var camera:GameCamera = null;
light = null;
camera = null;
light = null;
camera = viewport.camera;
this.camera = camera;
camera.directionalLightStrength = Number(1);
camera.ambientColor = 2304312;
camera.deferredLighting = true;
light = new DirectionalLight(2105382);
light.useShadowMap = true;
light.rotationX = Number(-4.420796);
light.rotationY = Number(0);
light.rotationZ = Number(3.5);
light.intensity = Number(1.1);
camera.directionalLight = light;
camera.shadowMap = new ShadowMap(2048,5000,15000,0,0);
camera.shadowMapStrength = Number(0.8);
camera.shadowMap.bias = Number(0.8);
camera.shadowMap.biasMultiplier = Number(30);
camera.shadowMap.additionalSpace = Number(10000);
camera.shadowMap.alphaThreshold = Number(0.1);
camera.useShadowMap = true;
camera.ssao = true;
camera.ssaoRadius = Number(400);
camera.ssaoRange = Number(450);
camera.ssaoColor = 0;
camera.ssaoAlpha = Number(1.5);
}
public function applyChangesBeforeSettings(settings:IBattleSettings) : void
{
if(settings.fog && this.camera.fogStrength != 1)
{
this.camera.fogStrength = Number(1);
}
else if(!settings.fog)
{
this.camera.fogStrength = Number(0);
}
if(settings.shadows && !this.camera.useShadowMap)
{
this.camera.useShadowMap = true;
if(this.camera.directionalLight != null)
{
this.camera.directionalLight.useShadowMap = true;
}
this.camera.shadowMapStrength = Number(1);
}
else if(!settings.shadows)
{
this.camera.useShadowMap = false;
if(this.camera.directionalLight != null)
{
this.camera.directionalLight.useShadowMap = false;
}
this.camera.shadowMapStrength = Number(0);
}
if(settings.defferedLighting && this.camera.directionalLightStrength != 1)
{
this.camera.directionalLight.intensity = Number(1.1);
this.camera.directionalLightStrength = Number(1);
this.camera.deferredLighting = true;
this.camera.deferredLightingStrength = Number(1);
}
else if(!settings.defferedLighting)
{
this.camera.directionalLight.intensity = Number(0);
this.camera.directionalLightStrength = Number(0);
this.camera.deferredLighting = false;
this.camera.deferredLightingStrength = Number(0);
}
if(IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_ssao"] != null)
{
this.camera.ssao = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_ssao"];
}
else
{
this.camera.ssao = false;
}
}
public function applyColorchangesToSkybox(skybox:BitmapData) : BitmapData
{
var btm:BitmapData = new BitmapData(1,1,false,1382169 + 7559484);
skybox.colorTransform(skybox.rect,new Bitmap(btm).transform.colorTransform);
return skybox;
}
}
}
|
package alternativa.tanks.view.mainview {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.mainview.MatchmakingLayout_groupIconClass.png")]
public class MatchmakingLayout_groupIconClass extends BitmapAsset {
public function MatchmakingLayout_groupIconClass() {
super();
}
}
}
|
package platform.client.core.general.resourcelocale.osgi {
import _codec.platform.client.core.general.resourcelocale.format.CodecImagePair;
import _codec.platform.client.core.general.resourcelocale.format.CodecLocalizedFileFormat;
import _codec.platform.client.core.general.resourcelocale.format.CodecStringPair;
import _codec.platform.client.core.general.resourcelocale.format.VectorCodecImagePairLevel1;
import _codec.platform.client.core.general.resourcelocale.format.VectorCodecLocalizedFileFormatLevel1;
import _codec.platform.client.core.general.resourcelocale.format.VectorCodecStringPairLevel1;
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.core.general.resourcelocale.format.ImagePair;
import platform.client.core.general.resourcelocale.format.LocalizedFileFormat;
import platform.client.core.general.resourcelocale.format.StringPair;
public class Activator implements IBundleActivator {
public static var osgi:OSGi;
public function Activator() {
super();
}
public function start(param1:OSGi) : void {
var local3:ICodec = null;
osgi = param1;
var local2:IProtocol = IProtocol(osgi.getService(IProtocol));
local3 = new CodecImagePair();
local2.registerCodec(new TypeCodecInfo(ImagePair,false),local3);
local2.registerCodec(new TypeCodecInfo(ImagePair,true),new OptionalCodecDecorator(local3));
local3 = new CodecLocalizedFileFormat();
local2.registerCodec(new TypeCodecInfo(LocalizedFileFormat,false),local3);
local2.registerCodec(new TypeCodecInfo(LocalizedFileFormat,true),new OptionalCodecDecorator(local3));
local3 = new CodecStringPair();
local2.registerCodec(new TypeCodecInfo(StringPair,false),local3);
local2.registerCodec(new TypeCodecInfo(StringPair,true),new OptionalCodecDecorator(local3));
local3 = new VectorCodecImagePairLevel1(false);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(ImagePair,false),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(ImagePair,false),true,1),new OptionalCodecDecorator(local3));
local3 = new VectorCodecImagePairLevel1(true);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(ImagePair,true),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(ImagePair,true),true,1),new OptionalCodecDecorator(local3));
local3 = new VectorCodecLocalizedFileFormatLevel1(false);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(LocalizedFileFormat,false),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(LocalizedFileFormat,false),true,1),new OptionalCodecDecorator(local3));
local3 = new VectorCodecLocalizedFileFormatLevel1(true);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(LocalizedFileFormat,true),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(LocalizedFileFormat,true),true,1),new OptionalCodecDecorator(local3));
local3 = new VectorCodecStringPairLevel1(false);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StringPair,false),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StringPair,false),true,1),new OptionalCodecDecorator(local3));
local3 = new VectorCodecStringPairLevel1(true);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StringPair,true),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(StringPair,true),true,1),new OptionalCodecDecorator(local3));
}
public function stop(param1:OSGi) : void {
}
}
}
|
package projects.tanks.client.clans.license.user {
import platform.client.fp10.core.type.IGameObject;
public class LicenseClanUserCC {
private var _clanLicense:Boolean;
private var _licenseGarageObject:IGameObject;
public function LicenseClanUserCC(param1:Boolean = false, param2:IGameObject = null) {
super();
this._clanLicense = param1;
this._licenseGarageObject = param2;
}
public function get clanLicense() : Boolean {
return this._clanLicense;
}
public function set clanLicense(param1:Boolean) : void {
this._clanLicense = param1;
}
public function get licenseGarageObject() : IGameObject {
return this._licenseGarageObject;
}
public function set licenseGarageObject(param1:IGameObject) : void {
this._licenseGarageObject = param1;
}
public function toString() : String {
var local1:String = "LicenseClanUserCC [";
local1 += "clanLicense = " + this.clanLicense + " ";
local1 += "licenseGarageObject = " + this.licenseGarageObject + " ";
return local1 + "]";
}
}
}
|
package _codec.projects.tanks.client.garage.models.item.relativeproperties {
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.garage.models.item.relativeproperties.RelativePropertiesCC;
import projects.tanks.client.garage.models.item.relativeproperties.RelativeProperty;
public class CodecRelativePropertiesCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_properties:ICodec;
public function CodecRelativePropertiesCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_properties = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(RelativeProperty,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:RelativePropertiesCC = new RelativePropertiesCC();
local2.properties = this.codec_properties.decode(param1) as Vector.<RelativeProperty>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:RelativePropertiesCC = RelativePropertiesCC(param2);
this.codec_properties.encode(param1,local3.properties);
}
}
}
|
package alternativa.tanks.engine3d
{
import alternativa.engine3d.materials.MaterialEntry;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.tanks.materials.AnimatedPaintMaterial;
import alternativa.tanks.materials.PaintMaterial;
import flash.display.BitmapData;
import flash.utils.Dictionary;
import scpacker.resource.images.ImageResource;
import scpacker.resource.images.MultiframeResourceData;
public class TextureMaterialRegistry implements ITextureMaterialRegistry
{
private var _useMipMapping:Boolean;
private var materialStat:CachedEntityStat;
private var mipMappingEnabled:Boolean = true;
private const materials:Vector.<TextureMaterial> = new Vector.<TextureMaterial>();
private const entryForTexture:Dictionary = new Dictionary();
private const entryForMaterial:Dictionary = new Dictionary();
public function TextureMaterialRegistry(value:int)
{
this.materialStat = new CachedEntityStat();
super();
}
public function set timerInterval(value:int) : void
{
}
public function getAnimatedPaint(imageResource:ImageResource, lightmap:BitmapData, details:BitmapData, objId:String) : AnimatedPaintMaterial
{
var _loc7_:MaterialEntry = null;
++this.materialStat.requestCount;
var _loc3_:String = imageResource.id + objId;
if(_loc3_ in this.entryForTexture)
{
_loc7_ = this.entryForTexture[_loc3_];
++_loc7_.referenceCount;
return _loc7_.material as AnimatedPaintMaterial;
}
var multiframeData:MultiframeResourceData = imageResource.multiframeData;
var _loc4_:int = imageResource.bitmapData.width / multiframeData.widthFrame;
var _loc5_:int = imageResource.bitmapData.height / multiframeData.heigthFrame;
var _loc6_:AnimatedPaintMaterial = new AnimatedPaintMaterial(imageResource.bitmapData as BitmapData,lightmap,details,_loc4_,_loc5_,multiframeData.fps,multiframeData.numFrames,!!this.mipMappingEnabled ? int(int(1)) : int(int(0)));
_loc7_ = this.createPaintMaterialEntry(_loc3_,_loc6_);
++_loc7_.referenceCount;
this.materials.push(_loc6_);
++this.materialStat.createCount;
return _loc6_;
}
public function getPaint1(imageResource:ImageResource, lightmap:BitmapData, details:BitmapData, objId:String) : PaintMaterial
{
var _loc5_:MaterialEntry = null;
++this.materialStat.requestCount;
var _loc3_:String = imageResource.id + objId;
if(_loc3_ in this.entryForTexture)
{
_loc5_ = this.entryForTexture[_loc3_];
++_loc5_.referenceCount;
return _loc5_.material as PaintMaterial;
}
var _loc4_:PaintMaterial = new PaintMaterial(imageResource.bitmapData as BitmapData,lightmap,details,!!this.mipMappingEnabled ? int(int(int(1))) : int(int(int(0))));
_loc5_ = this.createPaintMaterialEntry(_loc3_,_loc4_);
++_loc5_.referenceCount;
this.materials.push(_loc4_);
++this.materialStat.createCount;
return _loc4_;
}
private function createPaintMaterialEntry(param1:String, param2:TextureMaterial) : MaterialEntry
{
var _loc3_:MaterialEntry = new MaterialEntry(param1,param2);
this.entryForTexture[param1] = _loc3_;
this.entryForMaterial[param2] = _loc3_;
return _loc3_;
}
public function set resoluion(value:Number) : void
{
var material:TextureMaterial = null;
for each(material in this.materials)
{
material.resolution = value;
}
}
public function get useMipMapping() : Boolean
{
return this._useMipMapping;
}
public function set useMipMapping(value:Boolean) : void
{
this._useMipMapping = value;
}
public function getMaterial(materialType:MaterialType, param1:BitmapData, mipMapResolution:Number, param2:Boolean = true) : TextureMaterial
{
if(param1 == null)
{
throw new ArgumentError("Texture is null");
}
++this.materialStat.requestCount;
var _loc3_:MaterialEntry = this.getOrCreateEntry(param1,param2);
++_loc3_.referenceCount;
return _loc3_.material;
}
private function getOrCreateEntry(param1:BitmapData, param2:Boolean) : MaterialEntry
{
var _loc4_:TextureMaterial = null;
var _loc3_:MaterialEntry = this.entryForTexture[param1];
if(_loc3_ == null)
{
_loc4_ = this.createMaterial(param1,param2);
_loc3_ = this.createMaterialEntry(param1,_loc4_);
}
return _loc3_;
}
private function createMaterial(param1:BitmapData, param2:Boolean) : TextureMaterial
{
var _loc3_:BitmapData = this.getTexture(param1,param2);
var _loc4_:TextureMaterial = TextureMaterialFactory.createTextureMaterial(_loc3_,this.mipMappingEnabled);
this.materials.push(_loc4_);
++this.materialStat.createCount;
return _loc4_;
}
private function createMaterialEntry(param1:BitmapData, param2:TextureMaterial) : MaterialEntry
{
var _loc3_:MaterialEntry = new MaterialEntry(param1,param2);
this.entryForTexture[param1] = _loc3_;
this.entryForMaterial[param2] = _loc3_;
return _loc3_;
}
public function addMaterial(param1:TextureMaterial) : void
{
var _loc2_:MaterialEntry = this.createMaterialEntry(null,param1);
++_loc2_.referenceCount;
this.entryForMaterial[param1] = _loc2_;
this.materials.push(param1);
}
protected function getTexture(param1:BitmapData, param2:Boolean) : BitmapData
{
return param1;
}
public function getDump() : String
{
var s:String = "=== TextureMaterialRegistry ===\n";
return s + ("Total mipmaps: " + 0 + "\n" + "Total size: " + 0 + "\n" + "Scheduled materials: " + 0 + "\n");
}
public function disposeMaterial(material:TextureMaterial) : void
{
if(material == null)
{
return;
}
var _loc2_:MaterialEntry = this.entryForMaterial[material];
if(_loc2_ != null)
{
++this.materialStat.releaseCount;
--_loc2_.referenceCount;
if(_loc2_.referenceCount == 0)
{
this.removeMaterialEntry(_loc2_);
}
}
}
private function removeMaterialEntry(param1:MaterialEntry) : void
{
++this.materialStat.destroyCount;
var _loc2_:TextureMaterial = param1.material;
if(param1.keyData in this.entryForTexture)
{
delete this.entryForTexture[param1.keyData];
}
delete this.entryForMaterial[_loc2_];
param1.material = null;
var _loc3_:int = this.materials.indexOf(_loc2_);
this.materials.splice(_loc3_,1);
_loc2_.dispose();
_loc2_ = null;
}
protected function forEachMaterial(param1:Function) : void
{
var _loc2_:TextureMaterial = null;
for each(_loc2_ in this.materials)
{
param1(_loc2_);
}
}
public function clear() : void
{
this.forEachMaterial(this._clearTexture);
this.materials.length = 0;
clearDictionary(this.entryForTexture);
clearDictionary(this.entryForMaterial);
this.materialStat.clear();
}
private function _clearTexture(param1:TextureMaterial) : void
{
param1.texture = null;
}
protected function getEntry(param1:TextureMaterial) : MaterialEntry
{
return this.entryForMaterial[param1];
}
}
}
|
package alternativa.tanks.models.battlefield.decals
{
public class RotationState
{
public static const WITHOUT_ROTATION:RotationState = new RotationState("without_rotation");
public static const USE_RANDOM_ROTATION:RotationState = new RotationState("use_random_rotation");
private var _state:String;
public function RotationState(param1:String)
{
super();
this._state = param1;
}
public function get state() : String
{
return this._state;
}
public function toString() : String
{
return "RotationState{_state=" + String(this._state) + "}";
}
}
}
|
package alternativa.tanks.models.tank.temperature {
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.tank.ITankModel;
import projects.tanks.client.battlefield.models.user.temperature.ITankTemperatureModelBase;
import projects.tanks.client.battlefield.models.user.temperature.TankTemperatureModelBase;
[ModelInfo]
public class TankTemperatureModel extends TankTemperatureModelBase implements ITankTemperatureModelBase {
public function TankTemperatureModel() {
super();
}
[Obfuscation(rename="false")]
public function setTemperature(param1:Number) : void {
var local2:Tank = ITankModel(object.adapt(ITankModel)).getTank();
if(local2 != null) {
local2.setTemperature(param1);
}
}
}
}
|
package alternativa.tanks.model.item.container.gui.opening {
import flash.events.Event;
public class ContainerEvent extends Event {
public static var OPEN:String = "ContainerEvent_OPEN";
public var count:int = 0;
public function ContainerEvent(param1:int) {
this.count = param1;
super(OPEN,false,false);
}
}
}
|
package alternativa.tanks.battle {
public class Color {
public var r:int;
public var g:int;
public var b:int;
public function Color(param1:int) {
super();
this.setColor(param1);
}
private static function clamp(param1:int) : int {
return param1 < 0 ? 0 : param1;
}
private static function lastByte(param1:int) : int {
return param1 & 0xFF;
}
public function setColor(param1:int) : void {
this.r = lastByte(param1 >> 16);
this.g = lastByte(param1 >> 8);
this.b = lastByte(param1);
}
public function getColor() : int {
return this.r << 16 | this.g << 8 | this.b;
}
public function subtract(param1:Color) : void {
this.r = clamp(this.r - param1.r);
this.g = clamp(this.g - param1.g);
this.b = clamp(this.b - param1.b);
}
}
}
|
package _codec.projects.tanks.client.battleselect.model.battle.param {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battleselect.model.battle.param.BattleParamInfoCC;
import projects.tanks.client.battleservice.BattleCreateParameters;
public class CodecBattleParamInfoCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_map:ICodec;
private var codec_params:ICodec;
public function CodecBattleParamInfoCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_map = param1.getCodec(new TypeCodecInfo(IGameObject,false));
this.codec_params = param1.getCodec(new TypeCodecInfo(BattleCreateParameters,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BattleParamInfoCC = new BattleParamInfoCC();
local2.map = this.codec_map.decode(param1) as IGameObject;
local2.params = this.codec_params.decode(param1) as BattleCreateParameters;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:BattleParamInfoCC = BattleParamInfoCC(param2);
this.codec_map.encode(param1,local3.map);
this.codec_params.encode(param1,local3.params);
}
}
}
|
package alternativa.tanks.models.tank.support {
import alternativa.osgi.service.display.IDisplay;
import alternativa.tanks.battle.objects.tank.TankControlLockBits;
import alternativa.tanks.models.tank.ITankModel;
import alternativa.tanks.models.tank.IWeaponController;
import flash.events.Event;
import platform.client.fp10.core.type.AutoClosable;
import platform.client.fp10.core.type.IGameObject;
public class ClientDeactivationSupport implements AutoClosable {
[Inject]
public static var display:IDisplay;
private var localUserObject:IGameObject;
public function ClientDeactivationSupport(param1:IGameObject) {
super();
this.localUserObject = param1;
display.stage.addEventListener(Event.ACTIVATE,this.onClientWindowActivate);
display.stage.addEventListener(Event.DEACTIVATE,this.onClientWindowDeactivate);
}
private function onClientWindowActivate(param1:Event) : void {
var local2:IWeaponController = this.getWeaponController();
local2.unlockWeapon(TankControlLockBits.CLIENT);
}
private function onClientWindowDeactivate(param1:Event) : void {
var local2:IWeaponController = this.getWeaponController();
local2.lockWeapon(TankControlLockBits.CLIENT,true);
}
private function getWeaponController() : IWeaponController {
var local1:ITankModel = ITankModel(this.localUserObject.adapt(ITankModel));
return local1.getWeaponController();
}
[Obfuscation(rename="false")]
public function close() : void {
this.localUserObject = null;
display.stage.removeEventListener(Event.ACTIVATE,this.onClientWindowActivate);
display.stage.removeEventListener(Event.DEACTIVATE,this.onClientWindowDeactivate);
}
}
}
|
package alternativa.tanks.models.bonus.bonuslight {
import alternativa.tanks.models.teamlight.TeamLightColor;
import projects.tanks.client.battlefield.models.bonus.bonuslight.BonusLightCC;
import projects.tanks.client.battlefield.models.bonus.bonuslight.BonusLightModelBase;
import projects.tanks.client.battlefield.models.bonus.bonuslight.IBonusLightModelBase;
[ModelInfo]
public class BonusLightModel extends BonusLightModelBase implements IBonusLightModelBase, IBonusLight {
public function BonusLightModel() {
super();
}
public function getBonusLight() : BonusLight {
var local1:BonusLightCC = getInitParam();
return new BonusLight(new TeamLightColor(uint(local1.lightColor),local1.intensity),local1.attenuationBegin,local1.attenuationEnd);
}
}
}
|
package controls.scroller.red {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.scroller.red.ScrollSkinRed_trackBottom.png")]
public class ScrollSkinRed_trackBottom extends BitmapAsset {
public function ScrollSkinRed_trackBottom() {
super();
}
}
}
|
package projects.tanks.client.clans.panel.loadingclan {
public interface IClanLoadingPanelModelBase {
}
}
|
package alternativa.tanks.gui.friends {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.friends.FriendsWindowStateBigButton_ButtonCenter.png")]
public class FriendsWindowStateBigButton_ButtonCenter extends BitmapAsset {
public function FriendsWindowStateBigButton_ButtonCenter() {
super();
}
}
}
|
package projects.tanks.clients.flash.resources.resource.loaders.events {
import flash.events.Event;
import flash.events.ProgressEvent;
public class LoaderProgressEvent extends ProgressEvent {
public static const LOADER_PROGRESS:String = "loaderProgress";
private var _partsTotal:int;
private var _currentPart:int;
private var _totalProgress:Number = 0;
public function LoaderProgressEvent(param1:String, param2:int, param3:int, param4:Number = 0, param5:uint = 0, param6:uint = 0) {
super(param1,false,false,param5,param6);
this._partsTotal = param2;
this._currentPart = param3;
this._totalProgress = param4;
}
public function get partsTotal() : int {
return this._partsTotal;
}
public function get currentPart() : int {
return this._currentPart;
}
public function get totalProgress() : Number {
return this._totalProgress;
}
override public function clone() : Event {
return new LoaderProgressEvent(type,this._partsTotal,this._currentPart,this._totalProgress,bytesLoaded,bytesTotal);
}
override public function toString() : String {
return "[LoaderProgressEvent partsTotal=" + this._partsTotal + ", currentPart=" + this._currentPart + ", totalProgress=" + this._totalProgress.toFixed(2) + "]";
}
}
}
|
package projects.tanks.client.battlefield.models.battle.pointbased.ctf {
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 CaptureTheFlagModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:CaptureTheFlagModelServer;
private var client:ICaptureTheFlagModelBase = ICaptureTheFlagModelBase(this);
private var modelId:Long = Long.getLong(616542367,1161682206);
public function CaptureTheFlagModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new CaptureTheFlagModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(CaptureTheFlagCC,false)));
}
protected function getInitParam() : CaptureTheFlagCC {
return CaptureTheFlagCC(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 _codec.projects.tanks.client.battlefield.models.tankparts.weapon.gauss {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.weapon.gauss.GaussCC;
public class VectorCodecGaussCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecGaussCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(GaussCC,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.<GaussCC> = new Vector.<GaussCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = GaussCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:GaussCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<GaussCC> = Vector.<GaussCC>(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.clans.panel.notification {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class ClanPanelNotificationModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ClanPanelNotificationModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.models.battle.gui.inventory.splash {
import alternativa.tanks.models.inventory.InventoryItemType;
public class SplashColor {
public static const WHITE:uint = 4294967295;
public static const COOLDOWN:uint = 126;
private static const FIRST_AID:uint = 3135184319;
private static const ARMOR:uint = 3819201471;
private static const DAMAGE:uint = 4285085631;
private static const NITRO:uint = 4293333951;
private static const MINE:uint = 14527935;
private static const GOLD:uint = 4289270719;
private static const ULTIMATE:uint = 495830;
public function SplashColor() {
super();
}
public static function getColor(param1:int) : uint {
var local2:uint = 0;
switch(param1) {
case InventoryItemType.FIRST_AID:
local2 = uint(SplashColor.FIRST_AID);
break;
case InventoryItemType.ARMOR:
local2 = uint(SplashColor.ARMOR);
break;
case InventoryItemType.DAMAGE:
local2 = uint(SplashColor.DAMAGE);
break;
case InventoryItemType.NITRO:
local2 = uint(SplashColor.NITRO);
break;
case InventoryItemType.MINE:
local2 = uint(SplashColor.MINE);
break;
case InventoryItemType.GOLD:
local2 = uint(SplashColor.GOLD);
break;
case InventoryItemType.ULTIMATE:
local2 = uint(SplashColor.ULTIMATE);
break;
default:
local2 = uint(SplashColor.WHITE);
}
return local2;
}
}
}
|
package projects.tanks.client.battlefield.models.effects.description {
import platform.client.fp10.core.type.IGameObject;
public class EffectDescriptionCC {
private var _category:EffectCategory;
private var _index:int;
private var _tank:IGameObject;
public function EffectDescriptionCC(param1:EffectCategory = null, param2:int = 0, param3:IGameObject = null) {
super();
this._category = param1;
this._index = param2;
this._tank = param3;
}
public function get category() : EffectCategory {
return this._category;
}
public function set category(param1:EffectCategory) : void {
this._category = param1;
}
public function get index() : int {
return this._index;
}
public function set index(param1:int) : void {
this._index = param1;
}
public function get tank() : IGameObject {
return this._tank;
}
public function set tank(param1:IGameObject) : void {
this._tank = param1;
}
public function toString() : String {
var local1:String = "EffectDescriptionCC [";
local1 += "category = " + this.category + " ";
local1 += "index = " + this.index + " ";
local1 += "tank = " + this.tank + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.clients.flash.resources.resource {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Clipping;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.loaders.Parser3DS;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.utils.textureutils.TextureByteData;
import flash.display.BitmapData;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.utils.ByteArray;
import flash.utils.setTimeout;
import platform.client.fp10.core.resource.IResourceLoadingListener;
import platform.client.fp10.core.resource.IResourceSerializationListener;
import platform.client.fp10.core.resource.Resource;
import platform.client.fp10.core.resource.ResourceInfo;
import platform.client.fp10.core.resource.SafeURLLoader;
import platform.client.fp10.core.service.localstorage.IResourceLocalStorage;
import projects.tanks.clients.flash.resources.resource.loaders.BatchTextureLoader;
import projects.tanks.clients.flash.resources.resource.loaders.TextureInfo;
import projects.tanks.clients.flash.resources.resource.loaders.events.BatchTextureLoaderErrorEvent;
public class Tanks3DSResource extends Resource {
[Inject]
public static var resourceLocalStorage:IResourceLocalStorage;
public static const TYPE:int = 17;
private static const LOADING_STATE_INFO:int = 1;
private static const LOADING_STATE_TEXTURE_INFO:int = LOADING_STATE_INFO + 1;
private static const LOADING_STATE_TEXTURES:int = LOADING_STATE_INFO + 2;
private static const LOADING_STATE_3DS:int = LOADING_STATE_INFO + 3;
protected static const BIT_LOADED_WITH_ERROR:int = 1 << 2;
protected static const BIT_LOCAL:int = 1 << 3;
private static const IMAGES_FILE:String = "images.xml";
private static const MODEL_FILE:String = "object.3ds";
public var textures:Object;
public var objects:Vector.<Object3D>;
public var parents:Vector.<Object3D>;
private var urlLoader:SafeURLLoader;
private var batchTextureLoader:BatchTextureLoader;
private var resourceData:ResourceData = new ResourceData();
private var _modelBytes:ByteArray;
private var loadingState:int = -1;
public function Tanks3DSResource(param1:ResourceInfo) {
super(param1);
}
override public function get description() : String {
return "3DS";
}
public function getTextureForObject(param1:int) : BitmapData {
var local2:Mesh = this.objects[param1] as Mesh;
if(local2 == null || local2.alternativa3d::faceList == null) {
return null;
}
var local3:TextureMaterial = local2.alternativa3d::faceList.material as TextureMaterial;
if(local3 == null) {
return null;
}
return this.textures[local3.diffuseMapURL];
}
public function getObjectsByName(param1:RegExp) : Vector.<Object3D> {
var local5:Object3D = null;
var local2:Vector.<Object3D> = null;
var local3:int = int(this.objects.length);
var local4:int = 0;
while(local4 < local3) {
local5 = this.objects[local4];
if(local5.name != null && local5.name.match(param1) != null) {
if(local2 == null) {
local2 = new Vector.<Object3D>();
}
local2.push(local5);
}
local4++;
}
return local2;
}
override public function close() : void {
switch(this.loadingState) {
case LOADING_STATE_TEXTURE_INFO:
this.urlLoader.close();
this.destroyTextureInfoLoader();
break;
case LOADING_STATE_TEXTURES:
this.batchTextureLoader.close();
break;
case LOADING_STATE_3DS:
this.urlLoader.close();
}
this.textures = null;
this.batchTextureLoader = null;
this.urlLoader = null;
}
override public function unload() : void {
var local1:BitmapData = null;
if(this.textures != null) {
for each(local1 in this.textures) {
local1.dispose();
}
}
}
override public function load(param1:String, param2:IResourceLoadingListener) : void {
super.load(param1,param2);
this.loadTextureInfo();
}
override protected function doReload() : void {
switch(this.loadingState) {
case LOADING_STATE_TEXTURE_INFO:
this.urlLoader.close();
this.destroyTextureInfoLoader();
this.loadTextureInfo();
break;
case LOADING_STATE_TEXTURES:
this.batchTextureLoader.reload();
break;
case LOADING_STATE_3DS:
this.urlLoader.close();
this.destroyModelLoader();
this.loadModel();
}
}
override public function loadBytes(param1:ByteArray, param2:IResourceLoadingListener) : Boolean {
var local6:String = null;
var local7:int = 0;
var local8:ByteArray = null;
var local9:int = 0;
var local10:ByteArray = null;
this.listener = param2;
var local3:int = param1.readInt();
this.resourceData.modelData = new ByteArray();
param1.readBytes(this.resourceData.modelData,0,local3);
this._modelBytes = this.resourceData.modelData;
var local4:int = param1.readInt();
var local5:int = 0;
while(local5 < local4) {
local6 = param1.readUTF();
local7 = param1.readInt();
local8 = new ByteArray();
param1.readBytes(local8,0,local7);
local9 = param1.readInt();
local10 = null;
if(local9 > 0) {
local10 = new ByteArray();
param1.readBytes(local10,0,local9);
}
this.resourceData.imageData.push(new ImageData(local6,new TextureByteData(local8,local10)));
local5++;
}
this.buildResourceData();
return true;
}
override public function serialize(param1:IResourceSerializationListener) : void {
var local5:ImageData = null;
var local2:ByteArray = new ByteArray();
local2.writeInt(this.resourceData.modelData.length);
local2.writeBytes(this.resourceData.modelData);
var local3:uint = this.resourceData.imageData.length;
local2.writeInt(local3);
var local4:int = 0;
while(local4 < local3) {
local5 = this.resourceData.imageData[local4];
local2.writeUTF(local5.name);
local2.writeInt(local5.data.diffuseData.length);
local2.writeBytes(local5.data.diffuseData);
if(local5.data.opacityData == null) {
local2.writeInt(0);
} else {
local2.writeInt(local5.data.opacityData.length);
local2.writeBytes(local5.data.opacityData);
}
local4++;
}
this.resourceData = null;
param1.onSerializationComplete(this,local2);
}
private function loadTextureInfo() : void {
this.urlLoader = new SafeURLLoader();
this.urlLoader.addEventListener(Event.OPEN,this.onImagesXMLLoadingOpen);
this.urlLoader.addEventListener(Event.COMPLETE,this.onImagesXMLLoadingComplete);
this.urlLoader.addEventListener(IOErrorEvent.IO_ERROR,this.onFatalError);
this.urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onFatalError);
this.urlLoader.load(new URLRequest(baseUrl + IMAGES_FILE));
startTimeoutTracking();
this.loadingState = LOADING_STATE_TEXTURE_INFO;
}
private function onImagesXMLLoadingOpen(param1:Event) : void {
updateLastActivityTime();
}
private function onImagesXMLLoadingComplete(param1:Event) : void {
var local5:XML = null;
var local2:XML = XML(this.urlLoader.data);
this.destroyTextureInfoLoader();
if(local2.name() != "images") {
throw new Error("Invalid map.xml contents. ResourceId=" + this.id);
}
var local3:Object = {};
var local4:int = 0;
for each(local5 in local2.image) {
local4++;
local3[local5.@name] = new TextureInfo(local5.attribute("new-name"),local5.@alpha);
}
if(local4 > 0) {
this.batchTextureLoader = new BatchTextureLoader(local3);
this.batchTextureLoader.addEventListener(Event.OPEN,this.onBitmapsLoadingOpen);
this.batchTextureLoader.addEventListener(Event.COMPLETE,this.onTexturesLoadingComplete);
this.batchTextureLoader.addEventListener(BatchTextureLoaderErrorEvent.LOADER_ERROR,this.onBatchLoadingError);
this.batchTextureLoader.load(baseUrl);
this.loadingState = LOADING_STATE_TEXTURES;
startTimeoutTracking();
} else {
this.loadModel();
}
}
private function onBatchLoadingError(param1:BatchTextureLoaderErrorEvent) : void {
setFlags(BIT_LOADED_WITH_ERROR);
}
private function onBitmapsLoadingOpen(param1:Event) : void {
updateLastActivityTime();
}
private function onTexturesLoadingComplete(param1:Event) : void {
var local3:String = null;
var local2:Object = this.batchTextureLoader.textures.data;
for(local3 in local2) {
this.resourceData.imageData.push(new ImageData(local3,this.batchTextureLoader.textures.getValue(local3)));
}
this.destroyBatchLoader();
this.loadModel();
}
private function loadModel() : void {
this.urlLoader = new SafeURLLoader();
this.urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
this.urlLoader.addEventListener(Event.OPEN,this.onModelLoadingOpen);
this.urlLoader.addEventListener(Event.COMPLETE,this.onModelLoadingComplete);
this.urlLoader.addEventListener(IOErrorEvent.IO_ERROR,this.onFatalError);
this.urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onFatalError);
this.urlLoader.load(new URLRequest(baseUrl + MODEL_FILE));
this.loadingState = LOADING_STATE_3DS;
startTimeoutTracking();
}
private function onModelLoadingOpen(param1:Event) : void {
updateLastActivityTime();
}
private function onModelLoadingComplete(param1:Event) : void {
this.resourceData.modelData = this.urlLoader.data;
this._modelBytes = this.resourceData.modelData;
this.destroyModelLoader();
this.buildResourceData();
}
private function buildResourceData() : void {
var local3:Mesh = null;
var local1:Parser3DS = new Parser3DS();
local1.parse(this.resourceData.modelData);
this.objects = local1.objects;
this.parents = local1.parents;
var local2:int = 0;
while(local2 < this.objects.length) {
local3 = this.objects[local2] as Mesh;
if(local3 != null) {
this.initMesh(local3);
}
local2++;
}
if(this.resourceData.imageData.length > 0) {
this.resourceData.batchConstructor.addEventListener(Event.COMPLETE,this.onTexturesComplete);
this.resourceData.batchConstructor.run(4,this.resourceData.imageData);
} else {
this.completeResourceLoading(false);
}
}
private function onTexturesComplete(param1:Event) : void {
this.textures = this.resourceData.batchConstructor.textures;
this.completeResourceLoading(true);
}
private function completeResourceLoading(param1:Boolean) : void {
if(Boolean(hasAnyFlags(BIT_LOADED_WITH_ERROR | BIT_LOCAL)) || !resourceLocalStorage.enabled) {
this.resourceData = null;
}
if(param1) {
completeLoading();
} else {
setTimeout(completeLoading,0);
}
}
private function initMesh(param1:Mesh) : void {
param1.weldVertices(0.001,0.0001);
param1.weldFaces(0.01,0.001,0.01);
param1.calculateVerticesNormalsByAngle(ResourceParams.ANGLE_THRESHOLD,0.01);
param1.clipping = Clipping.FACE_CLIPPING;
param1.sorting = Sorting.AVERAGE_Z;
param1.calculateBounds();
}
private function onFatalError(param1:ErrorEvent) : void {
listener.onResourceLoadingFatalError(this,param1.text);
}
private function destroyTextureInfoLoader() : void {
if(this.urlLoader != null) {
this.urlLoader.removeEventListener(Event.OPEN,this.onImagesXMLLoadingOpen);
this.urlLoader.removeEventListener(Event.COMPLETE,this.onImagesXMLLoadingComplete);
this.urlLoader.removeEventListener(IOErrorEvent.IO_ERROR,this.onFatalError);
this.urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onFatalError);
this.urlLoader = null;
}
}
private function destroyBatchLoader() : void {
if(this.batchTextureLoader != null) {
this.batchTextureLoader.removeEventListener(Event.OPEN,this.onBitmapsLoadingOpen);
this.batchTextureLoader.removeEventListener(Event.COMPLETE,this.onTexturesLoadingComplete);
this.batchTextureLoader.removeEventListener(BatchTextureLoaderErrorEvent.LOADER_ERROR,this.onBatchLoadingError);
this.batchTextureLoader = null;
}
}
private function destroyModelLoader() : void {
if(this.urlLoader != null) {
this.urlLoader.removeEventListener(Event.OPEN,this.onModelLoadingOpen);
this.urlLoader.removeEventListener(Event.COMPLETE,this.onModelLoadingComplete);
this.urlLoader.removeEventListener(IOErrorEvent.IO_ERROR,this.onFatalError);
this.urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onFatalError);
this.urlLoader = null;
}
}
}
}
import alternativa.utils.textureutils.ITextureConstructorListener;
import alternativa.utils.textureutils.TextureByteData;
import alternativa.utils.textureutils.TextureConstructor;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.utils.ByteArray;
class ResourceData {
public var modelData:ByteArray;
public var imageData:Vector.<ImageData> = new Vector.<ImageData>();
public var batchConstructor:BatchTextureConstructor = new BatchTextureConstructor();
public function ResourceData() {
super();
}
}
class ImageData {
public var name:String;
public var data:TextureByteData = new TextureByteData();
public function ImageData(param1:String, param2:TextureByteData) {
super();
this.name = param1;
this.data = param2;
}
}
class BatchTextureConstructor extends EventDispatcher implements ITextureConstructorListener {
public var textures:Object;
private var entries:Vector.<ImageData>;
private var maxBatchSize:int;
private var batchSize:int;
private var firstBatchIndex:int;
private var batchCouner:int;
private var totalCounter:int;
private var constructors:Vector.<IndexedTextureConstructor>;
public function BatchTextureConstructor() {
super();
}
public function run(param1:int, param2:Vector.<ImageData>) : void {
this.maxBatchSize = param1;
this.entries = param2;
this.textures = {};
this.constructors = new Vector.<IndexedTextureConstructor>(param1);
var local3:int = 0;
while(local3 < param1) {
this.constructors[local3] = new IndexedTextureConstructor();
local3++;
}
this.totalCounter = 0;
this.firstBatchIndex = 0;
this.createBatch();
}
private function createBatch() : void {
var local3:IndexedTextureConstructor = null;
this.batchCouner = 0;
var local1:int = this.firstBatchIndex + this.maxBatchSize;
if(local1 > this.entries.length) {
local1 = int(this.entries.length);
}
this.batchSize = local1 - this.firstBatchIndex;
var local2:int = 0;
while(local2 < this.batchSize) {
local3 = this.constructors[local2];
local3.index = this.firstBatchIndex + local2;
local3.createTexture(this.entries[local3.index].data,this);
local2++;
}
this.firstBatchIndex = local1;
}
private function complete() : void {
this.constructors = null;
this.entries = null;
dispatchEvent(new Event(Event.COMPLETE));
}
public function onTextureReady(param1:TextureConstructor) : void {
var local2:IndexedTextureConstructor = IndexedTextureConstructor(param1);
this.textures[this.entries[local2.index].name] = local2.texture;
++this.totalCounter;
++this.batchCouner;
if(this.totalCounter == this.entries.length) {
this.complete();
} else if(this.batchCouner == this.batchSize) {
this.createBatch();
}
}
}
class IndexedTextureConstructor extends TextureConstructor {
public var index:int;
public function IndexedTextureConstructor() {
super();
}
}
|
package _codec.projects.tanks.client.users.model.friends.container {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import projects.tanks.client.users.model.friends.container.UserContainerCC;
public class CodecUserContainerCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_users:ICodec;
public function CodecUserContainerCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_users = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Long,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:UserContainerCC = new UserContainerCC();
local2.users = this.codec_users.decode(param1) as Vector.<Long>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:UserContainerCC = UserContainerCC(param2);
this.codec_users.encode(param1,local3.users);
}
}
}
|
package alternativa.tanks.model.quest.challenge.rewarding {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.model.quest.challenge.ChallengesViewService;
import projects.tanks.client.panel.model.challenge.rewarding.ChallengesRewardingUserModelBase;
import projects.tanks.client.panel.model.challenge.rewarding.IChallengesRewardingUserModelBase;
import projects.tanks.clients.flash.commons.services.notification.INotificationService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
[ModelInfo]
public class ChallengesRewardingUserModel extends ChallengesRewardingUserModelBase implements IChallengesRewardingUserModelBase {
[Inject]
public static var notificationService:INotificationService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var challengeViewService:ChallengesViewService;
public function ChallengesRewardingUserModel() {
super();
}
public function rewardNotify(param1:int) : void {
var local2:String = localeService.getText(TanksLocale.TEXT_CHALLENGE_REWARD_NOTIFICATION).replace("%number%",challengeViewService.getTierNumber(param1));
notificationService.addNotification(new ChallengesRewardingNotification(local2));
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.damageindicator {
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.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.user.damageindicator.DamageIndicatorType;
import projects.tanks.client.battlefield.models.user.damageindicator.TargetTankDamage;
public class CodecTargetTankDamage implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_damageAmount:ICodec;
private var codec_damageIndicatorType:ICodec;
private var codec_target:ICodec;
public function CodecTargetTankDamage() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_damageAmount = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_damageIndicatorType = param1.getCodec(new EnumCodecInfo(DamageIndicatorType,false));
this.codec_target = param1.getCodec(new TypeCodecInfo(IGameObject,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TargetTankDamage = new TargetTankDamage();
local2.damageAmount = this.codec_damageAmount.decode(param1) as Number;
local2.damageIndicatorType = this.codec_damageIndicatorType.decode(param1) as DamageIndicatorType;
local2.target = this.codec_target.decode(param1) as IGameObject;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:TargetTankDamage = TargetTankDamage(param2);
this.codec_damageAmount.encode(param1,local3.damageAmount);
this.codec_damageIndicatorType.encode(param1,local3.damageIndicatorType);
this.codec_target.encode(param1,local3.target);
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.