code stringlengths 57 237k |
|---|
package alternativa.tanks.model
{
import alternativa.init.GarageModelActivator;
import alternativa.init.Main;
import alternativa.model.IModel;
import alternativa.model.IObjectLoadListener;
import alternativa.model.IResourceLoadListener;
import alternativa.object.ClientObject;
import alternativa.osgi.service.dump.dumper.IDumper;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.osgi.service.mainContainer.IMainContainerService;
import alternativa.osgi.service.storage.IStorageService;
import alternativa.service.IModelService;
import alternativa.service.IResourceService;
import alternativa.tanks.gui.ConfirmAlert;
import alternativa.tanks.gui.GarageWindow;
import alternativa.tanks.gui.GarageWindowEvent;
import alternativa.tanks.gui.PaymentWindow;
import alternativa.tanks.help.IHelpService;
import alternativa.tanks.help.StoreListHelper;
import alternativa.tanks.help.WarehouseListHelper;
import alternativa.tanks.loader.ILoaderWindowService;
import alternativa.tanks.locale.constants.TextConst;
import alternativa.tanks.model.panel.IPanel;
import alternativa.tanks.service.money.IMoneyListener;
import alternativa.tanks.service.money.IMoneyService;
import alternativa.types.Long;
import com.alternativaplatform.projects.tanks.client.commons.models.itemtype.ItemTypeEnum;
import com.alternativaplatform.projects.tanks.client.commons.types.ItemProperty;
import com.alternativaplatform.projects.tanks.client.garage.garage.GarageModelBase;
import com.alternativaplatform.projects.tanks.client.garage.garage.IGarageModelBase;
import com.alternativaplatform.projects.tanks.client.garage.garage.ItemInfo;
import com.alternativaplatform.projects.tanks.client.garage.item.ItemPropertyValue;
import com.alternativaplatform.projects.tanks.client.garage.item.ModificationInfo;
import flash.display.BitmapData;
import flash.display.DisplayObjectContainer;
import flash.display.StageQuality;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.net.SharedObject;
import flash.utils.Dictionary;
import flash.utils.Timer;
import scpacker.gui.GTanksLoaderWindow;
import scpacker.gui.IGTanksLoader;
import scpacker.networking.INetworker;
import scpacker.networking.Network;
import scpacker.resource.ResourceType;
import scpacker.resource.ResourceUtil;
import scpacker.resource.images.ImageResource;
public class GarageModel extends GarageModelBase implements IGarageModelBase, IObjectLoadListener, IGarage, IItemListener, IDumper, IMoneyListener, IItemEffectListener, IResourceLoadListener
{
public static var itemsParams:Dictionary;
public static var itemsInfo:Dictionary;
public static var mounted:Vector.<String>;
public static var buyCrystalCurrency:String;
public static var buyCrystalRate:Number;
public static var preparedItemId:String;
private var dialogsLayer:DisplayObjectContainer;
private var helpService:IHelpService;
private var modelRegister:IModelService;
private var resourceRegister:IResourceService;
private var panelModel:IPanel;
private var itemModel:IItem;
private var clientObject:ClientObject;
private var layer:DisplayObjectContainer;
public var garageWindow:GarageWindow;
private var itemsForMount:Array;
public var mountedItems:Array;
public var mountedWeaponId:String;
public var mountedWeaponInfo:ItemInfo;
public var mountedWeaponParams:ItemParams;
public var mountedArmorId:String;
public var mountedArmorInfo:ItemInfo;
public var mountedArmorParams:ItemParams;
public var mountedEngineId:String;
public var mountedEngineInfo:ItemInfo;
public var mountedEngineParams:ItemParams;
private var storeSelectedItem:String;
private var warehouseSelectedItem:String;
private var garageBoxId:Long;
private var firstItemId:String;
private var minItemIndex:int = 2147483647;
private var firstItemParams:ItemParams;
private var lockBuy:Boolean = false;
private var lockSell:Boolean = false;
private var lockMount:Boolean = false;
private var lockReplace:Boolean = false;
private var lockUpgrade:Boolean = false;
private var itemDumper:ItemDumper;
private const HELPER_STORE:int = 2;
private const HELPER_WAREHOUSE:int = 3;
private var storeHelper:StoreListHelper;
private var warehouseHelper:WarehouseListHelper;
private const HELPER_GROUP_KEY:String = "GarageModel";
private var confirmAlert:ConfirmAlert;
private var itemWaitingForConfirmation:String;
private var socket:Network;
public var currentItemForUpdate:String;
private var localeService:ILocaleService;
public var kostil:Boolean = false;
private var items:Dictionary;
private var i:int = 2;
public function GarageModel()
{
this.items = new Dictionary();
super();
_interfaces.push(IModel);
_interfaces.push(IGarage);
_interfaces.push(IGarageModelBase);
_interfaces.push(IObjectLoadListener);
_interfaces.push(IItemListener);
_interfaces.push(IItemEffectListener);
this.layer = Main.contentUILayer;
itemsParams = new Dictionary();
mounted = new Vector.<String>();
mounted.push("");
mounted.push("");
mounted.push("");
this.resourceRegister = Main.osgi.getService(IResourceService) as IResourceService;
this.dialogsLayer = (Main.osgi.getService(IMainContainerService) as IMainContainerService).dialogsLayer as DisplayObjectContainer;
}
public static function getPropertyValue(properties:Array, property:ItemProperty) : String
{
var p:ItemPropertyValue = null;
for(var i:int = 0; i < properties.length; i++)
{
p = properties[i] as ItemPropertyValue;
if(p.property == property)
{
return p.value;
}
}
return null;
}
public static function getItemInfo(itemId:String) : ItemInfo
{
return itemsInfo[itemId];
}
public static function replaceItemInfo(oldId:String, newId:String) : void
{
var temp:ItemInfo = itemsInfo[oldId];
temp.itemId = newId;
itemsInfo[newId] = temp;
}
public static function replaceItemParams(oldId:String, newId:String) : void
{
var temp:ItemParams = itemsParams[oldId];
temp.baseItemId = newId;
itemsParams[newId] = temp;
}
public static function getItemParams(itemId:String) : ItemParams
{
return itemsParams[itemId];
}
public static function isTankPart(itemType:ItemTypeEnum) : Boolean
{
return itemType == ItemTypeEnum.ARMOR || itemType == ItemTypeEnum.WEAPON || itemType == ItemTypeEnum.COLOR;
}
public function initObject(clientObject:ClientObject, country:String, rate:Number, garageBoxId:Long, networker:Network) : void
{
this.garageBoxId = garageBoxId;
this.localeService = Main.osgi.getService(ILocaleService) as ILocaleService;
GarageModel.buyCrystalCurrency = "RUR";
GarageModel.buyCrystalRate = 5;
this.socket = networker;
this.objectLoaded(null);
}
public function objectLoaded(object:ClientObject) : void
{
var timer:Timer = null;
if(!this.kostil)
{
this.kostil = true;
Main.writeVarsToConsoleChannel("GARAGE MODEL","objectLoaded");
this.clientObject = object;
Main.stage.quality = StageQuality.HIGH;
itemsInfo = new Dictionary();
this.mountedItems = new Array();
this.itemsForMount = new Array();
this.modelRegister = Main.osgi.getService(IModelService) as IModelService;
this.itemModel = (this.modelRegister.getModelsByInterface(IItem) as Vector.<IModel>)[0] as IItem;
this.panelModel = Main.osgi.getService(IPanel) as IPanel;
this.garageWindow = new GarageWindow(this.garageBoxId);
this.helpService = Main.osgi.getService(IHelpService) as IHelpService;
this.storeHelper = new StoreListHelper();
this.warehouseHelper = new WarehouseListHelper();
this.helpService.registerHelper(this.HELPER_GROUP_KEY,this.HELPER_STORE,this.storeHelper,true);
this.helpService.registerHelper(this.HELPER_GROUP_KEY,this.HELPER_WAREHOUSE,this.warehouseHelper,true);
Main.stage.addEventListener(Event.RESIZE,this.alignHelpers);
this.alignHelpers();
timer = new Timer(6000,1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE,function(e:TimerEvent):void
{
showWindow();
panelModel.partSelected(1);
(Main.osgi.getService(IGTanksLoader) as GTanksLoaderWindow).setFullAndClose(null);
if(Lobby.firstInit)
{
Network(Main.osgi.getService(INetworker)).send("lobby;user_inited");
Lobby.firstInit = false;
}
if(preparedItemId != null)
{
garageWindow.selectItemInStore(preparedItemId);
preparedItemId = null;
}
});
timer.start();
}
}
public function objectUnloaded(object:ClientObject) : void
{
Main.writeVarsToConsoleChannel("GARAGE MODEL","objectUnloaded");
var moneyService:IMoneyService = GarageModelActivator.osgi.getService(IMoneyService) as IMoneyService;
if(moneyService != null)
{
moneyService.removeListener(this);
}
this.hideWindow();
Main.stage.removeEventListener(Event.RESIZE,this.alignHelpers);
this.helpService.unregisterHelper(this.HELPER_GROUP_KEY,this.HELPER_STORE);
this.helpService.unregisterHelper(this.HELPER_GROUP_KEY,this.HELPER_WAREHOUSE);
this.storeHelper = null;
this.warehouseHelper = null;
var loaderWindowService:ILoaderWindowService = Main.osgi.getService(ILoaderWindowService) as ILoaderWindowService;
loaderWindowService.unlockLoaderWindow();
this.garageWindow = null;
this.clientObject = null;
Main.stage.quality = StageQuality.HIGH;
}
public function initItem(id:String, item:ItemParams) : void
{
this.items[id] = item;
}
public function initDepot(clientObject:ClientObject, itemsOnSklad:Array) : void
{
var info:ItemInfo = null;
var itemId:String = null;
var itemParams:ItemParams = null;
if(!itemsInfo)
{
itemsInfo = new Dictionary();
}
for(var i:int = 0; i < itemsOnSklad.length; i++)
{
info = itemsOnSklad[i] as ItemInfo;
itemId = info.itemId;
itemParams = this.items[itemId];
itemsParams[itemId] = itemParams;
itemsInfo[itemId] = info;
if(itemId.indexOf("HD_") == -1)
{
this.garageWindow.addItemToWarehouse(itemId,itemParams,info);
}
else
{
this.garageWindow.addSkin(itemId,itemParams);
}
if(this.itemsForMount.indexOf(itemId) != -1)
{
this.garageWindow.mountItem(itemId);
this.itemsForMount.splice(this.itemsForMount.indexOf(itemId),1);
this.mountedItems.push(itemId);
switch(itemParams.itemType)
{
case ItemTypeEnum.WEAPON:
this.mountedWeaponId = itemId;
mounted[0] = this.mountedWeaponId;
this.mountedWeaponInfo = info;
this.mountedWeaponParams = itemParams;
continue;
case ItemTypeEnum.ARMOR:
this.mountedArmorId = itemId;
mounted[1] = this.mountedArmorId;
this.mountedArmorInfo = info;
this.mountedArmorParams = itemParams;
}
}
}
this.garageWindow.addEventListener(GarageWindowEvent.WAREHOUSE_ITEM_SELECTED,this.onWarehouseListSelect);
this.garageWindow.addEventListener(GarageWindowEvent.SETUP_ITEM,this.onSetupClick);
this.garageWindow.addEventListener(GarageWindowEvent.UPGRADE_ITEM,this.onUpgradeClick);
this.garageWindow.addEventListener(GarageWindowEvent.PROCESS_SKIN,this.onSkinClick);
this.garageWindow.addEventListener(GarageWindowEvent.ADD_CRYSTALS,this.onBuyCrystalsClick);
this.garageWindow.selectFirstItemInWarehouse();
}
public function initMarket(clientObject:ClientObject, itemsOnMarket:Array) : void
{
var info:ItemInfo = null;
var itemId:String = null;
var itemParams:ItemParams = null;
Main.writeVarsToConsoleChannel("GARAGE MODEL","initMarket itemsOnMarket: " + itemsOnMarket);
if(!itemsInfo)
{
itemsInfo = new Dictionary();
}
this.modelRegister = Main.osgi.getService(IModelService) as IModelService;
for(var i:int = 0; i < itemsOnMarket.length; i++)
{
info = itemsOnMarket[i] as ItemInfo;
itemId = info.itemId;
itemParams = this.items[itemId];
itemsParams[itemId] = itemParams;
if(!itemParams.inventoryItem)
{
itemsInfo[itemId] = info;
}
if(itemId.indexOf("HD_") == -1)
{
this.garageWindow.addItemToStore(itemId,itemParams,info);
}
else
{
this.garageWindow.addSkin(itemId,itemParams,false);
}
}
this.garageWindow.addEventListener(GarageWindowEvent.STORE_ITEM_SELECTED,this.onStoreListSelect);
this.garageWindow.addEventListener(GarageWindowEvent.BUY_ITEM,this.onBuyClick);
this.garageWindow.addEventListener(GarageWindowEvent.OPEN_ITEM,this.onOpenItemClick);
}
public function crystalsChanged(value:int) : void
{
var id:String = null;
Main.writeVarsToConsoleChannel("GARAGE MODEL","crystalsChanged: %1",value);
if(!this.lockBuy && !this.lockMount && !this.lockReplace && !this.lockSell && !this.lockUpgrade)
{
id = this.garageWindow.selectedItemId;
if(id != null)
{
if(this.garageWindow.storeItemSelected)
{
this.garageWindow.selectItemInStore(id);
}
else
{
this.garageWindow.selectItemInWarehouse(id);
}
}
}
}
public function itemLoaded(item:ClientObject, params:ItemParams) : void
{
Main.writeVarsToConsoleChannel("GARAGE MODEL","itemLoaded (" + item.id + ")");
itemsParams[item.id] = params;
}
private function onWarehouseListSelect(e:GarageWindowEvent) : void
{
var itemId:String = e.itemId;
var HD:Boolean = itemId.indexOf("HD_") != -1;
if(HD)
{
itemId = itemId.replace("HD_","");
}
this.warehouseSelectedItem = itemId;
var params:ItemParams = itemsParams[itemId] as ItemParams;
var info:ItemInfo = itemsInfo[itemId] as ItemInfo;
var itemType:ItemTypeEnum = params.itemType;
this.garageWindow.showItemInfo(itemId,params,false,info,this.mountedItems);
if(itemType == ItemTypeEnum.ARMOR || itemType == ItemTypeEnum.WEAPON || itemType == ItemTypeEnum.COLOR)
{
if(this.mountedItems.indexOf(itemId) != -1 || this.mountedItems.indexOf("HD_" + itemId) != -1)
{
this.garageWindow.lockMountButton();
}
else
{
this.garageWindow.unlockMountButton();
}
}
}
private function onStoreListSelect(e:GarageWindowEvent) : void
{
var itemId:String = e.itemId;
this.storeSelectedItem = itemId;
var params:ItemParams = itemsParams[itemId] as ItemParams;
var itemType:ItemTypeEnum = params.itemType;
var info:ItemInfo = itemsInfo[itemId] as ItemInfo;
this.garageWindow.showItemInfo(itemId,params,true,info);
}
private function onSetupClick(e:GarageWindowEvent) : void
{
if(!this.lockMount)
{
this.lockMount = true;
Main.writeVarsToConsoleChannel("GARAGE MODEL","tryMountItem");
this.tryMountItem(this.clientObject,this.warehouseSelectedItem);
}
}
public function tryMountItem(client:ClientObject, id:String) : void
{
Network(Main.osgi.getService(INetworker)).send("garage;try_mount_item;" + id);
}
private function onOpenItemClick(e:GarageWindowEvent) : void
{
Network(Main.osgi.getService(INetworker)).send("lobby;try_open_item;" + this.warehouseSelectedItem);
}
private function onBuyClick(e:GarageWindowEvent) : void
{
var itemParams:ItemParams = null;
var previewId:String = null;
var resource:ImageResource = null;
if(!this.lockBuy)
{
this.itemWaitingForConfirmation = e.itemId;
itemParams = itemsParams[e.itemId] as ItemParams;
previewId = itemParams.previewId;
resource = ResourceUtil.getResource(ResourceType.IMAGE,previewId + "_preview") as ImageResource;
this.showConfirmAlert(itemParams.name,itemParams.itemType == ItemTypeEnum.INVENTORY ? int(int(itemParams.price * this.garageWindow.itemInfoPanel.inventoryNumStepper.value)) : int(int(itemParams.price)),resource,true,itemParams.itemType == ItemTypeEnum.ARMOR || itemParams.itemType == ItemTypeEnum.WEAPON ? int(int(0)) : int(int(-1)),itemParams.itemType == ItemTypeEnum.INVENTORY ? int(int(this.garageWindow.itemInfoPanel.inventoryNumStepper.value)) : int(int(-1)));
}
}
public function buyRequest(itemId:String) : void
{
var itemParams:ItemParams = null;
var previewId:String = null;
var resource:ImageResource = null;
if(!this.lockBuy)
{
this.itemWaitingForConfirmation = itemId;
itemParams = itemsParams[itemId] as ItemParams;
previewId = itemParams.previewId;
resource = ResourceUtil.getResource(ResourceType.IMAGE,previewId + "_preview") as ImageResource;
this.showConfirmAlert(itemParams.name,itemParams.itemType == ItemTypeEnum.INVENTORY ? int(int(itemParams.price * this.garageWindow.itemInfoPanel.inventoryNumStepper.value)) : int(int(itemParams.price)),resource,true,itemParams.itemType == ItemTypeEnum.ARMOR || itemParams.itemType == ItemTypeEnum.WEAPON ? int(int(0)) : int(int(-1)),itemParams.itemType == ItemTypeEnum.INVENTORY ? int(int(this.garageWindow.itemInfoPanel.inventoryNumStepper.value)) : int(int(-1)));
}
}
private function onUpgradeClick(e:GarageWindowEvent) : void
{
var itemParams:ItemParams = null;
var mods:Array = null;
var nextModIndex:int = 0;
var modInfo:ModificationInfo = null;
var previewId:String = null;
var resource:ImageResource = null;
if(!this.lockUpgrade)
{
this.itemWaitingForConfirmation = e.itemId;
itemParams = itemsParams[e.itemId] as ItemParams;
mods = itemParams.modifications;
nextModIndex = itemParams.modificationIndex + 1;
modInfo = ModificationInfo(mods[nextModIndex]);
previewId = modInfo.previewId;
resource = ResourceUtil.getResource(ResourceType.IMAGE,previewId + "_preview") as ImageResource;
this.showConfirmAlert(itemParams.name,itemParams.nextModificationPrice,resource,false,nextModIndex);
}
}
private function onSkinClick(e:GarageWindowEvent) : void
{
var itemHD:String = null;
var itemParams:ItemParams = null;
var previewId:String = null;
var resource:ImageResource = null;
itemHD = "HD_" + e.itemId;
switch(this.garageWindow.itemInfoPanel.getSkinText())
{
case this.localeService.getText(TextConst.GARAGE_INFO_PANEL_SKIN_BUTTON_MOUNT_COMMON):
this.tryMountItem(this.clientObject,e.itemId);
break;
case this.localeService.getText(TextConst.GARAGE_INFO_PANEL_SKIN_BUTTON_MOUNT_HD):
this.tryMountItem(this.clientObject,itemHD);
break;
case this.localeService.getText(TextConst.GARAGE_INFO_PANEL_SKIN_BUTTON_BUY_HD):
this.itemWaitingForConfirmation = "HD_" + e.itemId;
itemParams = itemsParams[itemHD] as ItemParams;
previewId = itemParams.previewId;
resource = ResourceUtil.getResource(ResourceType.IMAGE,this.itemWaitingForConfirmation + "_preview") as ImageResource;
this.showConfirmAlert(itemParams.name,itemParams.price,resource,true,-1);
}
}
private function showConfirmAlert(name:String, cost:int, previewBd:ImageResource, buyAlert:Boolean, modIndex:int, inventoryNum:int = -1) : void
{
this.panelModel.blur();
this.confirmAlert = new ConfirmAlert(name,cost,previewBd,buyAlert,modIndex,!!buyAlert ? this.localeService.getText(TextConst.GARAGE_CONFIRM_ALERT_BUY_QEUSTION_TEXT) : this.localeService.getText(TextConst.GARAGE_CONFIRM_ALERT_UPGRADE_QEUSTION_TEXT),inventoryNum);
this.dialogsLayer.addChild(this.confirmAlert);
this.confirmAlert.confirmButton.addEventListener(MouseEvent.CLICK,!!buyAlert ? this.onBuyAlertConfirm : this.onUpgradeAlertConfirm);
this.confirmAlert.cancelButton.addEventListener(MouseEvent.CLICK,this.hideConfirmAlert);
this.alignConfirmAlert();
Main.stage.addEventListener(Event.RESIZE,this.alignConfirmAlert);
if(previewBd != null && !previewBd.loaded())
{
previewBd.completeLoadListener = this;
previewBd.load();
}
}
public function resourceLoaded(resource:Object) : void
{
if(this.confirmAlert != null && this.dialogsLayer.contains(this.confirmAlert))
{
this.confirmAlert.setPreview(resource.bitmapData as BitmapData);
}
}
public function resourceUnloaded(resourceId:Long) : void
{
}
private function alignConfirmAlert(e:Event = null) : void
{
this.confirmAlert.x = Math.round((Main.stage.stageWidth - this.confirmAlert.width) * 0.5);
this.confirmAlert.y = Math.round((Main.stage.stageHeight - this.confirmAlert.height) * 0.5);
}
private function hideConfirmAlert(e:MouseEvent = null) : void
{
Main.stage.removeEventListener(Event.RESIZE,this.alignConfirmAlert);
this.dialogsLayer.removeChild(this.confirmAlert);
this.panelModel.unblur();
this.confirmAlert = null;
}
private function onBuyAlertConfirm(e:MouseEvent) : void
{
this.hideConfirmAlert();
this.lockBuy = true;
Main.writeVarsToConsoleChannel("GARAGE MODEL","tryBuyItem");
if((itemsParams[this.itemWaitingForConfirmation] as ItemParams).itemType == ItemTypeEnum.INVENTORY)
{
this.tryBuyItem(this.clientObject,this.itemWaitingForConfirmation,this.garageWindow.itemInfoPanel.inventoryNumStepper.value);
}
else
{
this.tryBuyItem(this.clientObject,this.itemWaitingForConfirmation,1);
}
}
public function tryBuyItem(c:ClientObject, id:String, count:int) : void
{
Network(Main.osgi.getService(INetworker)).send("garage;try_buy_item;" + id + ";" + count);
}
private function onUpgradeAlertConfirm(e:MouseEvent) : void
{
this.hideConfirmAlert();
this.lockUpgrade = true;
Main.writeVarsToConsoleChannel("GARAGE MODEL","tryUpgradeItem");
this.tryUpgradeItem(this.clientObject,this.itemWaitingForConfirmation);
}
public function tryUpgradeItem(client:ClientObject, id:String) : void
{
this.currentItemForUpdate = id;
Network(Main.osgi.getService(INetworker)).send("garage;try_update_item;" + id);
}
public function onBuyCrystalsClick(e:GarageWindowEvent) : void
{
var storage:SharedObject = IStorageService(Main.osgi.getService(IStorageService)).getStorage();
storage.data.paymentLastInputValue = Math.abs(this.garageWindow.itemInfoPanel.requiredCrystalsNum);
var localeService:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService));
if(storage.data.paymentSystemType == null || storage.data.paymentSystemType == PaymentWindow.SYSTEM_TYPE_SMS)
{
storage.data.paymentSystemType = localeService.language == "ru" ? PaymentWindow.SYSTEM_TYPE_QIWI : PaymentWindow.SYSTEM_TYPE_VISA;
}
storage.flush();
this.panelModel.goToPayment();
}
public function mountItem(clientObject:ClientObject, itemToUnmountId:String, itemToMountId:String) : void
{
var toLoad:Vector.<String> = null;
var index:int = 0;
Main.writeVarsToConsoleChannel("GARAGE MODEL","mountItem: " + (itemsParams[itemToMountId] as ItemParams).name);
var bar3xQuickSet:Boolean = false;
if(itemToUnmountId != null)
{
index = this.mountedItems.indexOf(itemToUnmountId);
if(index != -1)
{
if(itemsParams[itemToUnmountId] != null)
{
this.garageWindow.unmountItem(itemToUnmountId);
}
this.mountedItems.splice(index,1);
}
}
else
{
bar3xQuickSet = true;
}
var params:ItemParams = itemsParams[itemToMountId];
if(params != null && this.garageWindow != null)
{
this.garageWindow.mountItem(itemToMountId);
this.mountedItems.push(itemToMountId);
if(params.itemType == ItemTypeEnum.WEAPON || params.itemType == ItemTypeEnum.ARMOR || params.itemType == ItemTypeEnum.COLOR)
{
switch(params.itemType)
{
case ItemTypeEnum.WEAPON:
this.mountedWeaponId = itemToMountId;
mounted[0] = this.mountedWeaponId;
this.mountedWeaponInfo = itemsInfo[itemToMountId];
this.mountedWeaponParams = params;
this.setTurret(itemToMountId);
break;
case ItemTypeEnum.ARMOR:
this.mountedArmorId = itemToMountId;
mounted[1] = this.mountedArmorId;
this.mountedArmorInfo = itemsInfo[itemToMountId];
this.mountedArmorParams = itemsParams[itemToMountId];
this.setHull(itemToMountId);
break;
case ItemTypeEnum.COLOR:
this.mountedEngineId = itemToMountId;
mounted[2] = this.mountedEngineId;
this.mountedEngineInfo = itemsInfo[itemToMountId];
this.mountedEngineParams = itemsParams[itemToMountId];
toLoad = new Vector.<String>();
toLoad.push(itemToMountId);
ResourceUtil.addEventListener(function():void
{
setColorMap(ResourceUtil.getResource(ResourceType.IMAGE,itemToMountId) as ImageResource);
});
ResourceUtil.loadGraphics(toLoad);
}
}
}
else
{
this.itemsForMount.push(itemToMountId);
}
if(this.garageWindow.selectedItemId == itemToMountId || this.garageWindow.selectedItemId == itemToMountId.replace("HD_",""))
{
this.garageWindow.selectItemInWarehouse(itemToMountId.replace("HD_",""));
this.garageWindow.lockMountButton();
}
this.lockMount = false;
}
public function removeItemFromStore(id:String) : void
{
this.garageWindow.removeItemFromStore(id);
this.garageWindow.unselectInStore();
this.garageWindow.selectFirstItemInWarehouse();
}
public function buyItem(clientObject:ClientObject, info:ItemInfo) : void
{
var itemId:String = info.itemId;
var p:ItemParams = this.items[itemId];
if(itemId.indexOf("HD_") != -1)
{
itemsInfo[itemId] = info;
this.garageWindow.addSkin(itemId,itemsParams[itemId]);
this.garageWindow.removeItemFromStore(itemId);
this.garageWindow.addItemToWarehouse(itemId,p,info);
this.tryMountItem(clientObject,itemId);
}
else if(!p.inventoryItem)
{
itemsInfo[itemId] = info;
this.garageWindow.removeItemFromStore(itemId);
this.garageWindow.addItemToWarehouse(itemId,p,info);
this.garageWindow.unselectInStore();
this.garageWindow.selectItemInWarehouse(itemId);
}
else
{
if(itemsInfo[itemId] != null)
{
itemsInfo[itemId] = info;
}
else
{
itemsInfo[itemId] = info;
if(info.addable)
{
this.garageWindow.removeItemFromStore(itemId);
this.garageWindow.addItemToWarehouse(itemId,p,info);
this.garageWindow.unselectInStore();
}
}
if(info.addable)
{
this.garageWindow.selectItemInWarehouse(itemId);
}
}
if(info.addable)
{
this.garageWindow.scrollToItemInWarehouse(itemId);
}
this.lockBuy = false;
}
public function decreaseCountItems(itemId:String) : void
{
--itemsInfo[itemId].count;
this.garageWindow.selectItemInWarehouse(itemId);
}
public function removeItemFromWarehouse(itemId:String) : void
{
this.garageWindow.removeItemFromWarehouse(itemId);
this.garageWindow.selectFirstItemInWarehouse();
this.garageWindow.addItemToStore(itemId,this.items[itemId],itemsInfo[itemId]);
itemsInfo[itemId] = null;
}
public function upgradeItem(clientObject:ClientObject, oldItem:String, newItemInfo:ItemInfo) : void
{
Main.writeVarsToConsoleChannel("GARAGE MODEL","upgradeItem oldItem: " + (itemsParams[oldItem] as ItemParams).name);
Main.writeVarsToConsoleChannel("GARAGE MODEL","upgradeItem newItemInfo: " + newItemInfo);
var newItem:String = newItemInfo.itemId;
itemsInfo[newItem] = newItemInfo;
this.garageWindow.removeItemFromWarehouse(oldItem);
var index:int = this.mountedItems.indexOf(oldItem);
if(index != -1)
{
this.mountedItems.splice(index,1);
}
var params:ItemParams = itemsParams[newItem];
++params.modificationIndex;
params.nextModificationPrice = params.modifications[params.modificationIndex >= 3 ? params.modificationIndex : params.modificationIndex + 1].crystalPrice;
params.nextModificationProperties = params.modifications[params.modificationIndex >= 3 ? params.modificationIndex : params.modificationIndex + 1].itemProperties;
params.nextModificationRankId = params.modifications[params.modificationIndex >= 3 ? params.modificationIndex : params.modificationIndex + 1].rankId;
this.garageWindow.addItemToWarehouse(newItem,itemsParams[newItem],itemsInfo[newItem]);
this.garageWindow.selectItemInWarehouse(newItem);
this.warehouseSelectedItem = newItem;
this.lockUpgrade = false;
if(params.itemType == ItemTypeEnum.ARMOR || params.itemType == ItemTypeEnum.WEAPON)
{
this.tryMountItem(null,params.baseItemId);
}
}
public function setHull(resource:String) : void
{
var toLoad:Vector.<String> = new Vector.<String>();
toLoad.push(resource + "_details");
toLoad.push(resource + "_lightmap");
ResourceUtil.addEventListener(function():void
{
garageWindow.tankPreview.setHull(resource);
});
ResourceUtil.loadGraphics(toLoad);
}
public function setTurret(resource:String) : void
{
var toLoad:Vector.<String> = new Vector.<String>();
toLoad.push(resource + "_details");
toLoad.push(resource + "_lightmap");
ResourceUtil.addEventListener(function():void
{
garageWindow.tankPreview.setTurret(resource);
});
ResourceUtil.loadGraphics(toLoad);
}
public function setColorMap(map:ImageResource) : void
{
this.garageWindow.tankPreview.setColorMap(map);
}
public function setTimeRemaining(itemId:String, time:Number) : void
{
var date:Date = new Date(time);
Main.writeVarsToConsoleChannel("TIME INDICATOR"," incoming time " + time + " : " + date);
if(this.garageWindow != null)
{
if(this.garageWindow.selectedItemId != null && !this.garageWindow.storeItemSelected && itemId == this.garageWindow.selectedItemId)
{
this.garageWindow.itemInfoPanel.timeRemaining = date;
}
}
}
public function effectStopped(itemId:String) : void
{
var info:ItemInfo = null;
if(this.garageWindow != null)
{
this.garageWindow.removeItemFromWarehouse(itemId);
if(itemsParams[itemId] as ItemParams && (itemsParams[itemId] as ItemParams).price > 0)
{
info = itemsInfo[itemId] as ItemInfo;
this.garageWindow.addItemToStore(itemId,itemsParams[itemId],info);
this.garageWindow.selectItemInStore(itemId);
this.garageWindow.scrollToItemInStore(itemId);
}
}
}
private function showWindow() : void
{
if(!this.layer.contains(this.garageWindow))
{
Main.contentUILayer.addChild(this.garageWindow);
Main.stage.addEventListener(Event.RESIZE,this.alignWindow);
this.alignWindow();
}
}
private function hideWindow() : void
{
if(this.layer.contains(this.garageWindow))
{
this.garageWindow.hide();
this.layer.removeChild(this.garageWindow);
Main.stage.removeEventListener(Event.RESIZE,this.alignWindow);
}
}
private function alignWindow(e:Event = null) : void
{
var minWidth:int = int(Math.max(1000,Main.stage.stageWidth));
this.garageWindow.resize(Math.round(minWidth * 2 / 3),Math.max(Main.stage.stageHeight - 60,530));
this.garageWindow.x = Math.round(minWidth / 3);
this.garageWindow.y = 60;
}
public function dump(params:Vector.<String>) : String
{
var s:String = "\n";
s += "\n ARMOR: ";
s += "\n";
s += "\n WEAPON: ";
return s + "\n";
}
public function get dumperName() : String
{
return "mounted";
}
private function alignHelpers(e:Event = null) : void
{
var minWidth:int = int(Math.max(1000,Main.stage.stageWidth));
var minHeight:int = int(Math.max(600,Main.stage.stageHeight));
this.warehouseHelper.targetPoint = new Point(Math.round(minWidth * (1 / 3)) + 20,minHeight - 169 * 2 + 27);
this.storeHelper.targetPoint = new Point(Math.round(minWidth * (1 / 3)) + 20,minHeight - 169 + 27);
}
}
}
|
package projects.tanks.client.battleselect.model.battleselect.create {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class BattleCreateModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BattleCreateModelServer;
private var client:IBattleCreateModelBase = IBattleCreateModelBase(this);
private var modelId:Long = Long.getLong(2006601986,1009878384);
private var _createFailedBattleCreateDisabledId:Long = Long.getLong(197885668,-2032708814);
private var _createFailedServerIsHaltingId:Long = Long.getLong(1756028652,-1657837994);
private var _createFailedTooManyBattlesFromYouId:Long = Long.getLong(872763403,679070993);
private var _createFailedYouAreBannedId:Long = Long.getLong(1102481331,-1022378385);
private var _setFilteredBattleNameId:Long = Long.getLong(1263225061,56978839);
private var _setFilteredBattleName_filteredNameCodec:ICodec;
public function BattleCreateModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BattleCreateModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(BattleCreateCC,false)));
this._setFilteredBattleName_filteredNameCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
}
protected function getInitParam() : BattleCreateCC {
return BattleCreateCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._createFailedBattleCreateDisabledId:
this.client.createFailedBattleCreateDisabled();
break;
case this._createFailedServerIsHaltingId:
this.client.createFailedServerIsHalting();
break;
case this._createFailedTooManyBattlesFromYouId:
this.client.createFailedTooManyBattlesFromYou();
break;
case this._createFailedYouAreBannedId:
this.client.createFailedYouAreBanned();
break;
case this._setFilteredBattleNameId:
this.client.setFilteredBattleName(String(this._setFilteredBattleName_filteredNameCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.model.challenge
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChallengeCongratulationWindow_leadBitmap extends BitmapAsset
{
public function ChallengeCongratulationWindow_leadBitmap()
{
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapons.common.shell {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.shell.ShellState;
import projects.tanks.client.battlefield.types.Vector3d;
public class CodecShellState implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_clientTime:ICodec;
private var codec_direction:ICodec;
private var codec_position:ICodec;
public function CodecShellState() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_clientTime = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_direction = param1.getCodec(new TypeCodecInfo(Vector3d,false));
this.codec_position = param1.getCodec(new TypeCodecInfo(Vector3d,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ShellState = new ShellState();
local2.clientTime = this.codec_clientTime.decode(param1) as int;
local2.direction = this.codec_direction.decode(param1) as Vector3d;
local2.position = this.codec_position.decode(param1) as Vector3d;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:ShellState = ShellState(param2);
this.codec_clientTime.encode(param1,local3.clientTime);
this.codec_direction.encode(param1,local3.direction);
this.codec_position.encode(param1,local3.position);
}
}
}
|
package controls.scroller.gray {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.scroller.gray.ScrollSkinGray_thumbTop.png")]
public class ScrollSkinGray_thumbTop extends BitmapAsset {
public function ScrollSkinGray_thumbTop() {
super();
}
}
}
|
package projects.tanks.client.garage.models.item.videoads {
public interface IVideoAdsItemUpgradeModelBase {
function maxAdsShowed(param1:int) : void;
}
}
|
package projects.tanks.client.battlefield.gui.models.effectsvisualization
{
public class EffectsVisualizationModelBase
{
public var _interfaces:Vector.<Class>;
public function EffectsVisualizationModelBase()
{
super();
this._interfaces = new Vector.<Class>();
}
}
}
|
package alternativa.tanks.models.weapon.gauss.state.targetselection {
import alternativa.tanks.models.weapon.gauss.GaussEventType;
import alternativa.tanks.models.weapon.gauss.LocalGaussWeapon;
public class TargetLockedState implements IGaussAimState {
private var weapon:LocalGaussWeapon;
public function TargetLockedState(param1:LocalGaussWeapon) {
super();
this.weapon = param1;
}
public function enter(param1:int, param2:GaussAimEventType, param3:*) : void {
this.weapon.processEvent(GaussEventType.TARGET_LOCKED,param3);
}
public function update(param1:int, param2:int) : void {
}
}
}
|
package controls.rangicons {
[Embed(source="/_assets/assets.swf", symbol="symbol447")]
public class RangIconSmall extends RangIcon {
public function RangIconSmall(param1:int = 1) {
super(param1);
}
}
}
|
package projects.tanks.client.battlefield.models.battle.battlefield.debug {
import projects.tanks.client.battlefield.types.Vector3d;
public interface IBattleDebugModelBase {
function addFrame(param1:Number, param2:int, param3:Vector.<Vector3d>, param4:int) : void;
function addGizmo(param1:Number, param2:int, param3:Vector3d, param4:Vector3d, param5:int) : void;
function addMarker(param1:Number, param2:int, param3:Vector3d, param4:int) : void;
}
}
|
package alternativa.tanks.display.usertitle.addition
{
import controls.TankWindow;
import flash.display.Sprite;
public class DebugTitle extends Sprite
{
private var window:TankWindow;
public function DebugTitle()
{
this.window = new TankWindow();
super();
this.window.width = 100;
this.window.header = 70;
addChild(this.window);
}
}
}
|
package alternativa.init {
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.osgi.service.dump.IDumpService;
import alternativa.tanks.gui.error.CustomErrorWindow;
import alternativa.tanks.model.challenge.battlepass.notifier.BattlePassPurchaseService;
import alternativa.tanks.model.challenge.battlepass.notifier.BattlePassPurchaseServiceImpl;
import alternativa.tanks.model.coin.CoinInfoService;
import alternativa.tanks.model.coin.CoinInfoServiceImpl;
import alternativa.tanks.model.panel.CapabilitiesDumper;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowServiceImpl;
import alternativa.tanks.model.payment.saveprocessed.ProcessedPaymentService;
import alternativa.tanks.model.payment.saveprocessed.ProcessedPaymentServiceImp;
import alternativa.tanks.model.payment.shop.notification.service.ShopNotifierService;
import alternativa.tanks.model.payment.shop.notification.service.ShopNotifierServiceImpl;
import alternativa.tanks.model.quest.challenge.ChallengesViewService;
import alternativa.tanks.model.quest.challenge.stars.StarsInfoService;
import alternativa.tanks.model.quest.challenge.stars.StarsInfoServiceImpl;
import alternativa.tanks.model.quest.common.MissionsWindowsService;
import alternativa.tanks.model.quest.common.gui.window.QuestWindow;
import alternativa.tanks.model.quest.common.notification.QuestNotifierService;
import alternativa.tanks.model.quest.common.notification.QuestNotifierServiceImpl;
import alternativa.tanks.model.quest.daily.DailyQuestsService;
import alternativa.tanks.model.quest.weekly.WeeklyQuestsService;
import alternativa.tanks.service.achievement.AchievementService;
import alternativa.tanks.service.achievement.IAchievementService;
import alternativa.tanks.service.battlelinkactivator.BattleLinkActivatorService;
import alternativa.tanks.service.country.CountryService;
import alternativa.tanks.service.country.CountryServiceImpl;
import alternativa.tanks.service.fps.FPSService;
import alternativa.tanks.service.fps.FPSServiceImpl;
import alternativa.tanks.service.logging.UserChangeGameScreenServiceImpl;
import alternativa.tanks.service.logging.UserSettingsChangedServiceImpl;
import alternativa.tanks.service.money.IMoneyService;
import alternativa.tanks.service.money.MoneyService;
import alternativa.tanks.service.notificationcategories.INotificationGarageCategoriesService;
import alternativa.tanks.service.notificationcategories.NotificationGarageCategoriesService;
import alternativa.tanks.service.panel.IPanelView;
import alternativa.tanks.service.panel.PanelView;
import alternativa.tanks.service.payment.IPaymentPackagesService;
import alternativa.tanks.service.payment.IPaymentService;
import alternativa.tanks.service.payment.PaymentPackagesService;
import alternativa.tanks.service.payment.PaymentService;
import alternativa.tanks.service.payment.display.PaymentDisplayServiceImpl;
import alternativa.tanks.service.paymentcomplete.PaymentCompleteService;
import alternativa.tanks.service.paymentcomplete.PaymentCompleteServiceImpl;
import alternativa.tanks.service.referrals.ReferralsService;
import alternativa.tanks.service.referrals.ReferralsServiceImpl;
import alternativa.tanks.service.referrals.buttonhelper.ReferralsButtonHelperService;
import alternativa.tanks.service.referrals.buttonhelper.ReferralsButtonHelperServiceImpl;
import alternativa.tanks.service.referrals.notification.NewReferralsNotifierService;
import alternativa.tanks.service.referrals.notification.NewReferralsNotifierServiceImpl;
import alternativa.tanks.service.settings.ISettingsService;
import alternativa.tanks.service.settings.SettingsService;
import alternativa.tanks.service.settings.keybinding.KeysBindingService;
import alternativa.tanks.service.settings.keybinding.KeysBindingServiceImpl;
import alternativa.tanks.service.socialnetwork.ISocialNetworkPanelService;
import alternativa.tanks.service.socialnetwork.SocialNetworkPanelService;
import alternativa.tanks.service.socialnetwork.vk.SNFriendsService;
import alternativa.tanks.service.socialnetwork.vk.SNFriendsServiceImpl;
import alternativa.tanks.service.upgradingitems.UpgradingItemsService;
import alternativa.tanks.service.upgradingitems.UpgradingItemsServiceImpl;
import platform.client.fp10.core.service.errormessage.IErrorMessageService;
import projects.tanks.clients.flash.commons.services.payment.PaymentDisplayService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.activator.IBattleLinkActivatorService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.gamescreen.UserChangeGameScreenService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.settings.UserSettingsChangedService;
public class PanelModelActivator implements IBundleActivator {
private var capabilitiesDumper:CapabilitiesDumper = new CapabilitiesDumper();
public function PanelModelActivator() {
super();
}
public function start(param1:OSGi) : void {
param1.registerService(IPanelView,new PanelView());
param1.registerService(ISettingsService,new SettingsService());
param1.registerService(IMoneyService,new MoneyService());
param1.registerService(IAchievementService,new AchievementService());
param1.registerService(IPaymentService,new PaymentService());
param1.registerService(ISocialNetworkPanelService,new SocialNetworkPanelService());
param1.registerService(UpgradingItemsService,new UpgradingItemsServiceImpl());
param1.registerService(FPSService,new FPSServiceImpl());
param1.registerService(IBattleLinkActivatorService,new BattleLinkActivatorService());
param1.registerService(IPaymentPackagesService,new PaymentPackagesService());
param1.registerService(PaymentCompleteService,new PaymentCompleteServiceImpl());
param1.registerService(QuestNotifierService,new QuestNotifierServiceImpl());
param1.registerService(CountryService,new CountryServiceImpl());
param1.registerService(PaymentDisplayService,new PaymentDisplayServiceImpl());
param1.registerService(UserChangeGameScreenService,new UserChangeGameScreenServiceImpl());
param1.registerService(UserSettingsChangedService,new UserSettingsChangedServiceImpl());
param1.registerService(INotificationGarageCategoriesService,new NotificationGarageCategoriesService());
param1.registerService(PaymentWindowService,new PaymentWindowServiceImpl());
param1.registerService(ShopNotifierService,new ShopNotifierServiceImpl());
param1.registerService(KeysBindingService,new KeysBindingServiceImpl());
param1.registerService(ReferralsService,new ReferralsServiceImpl());
param1.registerService(SNFriendsService,new SNFriendsServiceImpl());
param1.registerService(NewReferralsNotifierService,new NewReferralsNotifierServiceImpl());
param1.registerService(ProcessedPaymentService,new ProcessedPaymentServiceImp());
param1.registerService(ReferralsButtonHelperService,new ReferralsButtonHelperServiceImpl());
param1.registerService(StarsInfoService,new StarsInfoServiceImpl());
param1.registerService(CoinInfoService,new CoinInfoServiceImpl());
var local2:QuestWindow = new QuestWindow();
param1.registerService(MissionsWindowsService,local2);
param1.registerService(DailyQuestsService,local2.getDailyQuestsTab());
param1.registerService(WeeklyQuestsService,local2.getWeeklyQuestsTab());
param1.registerService(ChallengesViewService,local2.getChallengesTab());
param1.registerService(BattlePassPurchaseService,new BattlePassPurchaseServiceImpl());
IDumpService(param1.getService(IDumpService)).registerDumper(this.capabilitiesDumper);
IErrorMessageService(param1.getService(IErrorMessageService)).setMessageBox(new CustomErrorWindow(param1));
}
public function stop(param1:OSGi) : void {
IDumpService(param1.getService(IDumpService)).unregisterDumper(this.capabilitiesDumper.dumperName);
this.capabilitiesDumper = null;
param1.unregisterService(IPanelView);
param1.unregisterService(ISettingsService);
param1.unregisterService(IMoneyService);
param1.unregisterService(IAchievementService);
param1.unregisterService(IPaymentService);
param1.unregisterService(ISocialNetworkPanelService);
param1.unregisterService(IPaymentPackagesService);
param1.unregisterService(UpgradingItemsService);
param1.unregisterService(FPSService);
param1.unregisterService(QuestNotifierService);
param1.unregisterService(CountryService);
param1.unregisterService(UserChangeGameScreenService);
param1.unregisterService(UserSettingsChangedService);
param1.unregisterService(PaymentWindowService);
param1.unregisterService(KeysBindingService);
param1.unregisterService(ProcessedPaymentService);
param1.unregisterService(ReferralsButtonHelperService);
param1.unregisterService(BattlePassPurchaseService);
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.KillMessageOutputLine_isisIconClass.png")]
public class KillMessageOutputLine_isisIconClass extends BitmapAsset {
public function KillMessageOutputLine_isisIconClass() {
super();
}
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBarSkin_hpLeftBgBlueCls extends BitmapAsset
{
public function ProgressBarSkin_hpLeftBgBlueCls()
{
super();
}
}
}
|
package alternativa.gfx.core {
import alternativa.gfx.alternativagfx;
import flash.display3D.Context3D;
import flash.display3D.Program3D;
import flash.utils.ByteArray;
use namespace alternativagfx;
public class ProgramResource extends Resource {
alternativagfx var program:Program3D;
private var _vertexProgram:ByteArray;
private var _fragmentProgram:ByteArray;
public function ProgramResource(param1:ByteArray, param2:ByteArray) {
super();
this._vertexProgram = param1;
this._fragmentProgram = param2;
}
public function get vertexProgram() : ByteArray {
return this._vertexProgram;
}
public function get fragmentProgram() : ByteArray {
return this._fragmentProgram;
}
override public function dispose() : void {
super.dispose();
if(this.alternativagfx::program != null) {
this.alternativagfx::program.dispose();
this.alternativagfx::program = null;
}
this._vertexProgram = null;
this._fragmentProgram = null;
}
override public function reset() : void {
super.reset();
if(this.alternativagfx::program != null) {
this.alternativagfx::program.dispose();
this.alternativagfx::program = null;
}
}
override public function get available() : Boolean {
return this._vertexProgram != null && this._fragmentProgram != null;
}
override alternativagfx function create(param1:Context3D) : void {
super.alternativagfx::create(param1);
this.alternativagfx::program = param1.createProgram();
}
override alternativagfx function upload() : void {
super.alternativagfx::upload();
this.alternativagfx::program.upload(this.vertexProgram,this.fragmentProgram);
}
}
}
|
package alternativa.tanks.model.androidapprating {
import projects.tanks.client.panel.model.androidapprating.AndroidAppRatingModelBase;
import projects.tanks.client.panel.model.androidapprating.IAndroidAppRatingModelBase;
[ModelInfo]
public class AndroidAppRatingModel extends AndroidAppRatingModelBase implements IAndroidAppRatingModelBase {
public function AndroidAppRatingModel() {
super();
}
public function showDialogAppRating() : void {
}
}
}
|
package alternativa.tanks.gui.friends.list.refferals.referalbuttons {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.friends.list.refferals.referalbuttons.LinkReferralButton_bitmapIconLink.png")]
public class LinkReferralButton_bitmapIconLink extends BitmapAsset {
public function LinkReferralButton_bitmapIconLink() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.shot {
public interface IDiscreteShotModelBase {
function reconfigureWeapon(param1:int) : void;
}
}
|
package specter.resource
{
public final class ImageType
{
public static const COMMON:uint = 0;
public static const WEBP:uint = 1;
public static const SVG:uint = 2;
public static const JPEG2000:uint = 3;
public function ImageType()
{
super();
}
}
}
|
package alternativa.tanks.models.battle.gui.indicators {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.indicators.ReloaderIndicator_reArmorIconClass.png")]
public class ReloaderIndicator_reArmorIconClass extends BitmapAsset {
public function ReloaderIndicator_reArmorIconClass() {
super();
}
}
}
|
package projects.tanks.client.partners.impl.china.china3rdplatform.payment {
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public interface IChina3rdPlatformPaymentModelBase {
function receiveUrl(param1:PaymentRequestUrl) : void;
}
}
|
package com.lorentz.SVG.display.base {
import com.lorentz.SVG.data.MarkerPlace;
import com.lorentz.SVG.display.SVGMarker;
import com.lorentz.SVG.drawing.DashedDrawer;
import com.lorentz.SVG.drawing.GraphicsPathDrawer;
import com.lorentz.SVG.drawing.IDrawer;
import com.lorentz.SVG.drawing.MarkersPlacesCapturerDrawer;
import com.lorentz.SVG.utils.SVGUtil;
import flash.display.Graphics;
import flash.display.GraphicsPathWinding;
import flash.geom.Rectangle;
public class SVGShape extends SVGGraphicsElement {
private var _markers:Vector.<SVGMarker> = new Vector.<SVGMarker>();
private var _markersPlaces:Vector.<MarkerPlace>;
public function SVGShape(tagName:String){
super(tagName);
}
override protected function initialize():void {
super.initialize();
this.mouseChildren = false;
}
override protected function render():void {
super.render();
_markersPlaces = null;
beforeDraw();
content.graphics.clear();
if(hasStroke && !hasDashedStroke)
lineStyle(content.graphics);
beginFill(content.graphics, function():void {
drawWithAppropriateMethod();
content.graphics.endFill();
});
if(hasDashedStroke){
var dashedGraphicsPathDrawer:GraphicsPathDrawer = new GraphicsPathDrawer();
var dashedDrawer:DashedDrawer = new DashedDrawer(dashedGraphicsPathDrawer);
configureDashedDrawer(dashedDrawer);
drawToDrawer(dashedDrawer);
lineStyle(content.graphics);
content.graphics.drawPath(dashedGraphicsPathDrawer.commands, dashedGraphicsPathDrawer.pathData);
content.graphics.endFill();
}
renderMarkers();
}
private function drawWithAppropriateMethod():void {
var captureMarkers:Boolean = hasMarkers && _markersPlaces == null;
if(!captureMarkers && hasDrawDirectlyToGraphics){
drawDirectlyToGraphics(content.graphics);
} else {
var graphicsPathDrawer:GraphicsPathDrawer = new GraphicsPathDrawer();
if(captureMarkers) {
var extractMarkersInfoInterceptor:MarkersPlacesCapturerDrawer = new MarkersPlacesCapturerDrawer(graphicsPathDrawer);
content.graphics.drawPath(graphicsPathDrawer.commands, graphicsPathDrawer.pathData, getFlashWinding());
drawToDrawer(extractMarkersInfoInterceptor);
_markersPlaces = extractMarkersInfoInterceptor.getMarkersInfo();
} else {
drawToDrawer(graphicsPathDrawer);
}
content.graphics.drawPath(graphicsPathDrawer.commands, graphicsPathDrawer.pathData, getFlashWinding());
}
}
protected function beforeDraw():void { }
protected function drawToDrawer(drawer:IDrawer):void { }
protected function drawDirectlyToGraphics(graphics:Graphics):void { }
protected function get hasDrawDirectlyToGraphics():Boolean {
return false;
}
private function get hasMarkers():Boolean {
return hasStroke && (style.getPropertyValue("marker")
|| style.getPropertyValue("marker-start")
|| style.getPropertyValue("marker-mid")
|| style.getPropertyValue("marker-end"));
}
private function getFlashWinding():String {
var winding:String = finalStyle.getPropertyValue("fill-rule") || "nonzero";
switch (winding.toLowerCase())
{
case GraphicsPathWinding.EVEN_ODD.toLowerCase():
return GraphicsPathWinding.EVEN_ODD;
break;
case GraphicsPathWinding.NON_ZERO.toLowerCase():
return GraphicsPathWinding.NON_ZERO;
break;
}
return GraphicsPathWinding.NON_ZERO;
}
private function renderMarkers():void {
for each(var oldMarker:SVGMarker in _markers){
detachElement(oldMarker);
content.removeChild(oldMarker);
}
if(_markersPlaces){
for each(var markerPlace:MarkerPlace in _markersPlaces){
var markerStyle:String = "marker-" + markerPlace.type;
var markerLink:String = finalStyle.getPropertyValue(markerStyle) || finalStyle.getPropertyValue("marker");
if(!markerLink)
continue;
var markerId:String = SVGUtil.extractUrlId(markerLink);
if(!markerId)
continue;
var marker:SVGMarker = document.getDefinitionClone(markerId) as SVGMarker;
if(!marker)
continue;
var strokeWidth:Number = 1;
if(finalStyle.getPropertyValue("stroke-width"))
strokeWidth = getViewPortUserUnit(finalStyle.getPropertyValue("stroke-width"), SVGUtil.WIDTH_HEIGHT);
markerPlace.strokeWidth = strokeWidth;
marker.markerPlace = markerPlace;
content.addChild(marker);
attachElement(marker);
_markers.push(marker);
}
}
}
override protected function getObjectBounds():Rectangle {
graphics.beginFill(0);
drawWithAppropriateMethod();
return content.getBounds(this);
}
}
} |
package alternativa.tanks.view {
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.osgi.service.logging.LogService;
import alternativa.tanks.controller.events.AuthorizationFailedEvent;
import alternativa.tanks.controller.events.CaptchaAnswerIsIncorrectEvent;
import alternativa.tanks.controller.events.CaptchaUpdatedEvent;
import alternativa.tanks.controller.events.GetNewCaptchaEvent;
import alternativa.tanks.controller.events.LoginButtonPressed;
import alternativa.tanks.controller.events.PartnersEvent;
import alternativa.tanks.controller.events.RegistrationBackgroundLoadedEvent;
import alternativa.tanks.controller.events.partners.PartnerLoginEvent;
import alternativa.tanks.view.forms.LinkPartnerLoginForm;
import org.robotlegs.core.IInjector;
import org.robotlegs.mvcs.Mediator;
import projects.tanks.client.commons.models.captcha.CaptchaLocation;
import projects.tanks.clients.flash.commons.models.captcha.RefreshCaptchaClickedEvent;
public class LinkPartnerLoginFormMediator extends Mediator {
[Inject]
public static var log:LogService;
[Inject]
public static var clientLog:IClientLog;
private static const GA_CATEGORY:String = "entrance";
[Inject]
public var view:LinkPartnerLoginForm;
[Inject]
public var injector:IInjector;
public function LinkPartnerLoginFormMediator() {
super();
}
override public function onRegister() : void {
this.injector.injectInto(this.view);
addViewListener(RefreshCaptchaClickedEvent.CLICKED,this.onRefreshCaptchaClicked,RefreshCaptchaClickedEvent);
addViewListener(PartnersEvent.START_REGISTRATION,dispatch,PartnersEvent);
addViewListener(LoginButtonPressed.EVENT_TYPE,this.onLoginClicked,LoginButtonPressed);
addContextListener(AuthorizationFailedEvent.PARTNER_PASSWORD_AUTHORIZATION_FAILED,this.onPasswordAuthorizationFailed);
addContextListener(AuthorizationFailedEvent.PARTNER_LINK_ALREADY_EXISTS,this.onPartnerLinkAlreadyExists);
addContextListener(CaptchaUpdatedEvent.LOGIN_FORM_CAPTCHA_UPDATED,this.onCaptchaUpdated,CaptchaUpdatedEvent);
addContextListener(CaptchaAnswerIsIncorrectEvent.EVENT_TYPE,this.onCaptchaFailed);
addContextListener(RegistrationBackgroundLoadedEvent.LOADED,this.onBackgroundLoaded);
}
private function onBackgroundLoaded(param1:RegistrationBackgroundLoadedEvent) : void {
this.view.setBackground(param1.backgroundImage);
}
private function onCaptchaFailed(param1:CaptchaAnswerIsIncorrectEvent) : void {
this.view.captchaFailed();
}
private function onRefreshCaptchaClicked(param1:RefreshCaptchaClickedEvent) : void {
dispatch(new GetNewCaptchaEvent(CaptchaLocation.LOGIN_FORM));
}
private function onLoginClicked(param1:LoginButtonPressed) : void {
dispatch(new PartnerLoginEvent(PartnerLoginEvent.CHECK_CAPTCHA_AND_LOGIN,this.view.callsign,this.view.password,this.view.captchaAnswer));
}
private function onCaptchaUpdated(param1:CaptchaUpdatedEvent) : void {
this.view.showCaptchaSection();
this.view.captchaImage = param1.image;
}
private function onPasswordAuthorizationFailed(param1:AuthorizationFailedEvent) : void {
this.view.showAlertAboutWrongPassword();
}
private function onPartnerLinkAlreadyExists(param1:AuthorizationFailedEvent) : void {
this.view.linkAlreadyExists();
}
}
}
|
package alternativa.tanks.model.payment.shop.notification.service {
import flash.events.Event;
public class ShopNotificationEvent extends Event {
public static const SHOW_NOTIFICATION_ABOUT_NEW_ITEMS:String = "showNotificationNewItems";
public static const SHOW_NOTIFICATION_ABOUT_DISCOUNTS:String = "showNotificationDiscounts";
public static const HIDE_NOTIFICATION:String = "hideNotification";
public function ShopNotificationEvent(param1:String) {
super(param1);
}
}
}
|
package alternativa.tanks.models.weapons.discrete {
import alternativa.math.Vector3;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.TargetHit;
[ModelInterface]
public interface DiscreteWeaponListener {
function onShot(param1:IGameObject, param2:Vector3, param3:Vector.<TargetHit>) : void;
}
}
|
package projects.tanks.client.panel.model.shop.premiumpackage {
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 PremiumPackageModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:PremiumPackageModelServer;
private var client:IPremiumPackageModelBase = IPremiumPackageModelBase(this);
private var modelId:Long = Long.getLong(1196468726,1376782802);
public function PremiumPackageModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new PremiumPackageModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(PremiumPackageCC,false)));
}
protected function getInitParam() : PremiumPackageCC {
return PremiumPackageCC(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 platform.client.core.general.socialnetwork.models.socialnetworkparameters {
public class SocialNetworkParametersCC {
private var _hasOwnPaymentSystem:Boolean;
private var _hasSocialFunction:Boolean;
public function SocialNetworkParametersCC(param1:Boolean = false, param2:Boolean = false) {
super();
this._hasOwnPaymentSystem = param1;
this._hasSocialFunction = param2;
}
public function get hasOwnPaymentSystem() : Boolean {
return this._hasOwnPaymentSystem;
}
public function set hasOwnPaymentSystem(param1:Boolean) : void {
this._hasOwnPaymentSystem = param1;
}
public function get hasSocialFunction() : Boolean {
return this._hasSocialFunction;
}
public function set hasSocialFunction(param1:Boolean) : void {
this._hasSocialFunction = param1;
}
public function toString() : String {
var local1:String = "SocialNetworkParametersCC [";
local1 += "hasOwnPaymentSystem = " + this.hasOwnPaymentSystem + " ";
local1 += "hasSocialFunction = " + this.hasSocialFunction + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.payment.modes.paypal {
[ModelInterface]
public interface PayPalPayment {
}
}
|
package projects.tanks.client.battleselect.model.battleselect.create {
public interface IBattleCreateModelBase {
function createFailedBattleCreateDisabled() : void;
function createFailedServerIsHalting() : void;
function createFailedTooManyBattlesFromYou() : void;
function createFailedYouAreBanned() : void;
function setFilteredBattleName(param1:String) : void;
}
}
|
package projects.tanks.client.garage.models.item.upgradeable {
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 UpgradeableParamsConstructorModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function UpgradeableParamsConstructorModelServer(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.weapon.laser {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.weapon.laser.LaserPointerEffect_EmbedLaserSpot.png")]
public class LaserPointerEffect_EmbedLaserSpot extends BitmapAsset {
public function LaserPointerEffect_EmbedLaserSpot() {
super();
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist.list {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.clanmanagement.clanmemberlist.list.DeleteIndicator_deleteIconClass.png")]
public class DeleteIndicator_deleteIconClass extends BitmapAsset {
public function DeleteIndicator_deleteIconClass() {
super();
}
}
}
|
package alternativa.tanks.service.resistance {
import alternativa.tanks.model.item.resistance.view.MountedResistancesPanel;
import platform.client.fp10.core.type.IGameObject;
public interface ResistanceService {
function getView() : MountedResistancesPanel;
function registerView(param1:MountedResistancesPanel) : void;
function registerModel(param1:IGameObject) : void;
function unregisterModel() : void;
function unregisterView() : void;
function mount(param1:int, param2:IGameObject) : void;
function unmount(param1:IGameObject) : void;
function isMounted(param1:IGameObject) : Boolean;
function canBeMount(param1:IGameObject) : Boolean;
function mountBought(param1:IGameObject) : void;
function mountIntoFreeSlot(param1:IGameObject) : void;
function setOnlyUnmountMode() : void;
}
}
|
package alternativa.protocol.factory
{
import alternativa.protocol.codec.ICodec;
public interface ICodecFactory
{
function registerCodec(param1:Class, param2:ICodec) : void;
function unregisterCodec(param1:Class) : void;
function getCodec(param1:Class) : ICodec;
function getArrayCodec(param1:Class, param2:Boolean = true, param3:int = 1) : ICodec;
}
}
|
package _codec.projects.tanks.client.garage.models.item.properties {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class CodecItemProperty implements ICodec {
public function CodecItemProperty() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ItemProperty = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = ItemProperty.HULL_ARMOR;
break;
case 1:
local2 = ItemProperty.HULL_SPEED;
break;
case 2:
local2 = ItemProperty.HULL_SIDE_ACCELERATION;
break;
case 3:
local2 = ItemProperty.HULL_TURN_SPEED;
break;
case 4:
local2 = ItemProperty.HULL_TURN_ACCELERATION;
break;
case 5:
local2 = ItemProperty.HULL_REVERSE_TURN_ACCELERATION;
break;
case 6:
local2 = ItemProperty.HULL_TURN_STABILIZATION_ACCELERATION;
break;
case 7:
local2 = ItemProperty.HULL_ACCELERATION;
break;
case 8:
local2 = ItemProperty.HULL_REVERSE_ACCELERATION;
break;
case 9:
local2 = ItemProperty.HULL_MASS;
break;
case 10:
local2 = ItemProperty.TURRET_TURN_SPEED;
break;
case 11:
local2 = ItemProperty.TURRET_ROTATION_ACCELERATION;
break;
case 12:
local2 = ItemProperty.INITIAL_TURRET_ANGLE;
break;
case 13:
local2 = ItemProperty.IMPACT_FORCE;
break;
case 14:
local2 = ItemProperty.DAMAGE_FROM;
break;
case 15:
local2 = ItemProperty.DAMAGE_TO;
break;
case 16:
local2 = ItemProperty.DAMAGE_PER_SECOND;
break;
case 17:
local2 = ItemProperty.WEAPON_RELOAD_TIME;
break;
case 18:
local2 = ItemProperty.WEAPON_CHARGING_TIME;
break;
case 19:
local2 = ItemProperty.WEAPON_WEAKENING_COEFF;
break;
case 20:
local2 = ItemProperty.FIREBIRD_RESISTANCE;
break;
case 21:
local2 = ItemProperty.SMOKY_RESISTANCE;
break;
case 22:
local2 = ItemProperty.TWINS_RESISTANCE;
break;
case 23:
local2 = ItemProperty.RAILGUN_RESISTANCE;
break;
case 24:
local2 = ItemProperty.ISIS_RESISTANCE;
break;
case 25:
local2 = ItemProperty.MINE_RESISTANCE;
break;
case 26:
local2 = ItemProperty.THUNDER_RESISTANCE;
break;
case 27:
local2 = ItemProperty.FREEZE_RESISTANCE;
break;
case 28:
local2 = ItemProperty.RICOCHET_RESISTANCE;
break;
case 29:
local2 = ItemProperty.SHAFT_RESISTANCE;
break;
case 30:
local2 = ItemProperty.MACHINE_GUN_RESISTANCE;
break;
case 31:
local2 = ItemProperty.SHOTGUN_RESISTANCE;
break;
case 32:
local2 = ItemProperty.ROCKET_LAUNCHER_RESISTANCE;
break;
case 33:
local2 = ItemProperty.ARTILLERY_RESISTANCE;
break;
case 34:
local2 = ItemProperty.TERMINATOR_RESISTANCE;
break;
case 35:
local2 = ItemProperty.GAUSS_RESISTANCE;
break;
case 36:
local2 = ItemProperty.ALL_RESISTANCE;
break;
case 37:
local2 = ItemProperty.SHAFT_AIMING_MODE_MIN_DAMAGE;
break;
case 38:
local2 = ItemProperty.SHAFT_AIMING_MODE_MAX_DAMAGE;
break;
case 39:
local2 = ItemProperty.SHAFT_VERTICAL_TARGETING_SPEED;
break;
case 40:
local2 = ItemProperty.SHAFT_HORIZONTAL_TARGETING_SPEED;
break;
case 41:
local2 = ItemProperty.SHAFT_AIMING_MODE_CHARGE_RATE;
break;
case 42:
local2 = ItemProperty.SHAFT_AIMED_SHOT_IMPACT;
break;
case 43:
local2 = ItemProperty.SHAFT_ROTATION_DECELERATION_COEFF;
break;
case 44:
local2 = ItemProperty.SHAFT_FAST_SHOT_ENERGY;
break;
case 45:
local2 = ItemProperty.SHAFT_MIN_AIMED_SHOT_ENERGY;
break;
case 46:
local2 = ItemProperty.WEAPON_CHARGE_RATE;
break;
case 47:
local2 = ItemProperty.WEAPON_KICKBACK;
break;
case 48:
local2 = ItemProperty.WEAPON_MIN_DAMAGE_PERCENT;
break;
case 49:
local2 = ItemProperty.WEAPON_MIN_DAMAGE_RADIUS;
break;
case 50:
local2 = ItemProperty.WEAPON_MAX_DAMAGE_RADIUS;
break;
case 51:
local2 = ItemProperty.SHOT_RANGE;
break;
case 52:
local2 = ItemProperty.MAX_CRITICAL_HIT_CHANCE;
break;
case 53:
local2 = ItemProperty.START_CRITICAL_HIT_CHANCE;
break;
case 54:
local2 = ItemProperty.AFTER_CRIT_CRITICAL_HIT_CHANCE;
break;
case 55:
local2 = ItemProperty.CRITICAL_CHANCE_DELTA;
break;
case 56:
local2 = ItemProperty.CRITICAL_HIT_CHANCE;
break;
case 57:
local2 = ItemProperty.CRITICAL_HIT_DAMAGE;
break;
case 58:
local2 = ItemProperty.SPLASH_DAMAGE_RADIUS;
break;
case 59:
local2 = ItemProperty.RADIUS_OF_MAX_SPLASH_DAMAGE;
break;
case 60:
local2 = ItemProperty.MIN_SPLASH_DAMAGE_PERCENT;
break;
case 61:
local2 = ItemProperty.SPLASH_DAMAGE_IMPACT;
break;
case 62:
local2 = ItemProperty.RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE;
break;
case 63:
local2 = ItemProperty.FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT;
break;
case 64:
local2 = ItemProperty.WEAPON_DISCHARGE_RATE;
break;
case 65:
local2 = ItemProperty.DAMAGE_PER_PERIOD;
break;
case 66:
local2 = ItemProperty.ISIS_HEALING_PER_PERIOD;
break;
case 67:
local2 = ItemProperty.ISIS_INCREASE_TARGET_TEMPERATURE_PER_TICK;
break;
case 68:
local2 = ItemProperty.ISIS_DECREASE_TARGET_TEMPERATURE_PER_TICK;
break;
case 69:
local2 = ItemProperty.ISIS_DISCHARGE_SPEED_HEALING;
break;
case 70:
local2 = ItemProperty.ISIS_DISCHARGE_SPEED_IDLE;
break;
case 71:
local2 = ItemProperty.FLAME_TEMPERATURE_LIMIT;
break;
case 72:
local2 = ItemProperty.HEAT_PER_PERIOD;
break;
case 73:
local2 = ItemProperty.ENERGY_PER_SHOT;
break;
case 74:
local2 = ItemProperty.MACHINE_GUN_SELF_TEMPERATURE_INCREASE_PER_SECOND;
break;
case 75:
local2 = ItemProperty.MACHINE_GUN_SPIN_UP_TIME_SECOND;
break;
case 76:
local2 = ItemProperty.MACHINE_GUN_SPIN_DOWN_TIME_SECOND;
break;
case 77:
local2 = ItemProperty.MACHINE_GUN_WEAPON_TURN_DECELERATION_COEFF;
break;
case 78:
local2 = ItemProperty.MACHINE_GUN_TEMPERATURE_HITTING_TIME_SECOND;
break;
case 79:
local2 = ItemProperty.MACHINE_GUN_OVERHEAT_DAMAGE_COEFF;
break;
case 80:
local2 = ItemProperty.MACHINE_GUN_POWER_WHEN_TANK_TEMPERATURE_START_INCREASE;
break;
case 81:
local2 = ItemProperty.ELLIPTIC_CONE_VERTICAL_ANGLE;
break;
case 82:
local2 = ItemProperty.ELLIPTIC_CONE_HORIZONTAL_ANGLE;
break;
case 83:
local2 = ItemProperty.SHOTGUN_MAGAZINE_SIZE;
break;
case 84:
local2 = ItemProperty.SHOTGUN_PELLET_COUNT;
break;
case 85:
local2 = ItemProperty.MAGAZINE_RELOAD_TIME;
break;
case 86:
local2 = ItemProperty.DAMAGE_PER_HIT;
break;
case 87:
local2 = ItemProperty.DISCHARGE_SPEED;
break;
case 88:
local2 = ItemProperty.CONE_ANGLE;
break;
case 89:
local2 = ItemProperty.FREEZE_PER_TICK;
break;
case 90:
local2 = ItemProperty.WEAPON_ANGLE_UP;
break;
case 91:
local2 = ItemProperty.WEAPON_ANGLE_DOWN;
break;
case 92:
local2 = ItemProperty.ROCKET_ANGULAR_VELOCITY;
break;
case 93:
local2 = ItemProperty.SALVO_AIMING_TIME;
break;
case 94:
local2 = ItemProperty.SALVO_AIMING_GRACE_PERIOD;
break;
case 95:
local2 = ItemProperty.TIME_BETWEEN_SHOTS_OF_SALVO;
break;
case 96:
local2 = ItemProperty.SALVO_RELOAD_TIME;
break;
case 97:
local2 = ItemProperty.SALVO_SIZE;
break;
case 98:
local2 = ItemProperty.SHELL_SPEED;
break;
case 99:
local2 = ItemProperty.SHELL_RADIUS;
break;
case 100:
local2 = ItemProperty.MIN_SHELL_SPEED;
break;
case 101:
local2 = ItemProperty.MAX_SHELL_SPEED;
break;
case 102:
local2 = ItemProperty.SHELL_BOOST_PHASE_DURATION;
break;
case 103:
local2 = ItemProperty.SHELL_SPEEDS_COUNT;
break;
case 104:
local2 = ItemProperty.SHELL_GRAVITY_COEF;
break;
case 105:
local2 = ItemProperty.MAX_RICOCHET_COUNT;
break;
case 106:
local2 = ItemProperty.SECONDARY_WEAPON_KICKBACK;
break;
case 107:
local2 = ItemProperty.SECONDARY_DAMAGE_FROM;
break;
case 108:
local2 = ItemProperty.SECONDARY_DAMAGE_TO;
break;
case 109:
local2 = ItemProperty.HIGHLIGHTING_DISTANCE;
break;
case 110:
local2 = ItemProperty.DRONE_RELOAD;
break;
case 111:
local2 = ItemProperty.DRONE_REPAIR_HEALTH;
break;
case 112:
local2 = ItemProperty.DRONE_REPAIR_RADIUS;
break;
case 113:
local2 = ItemProperty.DRONE_INVENTORY;
break;
case 114:
local2 = ItemProperty.DRONE_INVENTORY_ADD;
break;
case 115:
local2 = ItemProperty.DRONE_BONUS_ADD;
break;
case 116:
local2 = ItemProperty.DRONE_FIRST_AID_BONUS_ADD;
break;
case 117:
local2 = ItemProperty.DRONE_OVERDRIVE_BOOST;
break;
case 118:
local2 = ItemProperty.DRONE_INVENTORY_RADIUS;
break;
case 119:
local2 = ItemProperty.DRONE_COOLDOWN_RADIUS;
break;
case 120:
local2 = ItemProperty.DRONE_DEFEND;
break;
case 121:
local2 = ItemProperty.DRONE_ARMOR_BOOST;
break;
case 122:
local2 = ItemProperty.DRONE_MINE;
break;
case 123:
local2 = ItemProperty.DRONE_ADDITIONAL_MINES;
break;
case 124:
local2 = ItemProperty.DRONE_MINES_ACTIVATION_DELAY;
break;
case 125:
local2 = ItemProperty.DRONE_INVENTORY_COOLDOWN_BOOST;
break;
case 126:
local2 = ItemProperty.DRONE_MINES_PLACEMENT_RADIUS;
break;
case 127:
local2 = ItemProperty.DRONE_POWER_BOOST;
break;
case 128:
local2 = ItemProperty.DRONE_POWER_DURATION;
break;
case 129:
local2 = ItemProperty.DRONE_CRITICAL_HEALTH;
break;
case 130:
local2 = ItemProperty.DRONE_CONSTANT_ARMOR_PERCENT;
break;
case 131:
local2 = ItemProperty.DRONE_CONSTANT_POWER_PERCENT;
break;
case 132:
local2 = ItemProperty.ULTIMATE_HEAL_HP;
break;
case 133:
local2 = ItemProperty.DEVICE_TEMPERATURE_NORMALIZATION;
break;
case 134:
local2 = ItemProperty.DEVICE_BONUS_ENERGY_ON_KILL;
break;
case 135:
local2 = ItemProperty.DEVICE_HEAT_PER_PELLET;
break;
case 136:
local2 = ItemProperty.DEVICE_SMOKY_TEMPERATURE_DELTA_ON_CRITICAL;
break;
case 137:
local2 = ItemProperty.DEVICE_TARGET_HEAT_DELTA_ON_SELF_OVERHEAT;
break;
case 138:
local2 = ItemProperty.ULTIMATE_CHARGE_PER_SEC;
break;
case 139:
local2 = ItemProperty.ULTIMATE_CHARGE_PER_SCORE_POINT;
break;
case 140:
local2 = ItemProperty.ULTIMATE_SCORE_COOLDOWN_SEC;
break;
case 141:
local2 = ItemProperty.ULTIMATE_ACTIVATION_DISCHARGE_PER_SEC;
break;
case 142:
local2 = ItemProperty.GAUSS_AIMED_SHOT_IMPACT;
break;
case 143:
local2 = ItemProperty.GAUSS_AIMED_SPLASH_DAMAGE_RADIUS;
break;
case 144:
local2 = ItemProperty.GAUSS_AIMED_RADIUS_OF_MAX_SPLASH_DAMAGE;
break;
case 145:
local2 = ItemProperty.GAUSS_AIMED_MIN_SPLASH_DAMAGE_PERCENT;
break;
case 146:
local2 = ItemProperty.GAUSS_AIMED_SPLASH_DAMAGE_IMPACT;
break;
case 147:
local2 = ItemProperty.GAUSS_AIMED_RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE;
break;
case 148:
local2 = ItemProperty.GAUSS_AIMED_FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT;
}
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:int = int(param2.value);
param1.writer.writeInt(local3);
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class EntranceAlertWindow_DISCOUNT_PICTURE_EN extends BitmapAsset
{
public function EntranceAlertWindow_DISCOUNT_PICTURE_EN()
{
super();
}
}
}
|
package alternativa.tanks.help.achievements {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.locale.ILocaleService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.BubbleHelper;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign;
public class BattleStartButtonHelper extends BubbleHelper {
public function BattleStartButtonHelper() {
super();
var local1:ILocaleService = ILocaleService(OSGi.getInstance().getService(ILocaleService));
text = local1.getText(TanksLocale.TEXT_HELP_PANEL_ACHIEVEMENTS_CREATE_BATTLE_BUTTON_TEXT);
arrowLehgth = int(local1.getText(TanksLocale.TEXT_HELP_PANEL_ACHIEVEMENTS_CREATE_BATTLE_BUTTON_ARROW_LENGTH));
arrowAlign = HelperAlign.BOTTOM_RIGHT;
_showLimit = 3;
}
}
}
|
package projects.tanks.client.entrance.model.entrance.blockvalidator {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class BlockValidatorModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BlockValidatorModelServer;
private var client:IBlockValidatorModelBase = IBlockValidatorModelBase(this);
private var modelId:Long = Long.getLong(928862932,-197944152);
private var _youAreBlockedId:Long = Long.getLong(418541502,1347122970);
private var _youAreBlocked_reasonForUserCodec:ICodec;
private var _youWereKickedId:Long = Long.getLong(418674442,275149928);
private var _youWereKicked_reasonForUserCodec:ICodec;
private var _youWereKicked_minutesCodec:ICodec;
private var _youWereKicked_hoursCodec:ICodec;
private var _youWereKicked_daysCodec:ICodec;
public function BlockValidatorModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BlockValidatorModelServer(IModel(this));
this._youAreBlocked_reasonForUserCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._youWereKicked_reasonForUserCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._youWereKicked_minutesCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._youWereKicked_hoursCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._youWereKicked_daysCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._youAreBlockedId:
this.client.youAreBlocked(String(this._youAreBlocked_reasonForUserCodec.decode(param2)));
break;
case this._youWereKickedId:
this.client.youWereKicked(String(this._youWereKicked_reasonForUserCodec.decode(param2)),int(this._youWereKicked_minutesCodec.decode(param2)),int(this._youWereKicked_hoursCodec.decode(param2)),int(this._youWereKicked_daysCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.caprefbutton {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.MouseEvent;
public class CapRefButton extends Sprite {
private static const bitmapBG:Class = CapRefButton_bitmapBG;
private static const bgBMP:BitmapData = new bitmapBG().bitmapData;
private var bmp:Bitmap = new Bitmap(bgBMP);
public function CapRefButton() {
super();
addChild(this.bmp);
addEventListener(MouseEvent.MOUSE_DOWN,this.mouseHandler);
addEventListener(MouseEvent.MOUSE_UP,this.mouseHandler);
}
private function mouseHandler(param1:MouseEvent) : void {
this.bmp.y = param1.type == MouseEvent.MOUSE_DOWN ? 1 : 0;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.servername {
import projects.tanks.clients.fp10.libraries.tanksservices.service.address.TanksAddressService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.reconnect.ReconnectService;
public class ServerNumberToLocaleServerServiceImpl implements ServerNumberToLocaleServerService {
[Inject]
public static var reconnectService:ReconnectService;
[Inject]
public static var addressService:TanksAddressService;
public function ServerNumberToLocaleServerServiceImpl() {
super();
}
public function isLocalServer() : Boolean {
return addressService.getServerNumber() == reconnectService.getCurrentServerNumber();
}
}
}
|
package alternativa.tanks.model.item.category {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.commons.types.ItemViewCategoryEnum;
public class IItemViewCategoryEvents implements IItemViewCategory {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IItemViewCategoryEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getViewCategory() : ItemViewCategoryEnum {
var result:ItemViewCategoryEnum = null;
var i:int = 0;
var m:IItemViewCategory = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IItemViewCategory(this.impl[i]);
result = m.getViewCategory();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.view {
import alternativa.tanks.controller.events.ChangeUidResultEvent;
import alternativa.tanks.view.events.SendChangeUidAndPasswordEvent;
import alternativa.tanks.view.events.SendChangeUidEvent;
import alternativa.tanks.view.forms.ChangeUidForm;
import org.robotlegs.core.IInjector;
import org.robotlegs.mvcs.Mediator;
public class ChangeUidFormMediator extends Mediator {
[Inject]
public var view:ChangeUidForm;
[Inject]
public var injector:IInjector;
public function ChangeUidFormMediator() {
super();
}
override public function onRegister() : void {
this.injector.injectInto(this.view);
addViewListener(SendChangeUidAndPasswordEvent.EVENT_TYPE,dispatch,SendChangeUidAndPasswordEvent);
addViewListener(SendChangeUidEvent.EVENT_TYPE,dispatch,SendChangeUidEvent);
addContextListener(ChangeUidResultEvent.PASSWORD_IS_INCORRECT,this.onPasswordIsIncorrect,ChangeUidResultEvent);
}
private function onPasswordIsIncorrect(param1:ChangeUidResultEvent) : void {
this.view.showAlertPasswordIsIncorrect();
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.reconnect {
public interface ReconnectService {
function getCurrentServerNumber() : int;
}
}
|
package alternativa.tanks.models.weapon.twins {
import alternativa.math.Vector3;
import alternativa.physics.collision.types.RayHit;
import alternativa.tanks.battle.BattleRunnerProvider;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.LogicUnit;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.WeaponObject;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.shared.SimpleWeaponController;
import alternativa.tanks.models.weapon.weakening.DistanceWeakening;
import alternativa.tanks.models.weapons.targeting.CommonTargetingSystem;
import alternativa.tanks.models.weapons.targeting.TargetingResult;
import alternativa.tanks.models.weapons.targeting.TargetingSystem;
import alternativa.tanks.physics.CollisionGroup;
import alternativa.tanks.utils.EncryptedInt;
import alternativa.tanks.utils.EncryptedIntImpl;
import flash.utils.getTimer;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.twins.TwinsCC;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class TwinsWeapon extends BattleRunnerProvider implements Weapon, LogicUnit {
private static var shotId:int;
private static const allGunParams:AllGlobalGunParams = new AllGlobalGunParams();
private static const shotDirection:Vector3 = new Vector3();
private static const rayHit:RayHit = new RayHit();
private var nextTime:EncryptedInt = new EncryptedIntImpl();
private var recoilForce:Number;
private var controller:SimpleWeaponController;
private var weaponPlatform:WeaponPlatform;
private var enabled:Boolean;
private var targetingSystem:TargetingSystem;
private var currentBarrel:int;
private var callback:TwinsWeaponCallback;
private var ammunition:TwinsAmmunition;
private var effects:TwinsEffects;
private var weakening:DistanceWeakening;
private var weaponObject:WeaponObject;
private var stunEnergy:Number;
private var stunned:Boolean;
public function TwinsWeapon(param1:IGameObject, param2:IGameObject, param3:TwinsCC) {
super();
this.weaponObject = new WeaponObject(param2);
var local4:DistanceWeakening = this.weaponObject.distanceWeakening();
var local5:WeaponCommonData = this.weaponObject.commonData();
var local6:TwinsWeaponCallback = TwinsWeaponCallback(param2.adapt(TwinsWeaponCallback));
var local7:ITwinsSFXModel = ITwinsSFXModel(param2.adapt(ITwinsSFXModel));
var local8:TwinsAmmunition = new TwinsAmmunition(this.weaponObject,param3,local7.getSFXData(),local6);
var local9:TargetingSystem = new CommonTargetingSystem(param1,this.weaponObject,local4.getDistance());
local9.getProcessor().setShotFromMuzzle();
var local10:SimpleWeaponController = new SimpleWeaponController();
this.recoilForce = local5.getRecoilForce();
this.controller = local10;
this.targetingSystem = local9;
this.callback = local6;
this.ammunition = local8;
this.effects = local7.getPlasmaWeaponEffects();
this.weakening = local4;
}
public function init(param1:WeaponPlatform) : void {
this.weaponPlatform = param1;
this.controller.init();
}
public function destroy() : void {
this.targetingSystem = null;
this.effects = null;
this.controller.destroy();
this.controller = null;
}
public function activate() : void {
getBattleRunner().addLogicUnit(this);
}
public function deactivate() : void {
getBattleRunner().removeLogicUnit(this);
}
public function enable() : void {
if(!this.enabled) {
this.enabled = true;
this.controller.discardStoredAction();
}
}
public function disable(param1:Boolean) : void {
this.enabled = false;
}
public function reset() : void {
this.controller.discardStoredAction();
this.nextTime.setInt(0);
this.currentBarrel = 0;
}
public function getStatus() : Number {
if(this.stunned) {
return this.stunEnergy;
}
var local1:Number = 1 - (this.nextTime.getInt() - getTimer()) / this.weaponObject.getReloadTimeMS();
return local1 > 1 ? 1 : local1;
}
public function runLogic(param1:int, param2:int) : void {
if(this.enabled) {
if(this.controller.wasActive() && param1 >= this.nextTime.getInt()) {
this.shoot(param1);
}
}
this.controller.discardStoredAction();
}
private function shoot(param1:int) : void {
this.nextTime.setInt(param1 + this.weaponObject.getReloadTimeMS());
this.weaponPlatform.getAllGunParams(allGunParams,this.currentBarrel);
this.weaponPlatform.getBody().addWorldForceScaled(allGunParams.muzzlePosition,allGunParams.direction,-this.recoilForce);
this.weaponPlatform.addDust(1);
this.effects.createShotEffects(this.weaponPlatform.getTurret3D(),this.weaponPlatform.getLocalMuzzlePosition(this.currentBarrel));
if(BattleUtils.isTurretAboveGround(this.weaponPlatform.getBody(),allGunParams)) {
this.doRealShot(param1,allGunParams);
} else {
this.doDummyShot(param1);
}
this.currentBarrel = (this.currentBarrel + 1) % this.weaponPlatform.getNumberOfBarrels();
}
private function doRealShot(param1:int, param2:AllGlobalGunParams) : void {
var local4:TargetingResult = null;
if(this.barrelCollidesWithStatic(param2.barrelOrigin,param2.direction,this.weaponPlatform.getBarrelLength(this.currentBarrel))) {
shotDirection.copy(param2.direction);
} else {
local4 = this.targetingSystem.target(param2);
shotDirection.copy(local4.getDirection());
}
var local3:TwinsShot = this.ammunition.getShot();
local3.addToGame(param2,shotDirection,this.weaponPlatform.getBody(),false,++shotId);
this.callback.onShot(param1,local3.getShotId(),this.currentBarrel,shotDirection);
}
private function barrelCollidesWithStatic(param1:Vector3, param2:Vector3, param3:Number) : Boolean {
return getBattleRunner().getCollisionDetector().raycastStatic(param1,param2,CollisionGroup.STATIC,param3,null,rayHit);
}
private function doDummyShot(param1:int) : void {
this.callback.onDummyShot(param1,this.currentBarrel);
}
public function getResistanceProperty() : ItemProperty {
return ItemProperty.TWINS_RESISTANCE;
}
public function updateRecoilForce(param1:Number) : void {
}
public function fullyRecharge() : void {
this.nextTime.setInt(0);
this.stunEnergy = 1;
}
public function weaponReloadTimeChanged(param1:int, param2:int) : void {
this.nextTime.setInt(this.nextTime.getInt() + param2 - param1);
}
public function stun() : void {
this.stunEnergy = this.getStatus();
this.stunned = true;
}
public function calm(param1:int) : void {
this.nextTime.setInt(this.nextTime.getInt() + param1);
this.stunned = false;
}
}
}
|
package alternativa.tanks.models.battle.battlefield.common {
import flash.display.Sprite;
public class MessageContainer extends Sprite {
protected var messageSpacing:int = 3;
protected var container:Sprite = new Sprite();
protected var shift:Number;
public function MessageContainer() {
super();
addChild(this.container);
}
public function removeFirstMessage(param1:Boolean = false) : MessageLine {
var local2:int = this.container.numChildren;
if(local2 == 0) {
return null;
}
var local3:MessageLine = MessageLine(this.container.getChildAt(0));
this.shift = int(local3.height + local3.y + this.messageSpacing);
this.container.removeChild(local3);
local2--;
var local4:int = 0;
while(local4 < local2) {
this.container.getChildAt(local4).y = this.container.getChildAt(local4).y - this.shift;
local4++;
}
return local3;
}
protected function pushFront(param1:MessageLine) : void {
param1.y = 0;
param1.alpha = 1;
this.container.addChildAt(param1,0);
var local2:int = this.container.numChildren;
var local3:int = 1;
while(local3 < local2) {
this.container.getChildAt(local3).y = this.container.getChildAt(local3).y + int(param1.height + this.messageSpacing);
local3++;
}
}
protected function pushBack(param1:MessageLine) : void {
param1.y = this.container.numChildren > 0 ? int(this.container.height + this.messageSpacing) : 0;
this.container.addChild(param1);
}
}
}
|
package alternativa.tanks.models.sfx.smoke {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class HullSmokeEvents implements HullSmoke {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function HullSmokeEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function controlChanged(param1:IGameObject, param2:int) : void {
var i:int = 0;
var m:HullSmoke = null;
var user:IGameObject = param1;
var controlState:int = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = HullSmoke(this.impl[i]);
m.controlChanged(user,controlState);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.battle.battlefield {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.ViewportBorder_bmpClassBorderLeft.png")]
public class ViewportBorder_bmpClassBorderLeft extends BitmapAsset {
public function ViewportBorder_bmpClassBorderLeft() {
super();
}
}
}
|
package alternativa.tanks.model.battleselect.create {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.controllers.battlecreate.CheckBattleNameEvent;
import alternativa.tanks.controllers.battlecreate.CreateBattleEvent;
import alternativa.tanks.controllers.battlecreate.CreateBattleFormController;
import alternativa.tanks.model.map.mapinfo.MapInfoModel;
import alternativa.tanks.service.battlecreate.BattleCreateFormServiceEvent;
import alternativa.tanks.service.battlecreate.IBattleCreateFormService;
import alternativa.tanks.tracker.ITrackerService;
import flash.events.Event;
import platform.client.fp10.core.model.IObjectLoadListener;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.battleselect.model.battleselect.create.BattleCreateModelBase;
import projects.tanks.client.battleselect.model.battleselect.create.IBattleCreateModelBase;
import projects.tanks.client.battleservice.BattleCreateParameters;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.IAlertService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.battlelist.UserBattleSelectActionsService;
import services.alertservice.AlertAnswer;
[ModelInfo]
public class BattleCreateModel extends BattleCreateModelBase implements IBattleCreateModelBase, IObjectLoadListener {
[Inject]
public static var modelRegistry:ModelRegistry;
[Inject]
public static var trackerService:ITrackerService;
[Inject]
public static var battleCreateFormService:IBattleCreateFormService;
[Inject]
public static var battleAlertService:IAlertService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var userBattleSelectActionsService:UserBattleSelectActionsService;
public function BattleCreateModel() {
super();
}
public function createFailedYouAreBanned() : void {
battleAlertService.showAlert(localeService.getText(TanksLocale.TEXT_CREATE_FAILED_YOU_ARE_BANNED),Vector.<String>([localeService.getText(AlertAnswer.OK)]));
}
public function createFailedServerIsHalting() : void {
battleAlertService.showAlert(localeService.getText(TanksLocale.TEXT_SERVER_IS_RESTARTING_CREATE_BATTLE_TEXT),Vector.<String>([localeService.getText(AlertAnswer.OK)]));
}
public function createFailedTooManyBattlesFromYou() : void {
battleAlertService.showAlert(localeService.getText(TanksLocale.TEXT_BATTLE_CREATE_PANEL_FLOOD_ALERT_TEXT),Vector.<String>([localeService.getText(AlertAnswer.OK)]));
}
public function createFailedBattleCreateDisabled() : void {
}
public function objectLoaded() : void {
battleCreateFormService.battleCreationDisabled = getInitParam().battleCreationDisabled;
}
public function objectLoadedPost() : void {
var local1:CreateBattleFormController = new CreateBattleFormController(getInitParam(),MapInfoModel.getMaps());
putData(CreateBattleFormController,local1);
battleCreateFormService.addEventListener(BattleCreateFormServiceEvent.SHOW_FORM,getFunctionWrapper(this.onShowForm));
battleCreateFormService.addEventListener(BattleCreateFormServiceEvent.HIDE_FORM,getFunctionWrapper(this.onHideForm));
}
public function objectUnloaded() : void {
battleCreateFormService.hideForm();
battleCreateFormService.removeEventListener(BattleCreateFormServiceEvent.SHOW_FORM,getFunctionWrapper(this.onShowForm));
battleCreateFormService.removeEventListener(BattleCreateFormServiceEvent.HIDE_FORM,getFunctionWrapper(this.onHideForm));
this.removeControllersListeners();
this.getCreateBattleFormController().destroy();
clearData(CreateBattleFormController);
}
public function objectUnloadedPost() : void {
}
private function onShowForm(param1:Event) : void {
var local2:CreateBattleFormController = this.getCreateBattleFormController();
local2.showForm();
local2.addEventListener(CreateBattleEvent.CREATE_BATTLE,getFunctionWrapper(this.onCreateBattle));
local2.addEventListener(CheckBattleNameEvent.CHECK_NAME,getFunctionWrapper(this.onCheckName));
}
private function onHideForm(param1:Event) : void {
this.removeControllersListeners();
this.getCreateBattleFormController().hideForm();
}
private function removeControllersListeners() : void {
var local1:CreateBattleFormController = this.getCreateBattleFormController();
local1.removeEventListener(CreateBattleEvent.CREATE_BATTLE,getFunctionWrapper(this.onCreateBattle));
local1.removeEventListener(CheckBattleNameEvent.CHECK_NAME,getFunctionWrapper(this.onCheckName));
}
private function onCreateBattle(param1:CreateBattleEvent) : void {
var local2:BattleCreateParameters = param1.battleCreateParams;
userBattleSelectActionsService.createBattle(param1.battleCreateParams.battleMode);
trackerService.trackEvent("battleList","createBattle",local2.mapId.toString());
server.createBattle(local2);
}
private function getCreateBattleFormController() : CreateBattleFormController {
return CreateBattleFormController(getData(CreateBattleFormController));
}
private function onCheckName(param1:CheckBattleNameEvent) : void {
server.checkBattleNameForForbiddenWords(param1.battleName);
}
public function setFilteredBattleName(param1:String) : void {
this.getCreateBattleFormController().checkedBattleNameResult(param1);
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.crystalpackage {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.shop.crystalpackage.CrystalPackageCC;
public class VectorCodecCrystalPackageCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecCrystalPackageCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(CrystalPackageCC,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.<CrystalPackageCC> = new Vector.<CrystalPackageCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = CrystalPackageCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:CrystalPackageCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<CrystalPackageCC> = Vector.<CrystalPackageCC>(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.models.battle.gui.chat {
import alternativa.tanks.services.battleinput.BattleInputLockEvent;
import alternativa.tanks.services.battleinput.BattleInputService;
import platform.client.fp10.core.type.AutoClosable;
public class ChatLocker implements AutoClosable {
[Inject]
public static var battleInputLockService:BattleInputService;
private var chat:BattleChat;
public function ChatLocker(param1:BattleChat) {
super();
this.chat = param1;
battleInputLockService.addEventListener(BattleInputLockEvent.CHAT_LOCKED,this.onChatLocked);
battleInputLockService.addEventListener(BattleInputLockEvent.CHAT_UNLOCKED,this.onChatUnlocked);
}
[Obfuscation(rename="false")]
public function close() : void {
battleInputLockService.removeEventListener(BattleInputLockEvent.CHAT_LOCKED,this.onChatLocked);
battleInputLockService.removeEventListener(BattleInputLockEvent.CHAT_UNLOCKED,this.onChatUnlocked);
this.chat = null;
}
private function onChatLocked(param1:BattleInputLockEvent) : void {
this.chat.closeChat();
this.chat.locked = true;
}
private function onChatUnlocked(param1:BattleInputLockEvent) : void {
this.chat.locked = false;
}
}
}
|
package alternativa.tanks.sfx
{
import alternativa.engine3d.core.Object3D;
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
public class SFXUtils
{
private static var axis1:Vector3 = new Vector3();
private static var axis2:Vector3 = new Vector3();
private static var eulerAngles:Vector3 = new Vector3();
private static var targetAxisZ:Vector3 = new Vector3();
private static var objectAxis:Vector3 = new Vector3();
private static var matrix1:Matrix3 = new Matrix3();
private static var matrix2:Matrix3 = new Matrix3();
public function SFXUtils()
{
super();
}
public static function alignObjectPlaneToView(object:Object3D, objectPosition:Vector3, objectDirection:Vector3, cameraPosition:Vector3) : void
{
var dot:Number = NaN;
var angle:Number = NaN;
dot = NaN;
if(objectDirection.y < -0.99999 || objectDirection.y > 0.99999)
{
axis1.x = 0;
axis1.y = 0;
axis1.z = 1;
angle = objectDirection.y < 0 ? Number(Number(Math.PI)) : Number(Number(0));
}
else
{
axis1.x = objectDirection.z;
axis1.y = 0;
axis1.z = -objectDirection.x;
axis1.vNormalize();
angle = Math.acos(objectDirection.y);
}
matrix1.fromAxisAngle(axis1,angle);
targetAxisZ.x = cameraPosition.x - objectPosition.x;
targetAxisZ.y = cameraPosition.y - objectPosition.y;
targetAxisZ.z = cameraPosition.z - objectPosition.z;
dot = targetAxisZ.x * objectDirection.x + targetAxisZ.y * objectDirection.y + targetAxisZ.z * objectDirection.z;
targetAxisZ.x -= dot * objectDirection.x;
targetAxisZ.y -= dot * objectDirection.y;
targetAxisZ.z -= dot * objectDirection.z;
targetAxisZ.vNormalize();
matrix1.transformVector(Vector3.Z_AXIS,objectAxis);
dot = objectAxis.x * targetAxisZ.x + objectAxis.y * targetAxisZ.y + objectAxis.z * targetAxisZ.z;
axis2.x = objectAxis.y * targetAxisZ.z - objectAxis.z * targetAxisZ.y;
axis2.y = objectAxis.z * targetAxisZ.x - objectAxis.x * targetAxisZ.z;
axis2.z = objectAxis.x * targetAxisZ.y - objectAxis.y * targetAxisZ.x;
axis2.vNormalize();
angle = Math.acos(dot);
matrix2.fromAxisAngle(axis2,angle);
matrix1.append(matrix2);
matrix1.getEulerAngles(eulerAngles);
object.rotationX = eulerAngles.x;
object.rotationY = eulerAngles.y;
object.rotationZ = eulerAngles.z;
object.x = objectPosition.x;
object.y = objectPosition.y;
object.z = objectPosition.z;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.user {
import alternativa.osgi.service.logging.LogService;
import flash.events.EventDispatcher;
import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.UserInfoConsumer;
import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.battle.BattleLinkData;
import projects.tanks.clients.fp10.libraries.tanksservices.service.IInfoLabelUpdater;
public class UserInfoLabelUpdater extends EventDispatcher implements UserInfoConsumer, IUserInfoLabelUpdater, IInfoLabelUpdater {
[Inject]
public static var logService:LogService;
private var _rank:int = 0;
private var _uid:String = null;
private var _online:Boolean = false;
private var _battleLink:BattleLinkData;
private var _visibleLabelsCounter:int;
private var _lastAccessTime:Number;
private var _snUid:String;
private var _referral:Boolean;
public function UserInfoLabelUpdater() {
super();
}
public function setOnline(param1:Boolean, param2:int) : void {
this._online = param1;
dispatchEvent(new UserInfoLabelUpdaterEvent(UserInfoLabelUpdaterEvent.CHANGE_ONLINE));
}
public function setUid(param1:String) : void {
this._uid = param1;
dispatchEvent(new UserInfoLabelUpdaterEvent(UserInfoLabelUpdaterEvent.CHANGE_UID));
}
public function setRank(param1:int) : void {
this._rank = param1;
dispatchEvent(new UserInfoLabelUpdaterEvent(UserInfoLabelUpdaterEvent.CHANGE_RANK));
}
public function setBattleUrl(param1:BattleLinkData) : void {
this._battleLink = param1;
dispatchEvent(new UserInfoLabelUpdaterEvent(UserInfoLabelUpdaterEvent.CHANGE_BATTLE_LINK));
}
public function hasData() : Boolean {
return this.uid != null;
}
public function get rank() : int {
return this._rank;
}
public function get uid() : String {
return this._uid;
}
public function get online() : Boolean {
return this._online;
}
public function get battleLink() : BattleLinkData {
return this._battleLink;
}
public function incrementVisibleLabelsCounter() : void {
++this._visibleLabelsCounter;
}
public function decrementVisibleLabelsCounter() : void {
--this._visibleLabelsCounter;
}
public function get visibleLabelsCounter() : int {
return this._visibleLabelsCounter;
}
public function updateLastAccessTime() : void {
this._lastAccessTime = new Date().time;
}
public function get lastAccessTime() : Number {
return this._lastAccessTime;
}
public function hasBattleLink() : Boolean {
return this._battleLink != null;
}
public function setSNUid(param1:String) : void {
this._snUid = param1;
}
public function getSNUid() : String {
return this._snUid;
}
public function setIsReferral(param1:Boolean) : void {
this._referral = param1;
}
public function isReferral() : Boolean {
return this._referral;
}
}
}
|
package alternativa.engine3d.primitives {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Mesh;
use namespace alternativa3d;
public class GeoSphere extends Mesh {
public function GeoSphere(param1:Number = 100, param2:uint = 2, param3:Boolean = false, param4:Material = null) {
var local9:uint = 0;
var local10:uint = 0;
var local11:Number = NaN;
var local12:Number = NaN;
var local13:Number = NaN;
var local16:uint = 0;
var local17:uint = 0;
var local18:uint = 0;
var local19:uint = 0;
var local20:uint = 0;
var local21:Vertex = null;
var local22:Vertex = null;
var local23:Vertex = null;
var local24:Number = NaN;
var local25:Number = NaN;
var local26:Number = NaN;
var local27:Number = NaN;
var local28:Number = NaN;
var local29:Number = NaN;
super();
if(param2 < 1) {
throw new ArgumentError(param2 + " segments not enough.");
}
param1 = param1 < 0 ? 0 : param1;
var local5:uint = 20;
var local6:Number = Math.PI;
var local7:Number = Math.PI * 2;
var local8:Vector.<Vertex> = new Vector.<Vertex>();
var local14:Number = 0.4472136 * param1;
var local15:Number = 2 * local14;
local8.push(this.createVertex(0,0,param1));
local9 = 0;
while(local9 < 5) {
local11 = local7 * local9 / 5;
local12 = Math.sin(local11);
local13 = Math.cos(local11);
local8.push(this.createVertex(local15 * local13,local15 * local12,local14));
local9++;
}
local9 = 0;
while(local9 < 5) {
local11 = local6 * ((local9 << 1) + 1) / 5;
local12 = Math.sin(local11);
local13 = Math.cos(local11);
local8.push(this.createVertex(local15 * local13,local15 * local12,-local14));
local9++;
}
local8.push(this.createVertex(0,0,-param1));
local9 = 1;
while(local9 < 6) {
this.interpolate(0,local9,param2,local8);
local9++;
}
local9 = 1;
while(local9 < 6) {
this.interpolate(local9,local9 % 5 + 1,param2,local8);
local9++;
}
local9 = 1;
while(local9 < 6) {
this.interpolate(local9,local9 + 5,param2,local8);
local9++;
}
local9 = 1;
while(local9 < 6) {
this.interpolate(local9,(local9 + 3) % 5 + 6,param2,local8);
local9++;
}
local9 = 1;
while(local9 < 6) {
this.interpolate(local9 + 5,local9 % 5 + 6,param2,local8);
local9++;
}
local9 = 6;
while(local9 < 11) {
this.interpolate(11,local9,param2,local8);
local9++;
}
local10 = 0;
while(local10 < 5) {
local9 = 1;
while(local9 <= param2 - 2) {
this.interpolate(12 + local10 * (param2 - 1) + local9,12 + (local10 + 1) % 5 * (param2 - 1) + local9,local9 + 1,local8);
local9++;
}
local10++;
}
local10 = 0;
while(local10 < 5) {
local9 = 1;
while(local9 <= param2 - 2) {
this.interpolate(12 + (local10 + 15) * (param2 - 1) + local9,12 + (local10 + 10) * (param2 - 1) + local9,local9 + 1,local8);
local9++;
}
local10++;
}
local10 = 0;
while(local10 < 5) {
local9 = 1;
while(local9 <= param2 - 2) {
this.interpolate(12 + ((local10 + 1) % 5 + 15) * (param2 - 1) + param2 - 2 - local9,12 + (local10 + 10) * (param2 - 1) + param2 - 2 - local9,local9 + 1,local8);
local9++;
}
local10++;
}
local10 = 0;
while(local10 < 5) {
local9 = 1;
while(local9 <= param2 - 2) {
this.interpolate(12 + ((local10 + 1) % 5 + 25) * (param2 - 1) + local9,12 + (local10 + 25) * (param2 - 1) + local9,local9 + 1,local8);
local9++;
}
local10++;
}
local10 = 0;
while(local10 < local5) {
local16 = 0;
while(local16 < param2) {
local17 = 0;
while(local17 <= local16) {
local18 = this.findVertices(param2,local10,local16,local17);
local19 = this.findVertices(param2,local10,local16 + 1,local17);
local20 = this.findVertices(param2,local10,local16 + 1,local17 + 1);
local21 = local8[local18];
local22 = local8[local19];
local23 = local8[local20];
if(local21.y >= 0 && local21.x < 0 && (local22.y < 0 || local23.y < 0)) {
local24 = Math.atan2(local21.y,local21.x) / local7 - 0.5;
} else {
local24 = Math.atan2(local21.y,local21.x) / local7 + 0.5;
}
local25 = -Math.asin(local21.z / param1) / local6 + 0.5;
if(local22.y >= 0 && local22.x < 0 && (local21.y < 0 || local23.y < 0)) {
local26 = Math.atan2(local22.y,local22.x) / local7 - 0.5;
} else {
local26 = Math.atan2(local22.y,local22.x) / local7 + 0.5;
}
local27 = -Math.asin(local22.z / param1) / local6 + 0.5;
if(local23.y >= 0 && local23.x < 0 && (local21.y < 0 || local22.y < 0)) {
local28 = Math.atan2(local23.y,local23.x) / local7 - 0.5;
} else {
local28 = Math.atan2(local23.y,local23.x) / local7 + 0.5;
}
local29 = -Math.asin(local23.z / param1) / local6 + 0.5;
if(local18 == 0 || local18 == 11) {
local24 = local26 + (local28 - local26) * 0.5;
}
if(local19 == 0 || local19 == 11) {
local26 = local24 + (local28 - local24) * 0.5;
}
if(local20 == 0 || local20 == 11) {
local28 = local24 + (local26 - local24) * 0.5;
}
if(local21.alternativa3d::offset > 0 && local21.u != local24) {
local21 = this.createVertex(local21.x,local21.y,local21.z);
}
local21.u = local24;
local21.v = local25;
local21.alternativa3d::offset = 1;
if(local22.alternativa3d::offset > 0 && local22.u != local26) {
local22 = this.createVertex(local22.x,local22.y,local22.z);
}
local22.u = local26;
local22.v = local27;
local22.alternativa3d::offset = 1;
if(local23.alternativa3d::offset > 0 && local23.u != local28) {
local23 = this.createVertex(local23.x,local23.y,local23.z);
}
local23.u = local28;
local23.v = local29;
local23.alternativa3d::offset = 1;
if(param3) {
this.createFace(local21,local23,local22,param4);
} else {
this.createFace(local21,local22,local23,param4);
}
if(local17 < local16) {
local19 = this.findVertices(param2,local10,local16,local17 + 1);
local22 = local8[local19];
if(local21.y >= 0 && local21.x < 0 && (local22.y < 0 || local23.y < 0)) {
local24 = Math.atan2(local21.y,local21.x) / local7 - 0.5;
} else {
local24 = Math.atan2(local21.y,local21.x) / local7 + 0.5;
}
local25 = -Math.asin(local21.z / param1) / local6 + 0.5;
if(local22.y >= 0 && local22.x < 0 && (local21.y < 0 || local23.y < 0)) {
local26 = Math.atan2(local22.y,local22.x) / local7 - 0.5;
} else {
local26 = Math.atan2(local22.y,local22.x) / local7 + 0.5;
}
local27 = -Math.asin(local22.z / param1) / local6 + 0.5;
if(local23.y >= 0 && local23.x < 0 && (local21.y < 0 || local22.y < 0)) {
local28 = Math.atan2(local23.y,local23.x) / local7 - 0.5;
} else {
local28 = Math.atan2(local23.y,local23.x) / local7 + 0.5;
}
local29 = -Math.asin(local23.z / param1) / local6 + 0.5;
if(local18 == 0 || local18 == 11) {
local24 = local26 + (local28 - local26) * 0.5;
}
if(local19 == 0 || local19 == 11) {
local26 = local24 + (local28 - local24) * 0.5;
}
if(local20 == 0 || local20 == 11) {
local28 = local24 + (local26 - local24) * 0.5;
}
if(local21.alternativa3d::offset > 0 && local21.u != local24) {
local21 = this.createVertex(local21.x,local21.y,local21.z);
}
local21.u = local24;
local21.v = local25;
local21.alternativa3d::offset = 1;
if(local22.alternativa3d::offset > 0 && local22.u != local26) {
local22 = this.createVertex(local22.x,local22.y,local22.z);
}
local22.u = local26;
local22.v = local27;
local22.alternativa3d::offset = 1;
if(local23.alternativa3d::offset > 0 && local23.u != local28) {
local23 = this.createVertex(local23.x,local23.y,local23.z);
}
local23.u = local28;
local23.v = local29;
local23.alternativa3d::offset = 1;
if(param3) {
this.createFace(local21,local22,local23,param4);
} else {
this.createFace(local21,local23,local22,param4);
}
}
local17++;
}
local16++;
}
local10++;
}
calculateFacesNormals(true);
boundMinX = -param1;
boundMinY = -param1;
boundMinZ = -param1;
boundMaxX = param1;
boundMaxY = param1;
boundMaxZ = param1;
}
private function createVertex(param1:Number, param2:Number, param3:Number) : Vertex {
var local4:Vertex = new Vertex();
local4.x = param1;
local4.y = param2;
local4.z = param3;
local4.alternativa3d::offset = -1;
local4.alternativa3d::next = alternativa3d::vertexList;
alternativa3d::vertexList = local4;
return local4;
}
private function createFace(param1:Vertex, param2:Vertex, param3:Vertex, param4:Material) : void {
var local5:Face = new Face();
local5.material = param4;
local5.alternativa3d::wrapper = new Wrapper();
local5.alternativa3d::wrapper.alternativa3d::vertex = param1;
local5.alternativa3d::wrapper.alternativa3d::next = new Wrapper();
local5.alternativa3d::wrapper.alternativa3d::next.alternativa3d::vertex = param2;
local5.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next = new Wrapper();
local5.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::vertex = param3;
local5.alternativa3d::next = alternativa3d::faceList;
alternativa3d::faceList = local5;
}
private function interpolate(param1:uint, param2:uint, param3:uint, param4:Vector.<Vertex>) : void {
var local11:Number = NaN;
var local12:Number = NaN;
var local13:Number = NaN;
var local14:Number = NaN;
if(param3 < 2) {
return;
}
var local5:Vertex = Vertex(param4[param1]);
var local6:Vertex = Vertex(param4[param2]);
var local7:Number = (local5.x * local6.x + local5.y * local6.y + local5.z * local6.z) / (local5.x * local5.x + local5.y * local5.y + local5.z * local5.z);
local7 = local7 < -1 ? -1 : (local7 > 1 ? 1 : local7);
var local8:Number = Math.acos(local7);
var local9:Number = Math.sin(local8);
var local10:uint = 1;
while(local10 < param3) {
local11 = local8 * local10 / param3;
local12 = local8 * (param3 - local10) / param3;
local13 = Math.sin(local11);
local14 = Math.sin(local12);
param4.push(this.createVertex((local5.x * local14 + local6.x * local13) / local9,(local5.y * local14 + local6.y * local13) / local9,(local5.z * local14 + local6.z * local13) / local9));
local10++;
}
}
private function findVertices(param1:uint, param2:uint, param3:uint, param4:uint) : uint {
if(param3 == 0) {
if(param2 < 5) {
return 0;
}
if(param2 > 14) {
return 11;
}
return param2 - 4;
}
if(param3 == param1 && param4 == 0) {
if(param2 < 5) {
return param2 + 1;
}
if(param2 < 10) {
return (param2 + 4) % 5 + 6;
}
if(param2 < 15) {
return (param2 + 1) % 5 + 1;
}
return (param2 + 1) % 5 + 6;
}
if(param3 == param1 && param4 == param1) {
if(param2 < 5) {
return (param2 + 1) % 5 + 1;
}
if(param2 < 10) {
return param2 + 1;
}
if(param2 < 15) {
return param2 - 9;
}
return param2 - 9;
}
if(param3 == param1) {
if(param2 < 5) {
return 12 + (5 + param2) * (param1 - 1) + param4 - 1;
}
if(param2 < 10) {
return 12 + (20 + (param2 + 4) % 5) * (param1 - 1) + param4 - 1;
}
if(param2 < 15) {
return 12 + (param2 - 5) * (param1 - 1) + param1 - 1 - param4;
}
return 12 + (5 + param2) * (param1 - 1) + param1 - 1 - param4;
}
if(param4 == 0) {
if(param2 < 5) {
return 12 + param2 * (param1 - 1) + param3 - 1;
}
if(param2 < 10) {
return 12 + (param2 % 5 + 15) * (param1 - 1) + param3 - 1;
}
if(param2 < 15) {
return 12 + ((param2 + 1) % 5 + 15) * (param1 - 1) + param1 - 1 - param3;
}
return 12 + ((param2 + 1) % 5 + 25) * (param1 - 1) + param3 - 1;
}
if(param4 == param3) {
if(param2 < 5) {
return 12 + (param2 + 1) % 5 * (param1 - 1) + param3 - 1;
}
if(param2 < 10) {
return 12 + (param2 % 5 + 10) * (param1 - 1) + param3 - 1;
}
if(param2 < 15) {
return 12 + (param2 % 5 + 10) * (param1 - 1) + param1 - param3 - 1;
}
return 12 + (param2 % 5 + 25) * (param1 - 1) + param3 - 1;
}
return 12 + 30 * (param1 - 1) + param2 * (param1 - 1) * (param1 - 2) / 2 + (param3 - 1) * (param3 - 2) / 2 + param4 - 1;
}
override public function clone() : Object3D {
var local1:GeoSphere = new GeoSphere();
local1.clonePropertiesFrom(this);
return local1;
}
}
}
|
package _codec.projects.tanks.client.panel.model.quest.showing {
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 platform.client.fp10.core.resource.types.ImageResource;
import projects.tanks.client.panel.model.quest.showing.CommonQuestInfo;
import projects.tanks.client.panel.model.quest.showing.QuestPrizeInfo;
public class CodecCommonQuestInfo implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_description:ICodec;
private var codec_finishCriteria:ICodec;
private var codec_image:ICodec;
private var codec_prizes:ICodec;
private var codec_progress:ICodec;
private var codec_questId:ICodec;
public function CodecCommonQuestInfo() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_description = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_finishCriteria = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_image = param1.getCodec(new TypeCodecInfo(ImageResource,false));
this.codec_prizes = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(QuestPrizeInfo,false),false,1));
this.codec_progress = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_questId = param1.getCodec(new TypeCodecInfo(Long,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:CommonQuestInfo = new CommonQuestInfo();
local2.description = this.codec_description.decode(param1) as String;
local2.finishCriteria = this.codec_finishCriteria.decode(param1) as int;
local2.image = this.codec_image.decode(param1) as ImageResource;
local2.prizes = this.codec_prizes.decode(param1) as Vector.<QuestPrizeInfo>;
local2.progress = this.codec_progress.decode(param1) as int;
local2.questId = this.codec_questId.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:CommonQuestInfo = CommonQuestInfo(param2);
this.codec_description.encode(param1,local3.description);
this.codec_finishCriteria.encode(param1,local3.finishCriteria);
this.codec_image.encode(param1,local3.image);
this.codec_prizes.encode(param1,local3.prizes);
this.codec_progress.encode(param1,local3.progress);
this.codec_questId.encode(param1,local3.questId);
}
}
}
|
package alternativa.engine3d.core {
import alternativa.Alternativa3D;
import alternativa.engine3d.alternativa3d;
import flash.display.Bitmap;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.events.ContextMenuEvent;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.ColorTransform;
import flash.geom.Point;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.ui.Keyboard;
import flash.ui.Mouse;
import flash.utils.setTimeout;
use namespace alternativa3d;
public class View extends Canvas {
private static const mouse:Point = new Point();
private static const branch:Vector.<Object3D> = new Vector.<Object3D>();
private static const overedBranch:Vector.<Object3D> = new Vector.<Object3D>();
private static const changedBranch:Vector.<Object3D> = new Vector.<Object3D>();
private static const functions:Vector.<Function> = new Vector.<Function>();
alternativa3d var _width:Number;
alternativa3d var _height:Number;
alternativa3d var constrained:Boolean;
private var lastEvent:MouseEvent;
private var camera:Camera3D;
private var target:Object3D;
private var pressedTarget:Object3D;
private var clickedTarget:Object3D;
private var overedTarget:Object3D;
private var altKey:Boolean;
private var ctrlKey:Boolean;
private var shiftKey:Boolean;
private var delta:int;
private var buttonDown:Boolean;
private var area:Sprite;
private var logo:Logo;
private var bitmap:Bitmap;
private var _logoAlign:String = "BR";
private var _logoHorizontalMargin:Number = 0;
private var _logoVerticalMargin:Number = 0;
public var enableErrorChecking:Boolean = false;
public var zBufferPrecision:int = 16;
public var antiAliasEnabled:Boolean = true;
public var offsetX:Number = 0;
public var offsetY:Number = 0;
public function View(param1:Number, param2:Number, param3:Boolean = false) {
var item:ContextMenuItem;
var menu:ContextMenu;
var width:Number = param1;
var height:Number = param2;
var constrainedMode:Boolean = param3;
super();
this.alternativa3d::_width = width;
this.alternativa3d::_height = height;
mouseEnabled = true;
mouseChildren = true;
doubleClickEnabled = true;
buttonMode = true;
useHandCursor = false;
tabEnabled = false;
tabChildren = false;
item = new ContextMenuItem("Powered by Alternativa3D " + Alternativa3D.version);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,function(param1:ContextMenuEvent):void {
try {
navigateToURL(new URLRequest("http://alternativaplatform.com"),"_blank");
}
catch(e:Error) {
}
});
menu = new ContextMenu();
menu.customItems = [item];
contextMenu = menu;
this.area = new Sprite();
this.area.graphics.beginFill(16711680);
this.area.graphics.drawRect(0,0,width,height);
this.area.mouseEnabled = false;
this.area.visible = false;
hitArea = this.area;
super.addChild(hitArea);
this.showLogo();
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
addEventListener(MouseEvent.CLICK,this.onClick);
addEventListener(MouseEvent.DOUBLE_CLICK,this.onDoubleClick);
addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseMove);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseOut);
addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
addEventListener(Event.ADDED_TO_STAGE,this.onAddToStage);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
}
private function onAddToStage(param1:Event) : void {
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
}
private function onRemoveFromStage(param1:Event) : void {
stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
}
private function onKeyDown(param1:KeyboardEvent) : void {
this.altKey = param1.altKey;
this.ctrlKey = param1.ctrlKey;
this.shiftKey = param1.shiftKey;
if(this.ctrlKey && this.shiftKey && param1.keyCode == Keyboard.F1 && this.bitmap == null) {
this.bitmap = new Bitmap(Logo.image);
this.bitmap.x = Math.round((this.alternativa3d::_width - this.bitmap.width) / 2);
this.bitmap.y = Math.round((this.alternativa3d::_height - this.bitmap.height) / 2);
super.addChild(this.bitmap);
setTimeout(this.removeBitmap,2048);
}
}
private function removeBitmap() : void {
if(this.bitmap != null) {
super.removeChild(this.bitmap);
this.bitmap = null;
}
}
private function onKeyUp(param1:KeyboardEvent) : void {
this.altKey = param1.altKey;
this.ctrlKey = param1.ctrlKey;
this.shiftKey = param1.shiftKey;
}
private function onMouse(param1:MouseEvent) : void {
this.altKey = param1.altKey;
this.ctrlKey = param1.ctrlKey;
this.shiftKey = param1.shiftKey;
this.buttonDown = param1.buttonDown;
this.delta = param1.delta;
this.lastEvent = param1;
}
private function onMouseDown(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_DOWN,this.target,this.branchToVector(this.target,branch));
}
this.pressedTarget = this.target;
this.target = null;
}
private function onMouseWheel(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_WHEEL,this.target,this.branchToVector(this.target,branch));
}
this.target = null;
}
private function onClick(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_UP,this.target,this.branchToVector(this.target,branch));
if(this.pressedTarget == this.target) {
this.clickedTarget = this.target;
this.propagateEvent(MouseEvent3D.CLICK,this.target,this.branchToVector(this.target,branch));
}
}
this.pressedTarget = null;
this.target = null;
}
private function onDoubleClick(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_UP,this.target,this.branchToVector(this.target,branch));
if(this.pressedTarget == this.target) {
this.propagateEvent(this.clickedTarget == this.target && this.target.doubleClickEnabled ? MouseEvent3D.DOUBLE_CLICK : MouseEvent3D.CLICK,this.target,this.branchToVector(this.target,branch));
}
}
this.clickedTarget = null;
this.pressedTarget = null;
this.target = null;
}
private function onMouseMove(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_MOVE,this.target,this.branchToVector(this.target,branch));
}
if(this.overedTarget != this.target) {
this.processOverOut();
}
this.target = null;
}
private function onMouseOut(param1:MouseEvent) : void {
this.onMouse(param1);
this.lastEvent = null;
this.target = null;
if(this.overedTarget != this.target) {
this.processOverOut();
}
this.target = null;
}
alternativa3d function onRender(param1:Camera3D) : void {
this.camera = param1;
if(this.lastEvent != null) {
this.defineTarget(this.lastEvent);
if(this.overedTarget != this.target) {
this.processOverOut();
}
}
this.target = null;
}
private function processOverOut() : void {
var local3:int = 0;
var local4:int = 0;
var local5:int = 0;
var local6:Object3D = null;
this.branchToVector(this.target,branch);
this.branchToVector(this.overedTarget,overedBranch);
var local1:int = int(branch.length);
var local2:int = int(overedBranch.length);
if(this.overedTarget != null) {
this.propagateEvent(MouseEvent3D.MOUSE_OUT,this.overedTarget,overedBranch,true,this.target);
local3 = 0;
local4 = 0;
while(local4 < local2) {
local6 = overedBranch[local4];
local5 = 0;
while(local5 < local1) {
if(local6 == branch[local5]) {
break;
}
local5++;
}
if(local5 == local1) {
changedBranch[local3] = local6;
local3++;
}
local4++;
}
if(local3 > 0) {
changedBranch.length = local3;
this.propagateEvent(MouseEvent3D.ROLL_OUT,this.overedTarget,changedBranch,false,this.target);
}
}
if(this.target != null) {
local3 = 0;
local4 = 0;
while(local4 < local1) {
local6 = branch[local4];
local5 = 0;
while(local5 < local2) {
if(local6 == overedBranch[local5]) {
break;
}
local5++;
}
if(local5 == local2) {
changedBranch[local3] = local6;
local3++;
}
local4++;
}
if(local3 > 0) {
changedBranch.length = local3;
this.propagateEvent(MouseEvent3D.ROLL_OVER,this.target,changedBranch,false,this.overedTarget);
}
this.propagateEvent(MouseEvent3D.MOUSE_OVER,this.target,branch,true,this.overedTarget);
useHandCursor = this.target.useHandCursor;
} else {
useHandCursor = false;
}
Mouse.cursor = Mouse.cursor;
this.overedTarget = this.target;
}
private function branchToVector(param1:Object3D, param2:Vector.<Object3D>) : Vector.<Object3D> {
var local3:int = 0;
while(param1 != null) {
param2[local3] = param1;
local3++;
param1 = param1.alternativa3d::_parent;
}
param2.length = local3;
return param2;
}
private function propagateEvent(param1:String, param2:Object3D, param3:Vector.<Object3D>, param4:Boolean = true, param5:Object3D = null) : void {
var local7:Object3D = null;
var local8:Vector.<Function> = null;
var local9:int = 0;
var local10:int = 0;
var local11:int = 0;
var local12:MouseEvent3D = null;
var local6:int = int(param3.length);
local10 = local6 - 1;
while(local10 > 0) {
local7 = param3[local10];
if(local7.alternativa3d::captureListeners != null) {
local8 = local7.alternativa3d::captureListeners[param1];
if(local8 != null) {
if(local12 == null) {
local12 = new MouseEvent3D(param1,param4,param5,this.altKey,this.ctrlKey,this.shiftKey,this.buttonDown,this.delta);
local12.alternativa3d::_target = param2;
local12.alternativa3d::calculateLocalRay(mouseX,mouseY,param2,this.camera);
}
local12.alternativa3d::_currentTarget = local7;
local12.alternativa3d::_eventPhase = 1;
local9 = int(local8.length);
local11 = 0;
while(local11 < local9) {
functions[local11] = local8[local11];
local11++;
}
local11 = 0;
while(local11 < local9) {
(functions[local11] as Function).call(null,local12);
if(local12.alternativa3d::stopImmediate) {
return;
}
local11++;
}
if(local12.alternativa3d::stop) {
return;
}
}
}
local10--;
}
local10 = 0;
while(local10 < local6) {
local7 = param3[local10];
if(local7.alternativa3d::bubbleListeners != null) {
local8 = local7.alternativa3d::bubbleListeners[param1];
if(local8 != null) {
if(local12 == null) {
local12 = new MouseEvent3D(param1,param4,param5,this.altKey,this.ctrlKey,this.shiftKey,this.buttonDown,this.delta);
local12.alternativa3d::_target = param2;
local12.alternativa3d::calculateLocalRay(mouseX,mouseY,param2,this.camera);
}
local12.alternativa3d::_currentTarget = local7;
local12.alternativa3d::_eventPhase = local10 == 0 ? 2 : 3;
local9 = int(local8.length);
local11 = 0;
while(local11 < local9) {
functions[local11] = local8[local11];
local11++;
}
local11 = 0;
while(local11 < local9) {
(functions[local11] as Function).call(null,local12);
if(local12.alternativa3d::stopImmediate) {
return;
}
local11++;
}
if(local12.alternativa3d::stop) {
return;
}
}
}
local10++;
}
}
private function defineTarget(param1:MouseEvent) : void {
var local2:Object3D = null;
var local3:Object3D = null;
var local6:Canvas = null;
var local7:DisplayObject = null;
var local8:Object3D = null;
var local9:Object3D = null;
mouse.x = param1.localX;
mouse.y = param1.localY;
var local4:Array = stage != null ? stage.getObjectsUnderPoint(localToGlobal(mouse)) : super.getObjectsUnderPoint(mouse);
var local5:int = local4.length - 1;
while(local5 >= 0) {
local6 = null;
local7 = local4[local5];
while(local7.parent != stage) {
local6 = local7 as Canvas;
if(local6 != null) {
break;
}
local7 = local7.parent;
}
if(local6 != null) {
local3 = local6.alternativa3d::object;
if(local3 != null) {
local8 = null;
local9 = local3;
while(local9 != null) {
if(local9 is Object3DContainer && !Object3DContainer(local9).mouseChildren) {
local8 = null;
}
if(local8 == null && local9.mouseEnabled) {
local8 = local9;
}
local9 = local9.alternativa3d::_parent;
}
if(local8 != null) {
if(this.target != null) {
local9 = local8;
while(local9 != null) {
if(local9 == this.target) {
local2 = local3;
this.target = local8;
break;
}
local9 = local9.alternativa3d::_parent;
}
} else {
local2 = local3;
this.target = local8;
}
if(local2 == this.target) {
break;
}
}
}
}
local5--;
}
}
override public function getObjectsUnderPoint(param1:Point) : Array {
var local6:Canvas = null;
var local7:DisplayObject = null;
var local8:int = 0;
var local2:Array = new Array();
var local3:int = 0;
var local4:Array = stage != null ? stage.getObjectsUnderPoint(param1) : super.getObjectsUnderPoint(param1);
var local5:int = local4.length - 1;
while(local5 >= 0) {
local6 = null;
local7 = local4[local5];
while(local7 != null) {
local6 = local7 as Canvas;
if(local6 != null) {
if(local6.alternativa3d::object != null) {
local8 = 0;
while(local8 < local3) {
if(local2[local8] == local6.alternativa3d::object) {
break;
}
local8++;
}
if(local8 == local3) {
local2.unshift(local6.alternativa3d::object);
local3++;
}
}
break;
}
local7 = local7.parent;
}
local5--;
}
return local2;
}
public function showLogo() : void {
if(this.logo == null) {
this.logo = new Logo();
super.addChild(this.logo);
this.resizeLogo();
}
}
public function hideLogo() : void {
if(this.logo != null) {
super.removeChild(this.logo);
this.logo = null;
}
}
public function get logoAlign() : String {
return this._logoAlign;
}
public function set logoAlign(param1:String) : void {
this._logoAlign = param1;
this.resizeLogo();
}
public function get logoHorizontalMargin() : Number {
return this._logoHorizontalMargin;
}
public function set logoHorizontalMargin(param1:Number) : void {
this._logoHorizontalMargin = param1;
this.resizeLogo();
}
public function get logoVerticalMargin() : Number {
return this._logoVerticalMargin;
}
public function set logoVerticalMargin(param1:Number) : void {
this._logoVerticalMargin = param1;
this.resizeLogo();
}
private function resizeLogo() : void {
if(this.logo != null) {
if(this._logoAlign == StageAlign.TOP_LEFT || this._logoAlign == StageAlign.LEFT || this._logoAlign == StageAlign.BOTTOM_LEFT) {
this.logo.x = Math.round(this._logoHorizontalMargin);
}
if(this._logoAlign == StageAlign.TOP || this._logoAlign == StageAlign.BOTTOM) {
this.logo.x = Math.round((this.alternativa3d::_width - this.logo.width) / 2);
}
if(this._logoAlign == StageAlign.TOP_RIGHT || this._logoAlign == StageAlign.RIGHT || this._logoAlign == StageAlign.BOTTOM_RIGHT) {
this.logo.x = Math.round(this.alternativa3d::_width - this._logoHorizontalMargin - this.logo.width);
}
if(this._logoAlign == StageAlign.TOP_LEFT || this._logoAlign == StageAlign.TOP || this._logoAlign == StageAlign.TOP_RIGHT) {
this.logo.y = Math.round(this._logoVerticalMargin);
}
if(this._logoAlign == StageAlign.LEFT || this._logoAlign == StageAlign.RIGHT) {
this.logo.y = Math.round((this.alternativa3d::_height - this.logo.height) / 2);
}
if(this._logoAlign == StageAlign.BOTTOM_LEFT || this._logoAlign == StageAlign.BOTTOM || this._logoAlign == StageAlign.BOTTOM_RIGHT) {
this.logo.y = Math.round(this.alternativa3d::_height - this._logoVerticalMargin - this.logo.height);
}
}
}
public function clear() : void {
this.alternativa3d::remChildren(0);
alternativa3d::numDraws = 0;
}
override public function get width() : Number {
return this.alternativa3d::_width;
}
override public function set width(param1:Number) : void {
this.alternativa3d::_width = param1;
this.area.width = param1;
this.resizeLogo();
}
override public function get height() : Number {
return this.alternativa3d::_height;
}
override public function set height(param1:Number) : void {
this.alternativa3d::_height = param1;
this.area.height = param1;
this.resizeLogo();
}
override public function addChild(param1:DisplayObject) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function removeChild(param1:DisplayObject) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function addChildAt(param1:DisplayObject, param2:int) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function removeChildAt(param1:int) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function getChildAt(param1:int) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function getChildIndex(param1:DisplayObject) : int {
throw new Error("Unsupported operation.");
}
override public function setChildIndex(param1:DisplayObject, param2:int) : void {
throw new Error("Unsupported operation.");
}
override public function swapChildren(param1:DisplayObject, param2:DisplayObject) : void {
throw new Error("Unsupported operation.");
}
override public function swapChildrenAt(param1:int, param2:int) : void {
throw new Error("Unsupported operation.");
}
override public function getChildByName(param1:String) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function get numChildren() : int {
return 0;
}
override alternativa3d function getChildCanvas(param1:Boolean, param2:Boolean, param3:Object3D = null, param4:Number = 1, param5:String = "normal", param6:ColorTransform = null, param7:Array = null) : Canvas {
var local8:Canvas = null;
var local9:DisplayObject = null;
// FFDec bug - original code checks [_numChildren > _numDraws] before calling [getChildAt]
while(alternativa3d::_numChildren > alternativa3d::numDraws) {
local9 = super.getChildAt(alternativa3d::_numChildren - 1 - alternativa3d::numDraws);
if(local9 is Canvas) break;
super.removeChild(local9);
--alternativa3d::_numChildren;
}
if(alternativa3d::_numChildren > alternativa3d::numDraws++) {
local8 = local9 as Canvas;
if(local8.alternativa3d::modifiedGraphics) {
local8.alternativa3d::gfx.clear();
}
if(local8.alternativa3d::_numChildren > 0 && !param2) {
local8.alternativa3d::remChildren(0);
}
} else {
local8 = alternativa3d::collectorLength > 0 ? alternativa3d::collector[--alternativa3d::collectorLength] : new Canvas();
super.addChildAt(local8,0);
++alternativa3d::_numChildren;
}
local8.alternativa3d::object = param3;
local8.alternativa3d::modifiedGraphics = param1;
if(param4 != 1) {
local8.alpha = param4;
local8.alternativa3d::modifiedAlpha = true;
} else if(local8.alternativa3d::modifiedAlpha) {
local8.alpha = 1;
local8.alternativa3d::modifiedAlpha = false;
}
if(param5 != "normal") {
local8.blendMode = param5;
local8.alternativa3d::modifiedBlendMode = true;
} else if(local8.alternativa3d::modifiedBlendMode) {
local8.blendMode = "normal";
local8.alternativa3d::modifiedBlendMode = false;
}
if(param6 != null) {
param6.alphaMultiplier = param4;
local8.transform.colorTransform = param6;
local8.alternativa3d::modifiedColorTransform = true;
} else if(local8.alternativa3d::modifiedColorTransform) {
alternativa3d::defaultColorTransform.alphaMultiplier = param4;
local8.transform.colorTransform = alternativa3d::defaultColorTransform;
local8.alternativa3d::modifiedColorTransform = false;
}
if(param7 != null) {
local8.filters = param7;
local8.alternativa3d::modifiedFilters = true;
} else if(local8.alternativa3d::modifiedFilters) {
local8.filters = null;
local8.alternativa3d::modifiedFilters = false;
}
local8.x = this.alternativa3d::_width / 2;
local8.y = this.alternativa3d::_height / 2;
return local8;
}
override alternativa3d function remChildren(param1:int) : void {
var local2:Canvas = null;
while(alternativa3d::_numChildren > param1) {
local2 = super.removeChildAt(0) as Canvas;
if(local2 != null) {
local2.alternativa3d::object = null;
local2.x = 0;
local2.y = 0;
if(local2.alternativa3d::modifiedGraphics) {
local2.alternativa3d::gfx.clear();
}
if(local2.alternativa3d::_numChildren > 0) {
local2.alternativa3d::remChildren(0);
}
var local3:* = alternativa3d::collectorLength++;
alternativa3d::collector[local3] = local2;
}
--alternativa3d::_numChildren;
}
}
}
}
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.net.URLRequest;
import flash.net.navigateToURL;
class Logo extends Sprite {
public static const image:BitmapData = createBMP();
private var border:int = 5;
private var over:Boolean = false;
private var press:Boolean;
public function Logo() {
super();
graphics.beginFill(16711680,0);
graphics.drawRect(0,0,image.width + this.border + this.border,image.height + this.border + this.border);
graphics.drawRect(this.border,this.border,image.width,image.height);
graphics.beginBitmapFill(image,new Matrix(1,0,0,1,this.border,this.border),false,true);
graphics.drawRect(this.border,this.border,image.width,image.height);
tabEnabled = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
addEventListener(MouseEvent.CLICK,this.onClick);
addEventListener(MouseEvent.DOUBLE_CLICK,this.onDoubleClick);
addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseMove);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseOut);
addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
}
private static function createBMP() : BitmapData {
var local1:BitmapData = new BitmapData(103,22,true,0);
local1.setVector(local1.rect,Vector.<uint>([0,0,0,0,0,0,0,0,0,0,0,0,0,0,1040187392,2701131776,2499805184,738197504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,771751936,2533359616,4282199055,4288505883,4287716373,4280949511,2298478592,234881024,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1728053248,4279504646,4287917866,4294285341,4294478345,4294478346,4293626391,4285810708,4278387201,1291845632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,2516582400,4278190080,2516582400
,2516582400,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2197815296,4280753934,4291530288,4294412558,4294411013,4294411784,4294411784,4294411271,4294411790,4289816858,4279635461,1711276032,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,2516582400,4278190080,4294892416,4278190080,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080
,4294892416,4294892416,4294892416,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4294892416,4294892416,4294892416,4278190080,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2332033024,4283252258,4293301553,4294409478,4294409991,4294410761,4294476552,4294476296,4294410249,4294344200,4294343945,4291392799,4280752908,2030043136,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,2516582400,0,0,0,0,2516582400,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,0,4278190080
,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2281701376,4283186471,4293692972,4294276097,4294343176,4294409225,4294475017,4293554194,4293817874,4294408967,4294342921,4294342664,4294341895,4292640548,4281936662,2197815296,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4294892416,4294892416,4294892416,4278190080,4294892416,4278190080,2516582400,4278190080,4294892416,4278190080,4294892416,4294892416,4294892416,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2030043136,4282068512,4293561399,4294208769,4294210313,4294407689,4294210313,4290530057,4281734151,4282851341,4291913754,4294275848,4294275591
,4294275592,4294208517,4293164329,4282133785,2080374784,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1627389952,4280293393,4292577349,4294272769,4294208264,4294471177,4293617417,4286918406,4279502337,1912602624,2030043136,4280422919,4289945382,4294009867,4293875462,4293743369,4293610244,4292440624,4280950288,1761607680,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4294892416,4294892416,4294892416
,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,2516582400,4278190080,4294892416,4278190080,4278190080,4294892416,4294892416,4278190080,4278190080,4294892416,4294892416,4294892416,4278190080,4278190080,4294892416,4278190080,0,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,0,0,0,0,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,788529152,4279044359,4291067728,4294075141,4294075143,4294338057,4293352968,4284490243,4278321408,1291845632,0,0,1476395008,4278781187,4288236848,4293610511,4293609221,4293610249,4293609989,4291261239,4279241478,1291845632,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,2516582400,4278190080
,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,2550136832,4287849288,4294009360,4293941509,4294007817,4293679113,4284620803,2852126720,822083584,0,0,0,0,989855744,2751463424,4288172857,4293610511,4293543429,4293543943,4293611019,4289621050,4278649858,620756992,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,2030043136,4283380775,4294011945,4293873409,4293939977,4293808649,4285867012,4278649344,1090519040,0,0,0,0,0,0,939524096,4278255872,4288764223,4293609227,4293543175
,4293542917,4293677843,4287124784,2516582400,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,805306368,4279569674,4292243009,4293609217,4293676041,4293937929,4288687621,4279305216,1543503872,0,0,0,0,0,0,0,452984832,2214592512,4278781188,4290602054,4293410821,4293477384,4293476868,4293745950,4283773466,2181038080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2566914048,4287714107,4293543949,4293542919,4293673225,4291834377,4280879106,2080374784,0,0,0,0,0,0,0,1962934272,4279898124,4286467380,4278846980,4280686612,4292961598,4293343745,4293411081,4293476100,4292566822,4280357128,1140850688,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,0,0,2516582400,4278190080,2516582400,0,0,1207959552,4281539862,4293417771,4293343234,4293277193,4292947466,4284880134,2483027968,0,0,0,0,0,0,989855744,2751463424,4282917657,4291648314,4293346067,4288303409,2734686208,4284299053,4293479197,4293343493,4293409801,4293410569,4288759582,2902458368,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294967295,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4293141248,4293141248,4293141248,4278190080,2516582400,0,0,0,4278190080,4293141248,4278190080,0,0,2969567232,4289023795,4293211656,4293144328,4293143305,4290389514,4279108353,536870912,0,0,0,335544320,1543503872,2986344448,4281076999,4287967257,4293213977,4293078532,4293078275,4293412634,4284428061,2986344448,4289023285,4293277192,4293343240,4293277191
,4293412372,4282850829,1711276032,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,4278190080,4278190080,4278190080,4278190080,2516582400,0,0,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,4294967295,4278190080,4278190080,2516582400,4278190080,2516582400,0,0,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,0,0,2516582400,4278190080,4278190080,4278190080,4293141248,4278190080,2516582400,4278190080,4278190080,4278190080,4293141248,4278190080,0,956301312,4281604366,4293149982,4293077253,4293078025,4292684810,4282912516,1979711488,1660944384,1778384896,2130706432,3204448256,4279371011,4283635982,4288752661,4292621844,4293078537,4293078022,4293078537,4293210121,4293144583,4290726433,4278518273,4280422668,4292691489,4293210117,4293276937,4293276680,4290592536,4278649601,134217728,0,0,0,0,0,2516582400,4278190080
,4294967295,4278190080,2516582400,0,4278190080,4294967295,4278190080,4294967295,4294967295,4278190080,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,2516582400,4278190080,4294967295,4278190080,4294967295,4294967295,4294967295,4294967295,4278190080,2516582400,0,2516582400,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,0,0,0,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,2516582400,0,0,4278190080,4293141248,4293141248,4278190080,2516582400,4278190080,4293141248,4293141248,4293141248,4293141248,4278190080,0,2717908992,4287903514,4293078538,4293078280,4293143817,4290652684,4281666563,4281797635,4283831561,4284292110,4285670934,4289475868,4291769878,4293079566,4293078281,4293078023,4293078280,4293209609,4293275145,4292357130,4287900432,4280290309,1728053248,2432696320,4286854178,4293145355,4293144584,4293144328,4293212431,4283636492,1610612736,0,0,0,0,2516582400
,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,0,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,0,2516582400,4278190080,4278190080,4293141248,4278190080,4293141248,4278190080,4278190080,4278190080,4278190080,2516582400,520093696,4280027652,4292426772,4293078279,4293079049,4293144329,4292751115,4292555019,4292948491,4293079819,4293146126,4293211917,4293210888,4293145095,4293210632,4293144841,4293210633,4293275913,4292685578,4288618760,4282584324,2969567232,1207959552,0,671088640,4279896839,4292362526,4293078022
,4293078793,4293078536,4290065172,4278780673,167772160,0,0,2516582400,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4294967295,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,2516582400,0,0,4278190080,4293141248,4278190080,4293141248,4278190080,0,4278190080,4293141248,4278190080,1811939328,4284620297,4293211403,4293210888,4293211145,4293276937,4293277193,4293277961,4293344265,4293410056,4293344776,4293344776,4293345033,4293410569,4293475848,4293344265,4292819211,4289276169,4283437573,4278714880,1828716544
,0,0,0,0,2516582400,4287181084,4293078538,4293078025,4293143560,4293211664,4283110665,1409286144,0,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4278190080,4278190080,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4278190080,4293141248,4278190080,4293141248,4278190080,4278190080,4278190080,4293141248,4278190080,3087007744,4289148172,4293345035,4293345034,4293411080,4293476870,4293477893,4293544453,4293611013,4293677063,4293677833,4293677833,4293612298,4293218572,4292102669,4287771145
,4282651909,4278714880,1912602624,218103808,0,0,0,0,0,771751936,4280880904,4292621585,4293143048,4292685067,4290916111,4284160266,1811939328,0,0,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4294967295,4294967295,4278190080,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,0,2516582400,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4293141248,4293141248,4293141248,4278190080,2516582400,4278190080,4293141248,4293141248,4293141248,4278190080,2516582400,1325400064,4280618243,4284819723,4287709972,4289877530,4293028892,4293948702,4293883680,4293818144,4292045341,4289484568,4288433169,4286856717
,4282916870,4279831042,3036676096,1526726656,184549376,0,0,0,0,0,0,0,0,3305111552,4289014285,4288159495,4283372037,4279370753,2164260864,50331648,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,2516582400,2516582400,4278190080,2516582400,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,2516582400,4278190080,2516582400,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,671088640,1828716544,2600468480,3170893824,4026531840,4261412864,4261412864,4261412864,3808428032,3170893824,2969567232,2667577344,1526726656,553648128,0,0,0,0,0,0,0,0,0,0,0,1543503872,3305111552
,3120562176,1811939328,385875968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]));
return local1;
}
private function onMouseDown(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onClick(param1:MouseEvent) : void {
param1.stopPropagation();
try {
navigateToURL(new URLRequest("http://alternativaplatform.com"),"_blank");
}
catch(e:Error) {
}
}
private function onDoubleClick(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onMouseMove(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onMouseOut(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onMouseWheel(param1:MouseEvent) : void {
param1.stopPropagation();
}
}
|
package services.buttonbar {
import flash.events.EventDispatcher;
import forms.events.MainButtonBarEvents;
public class ButtonBarService extends EventDispatcher implements IButtonBarService {
public function ButtonBarService() {
super();
}
public function change(param1:int) : void {
dispatchEvent(new MainButtonBarEvents(param1));
}
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBarSkin_hpLeftBlueCls extends BitmapAsset
{
public function ProgressBarSkin_hpLeftBlueCls()
{
super();
}
}
}
|
package alternativa.types {
public class Float {
public function Float() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher {
import alternativa.tanks.models.weapon.laser.LaserPointer;
import alternativa.tanks.models.weapon.rocketlauncher.sfx.RocketLauncherSfx;
import alternativa.tanks.models.weapon.rocketlauncher.sfx.RocketLauncherSfxData;
import alternativa.tanks.models.weapon.splash.Splash;
import alternativa.tanks.models.weapons.charging.DummyWeaponChargingCommunication;
import alternativa.tanks.models.weapons.charging.WeaponChargingCommunication;
import alternativa.tanks.models.weapons.shell.ShellWeaponObject;
import platform.client.fp10.core.type.IGameObject;
public class RocketLauncherObject extends ShellWeaponObject {
public function RocketLauncherObject(param1:IGameObject) {
super(param1);
}
public function splash() : Splash {
return Splash(object.adapt(Splash));
}
public function laser() : LaserPointer {
return LaserPointer(object.adapt(LaserPointer));
}
public function charging() : WeaponChargingCommunication {
if(remote) {
return DummyWeaponChargingCommunication.INSTANCE;
}
return WeaponChargingCommunication(object.adapt(WeaponChargingCommunication));
}
public function getSfxData() : RocketLauncherSfxData {
return RocketLauncherSfx(object.adapt(RocketLauncherSfx)).getSfxData();
}
}
}
|
package alternativa.tanks.models.sfx
{
public class LightingEffectRecord
{
private var _attenuationBegin:Number;
private var _attenuationEnd:Number;
private var _color:uint;
private var _intensity:Number;
private var _time:int;
public function LightingEffectRecord(_attenuationBegin:Number = 0, _attenuationEnd:Number = 0, _color:uint = 0, _intensity:Number = 0, _time:int = 0)
{
super();
this._attenuationBegin = _attenuationBegin;
this._attenuationEnd = _attenuationEnd;
this._color = _color;
this._intensity = _intensity;
this._time = _time;
}
public function get attenuationBegin() : Number
{
return this._attenuationBegin;
}
public function set attenuationBegin(param1:Number) : void
{
this._attenuationBegin = param1;
}
public function get attenuationEnd() : Number
{
return this._attenuationEnd;
}
public function set attenuationEnd(param1:Number) : void
{
this._attenuationEnd = param1;
}
public function get color() : uint
{
return this._color;
}
public function set color(param1:uint) : void
{
this._color = param1;
}
public function get intensity() : Number
{
return this._intensity;
}
public function set intensity(param1:Number) : void
{
this._intensity = param1;
}
public function get time() : int
{
return this._time;
}
public function set time(param1:int) : void
{
this._time = param1;
}
public function toString() : String
{
var _loc1_:String = "LightingEfectRecord [";
_loc1_ += "attenuationBegin = " + this.attenuationBegin + " ";
_loc1_ += "attenuationEnd = " + this.attenuationEnd + " ";
_loc1_ += "color = " + this.color + " ";
_loc1_ += "intensity = " + this.intensity + " ";
_loc1_ += "time = " + this.time + " ";
return _loc1_ + "]";
}
}
}
|
package projects.tanks.client.clans.panel.loadingclan {
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 ClanLoadingPanelModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ClanLoadingPanelModelServer;
private var client:IClanLoadingPanelModelBase = IClanLoadingPanelModelBase(this);
private var modelId:Long = Long.getLong(1454635600,1588551742);
public function ClanLoadingPanelModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ClanLoadingPanelModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ClanLoadingPanelCC,false)));
}
protected function getInitParam() : ClanLoadingPanelCC {
return ClanLoadingPanelCC(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 forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank25.png")]
public class DefaultRanksBitmaps_bitmapBigRank25 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapBigRank25() {
super();
}
}
}
|
package alternativa.tanks.materials {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.*;
import alternativa.gfx.core.Device;
import alternativa.gfx.core.IndexBufferResource;
import alternativa.gfx.core.ProgramResource;
import alternativa.gfx.core.VertexBufferResource;
import flash.display.BitmapData;
import flash.display3D.Context3DProgramType;
import flash.display3D.Context3DVertexBufferFormat;
import flash.utils.ByteArray;
use namespace alternativa3d;
public class TrackMaterial extends TextureMaterial {
private static var programs:Array = [];
public var uvMatrixProvider:UVMatrixProvider = new UVMatrixProvider();
public function TrackMaterial(param1:BitmapData) {
super(param1,true);
}
public function update() : void {
uvTransformConst = this.uvMatrixProvider.getValues();
}
override alternativa3d function get transparent() : Boolean {
return false;
}
override alternativa3d function drawOpaque(param1:Camera3D, param2:VertexBufferResource, param3:IndexBufferResource, param4:int, param5:int, param6:Object3D) : void {
var local7:BitmapData = texture;
if(local7 == null) {
return;
}
this.update();
var local8:Device = param1.alternativa3d::device;
var local9:Boolean = param1.fogAlpha > 0 && param1.fogStrength > 0;
var local10:Boolean = !param1.view.alternativa3d::constrained && param1.ssao && param1.ssaoStrength > 0 && Boolean(param6.alternativa3d::useDepth);
var local11:Boolean = !param1.view.alternativa3d::constrained && param1.directionalLight != null && param1.directionalLightStrength > 0 && param6.useLight;
var local12:Boolean = !param1.view.alternativa3d::constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && param6.useLight && param6.useShadowMap;
var local13:Boolean = !param1.view.alternativa3d::constrained && param1.deferredLighting && param1.deferredLightingStrength > 0 && Boolean(param6.alternativa3d::useDepth) && param6.useLight;
var local14:Boolean = alphaTestThreshold > 0 && this.alternativa3d::transparent;
local8.setProgram(this.getProgram(!local14,false,false,false,param1.view.alternativa3d::quality,repeat,alternativa3d::_mipMapping > 0,param6.alternativa3d::concatenatedColorTransform != null,false,local9,false,local10,local11,local12,local7 == null,false,local13,false,param1.view.alternativa3d::correction,param6.alternativa3d::concatenatedBlendMode != "normal",local14,false));
local8.setTextureAt(0,alternativa3d::textureResource);
uvCorrection[0] = alternativa3d::textureResource.correctionU;
uvCorrection[1] = alternativa3d::textureResource.correctionV;
if(local10) {
local8.setTextureAt(1,param1.alternativa3d::depthMap);
} else {
local8.setTextureAt(1,null);
}
if(local12) {
local8.setTextureAt(2,param1.shadowMap.alternativa3d::map);
local8.setTextureAt(3,param1.shadowMap.alternativa3d::noise);
} else {
local8.setTextureAt(2,null);
local8.setTextureAt(3,null);
}
local8.setTextureAt(4,null);
local8.setTextureAt(6,null);
if(local13) {
local8.setTextureAt(5,param1.alternativa3d::lightMap);
} else {
local8.setTextureAt(5,null);
}
local8.setVertexBufferAt(0,param2,0,Context3DVertexBufferFormat.FLOAT_3);
local8.setVertexBufferAt(1,param2,3,Context3DVertexBufferFormat.FLOAT_2);
if(local11) {
local8.setVertexBufferAt(2,param2,5,Context3DVertexBufferFormat.FLOAT_3);
} else {
local8.setVertexBufferAt(2,null);
}
local8.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,param6.alternativa3d::transformConst,3,false);
local8.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,uvCorrection,1);
local8.setProgramConstantsFromVector(Context3DProgramType.VERTEX,14,uvTransformConst,2);
if(param6.alternativa3d::concatenatedColorTransform != null) {
local8.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.alternativa3d::colorConst,2,false);
}
if(local14) {
fragmentConst[3] = alphaTestThreshold;
local8.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,14,fragmentConst,1,false);
}
local8.drawTriangles(param3,param4,param5);
++param1.alternativa3d::numDraws;
param1.alternativa3d::numTriangles += param5;
}
override alternativa3d function drawTransparent(param1:Camera3D, param2:VertexBufferResource, param3:IndexBufferResource, param4:int, param5:int, param6:Object3D, param7:Boolean = false) : void {
var local8:BitmapData = texture;
if(local8 == null) {
return;
}
var local9:Device = param1.alternativa3d::device;
var local10:Boolean = param1.fogAlpha > 0 && param1.fogStrength > 0;
var local11:Boolean = !param1.view.alternativa3d::constrained && param1.softTransparency && param1.softTransparencyStrength > 0 && param6.softAttenuation > 0;
var local12:Boolean = !param1.view.alternativa3d::constrained && param1.ssao && param1.ssaoStrength > 0 && Boolean(param6.alternativa3d::useDepth);
var local13:Boolean = !param1.view.alternativa3d::constrained && param1.directionalLight != null && param1.directionalLightStrength > 0 && param6.useLight;
var local14:Boolean = !param1.view.alternativa3d::constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && param6.useLight && param6.useShadowMap;
var local15:Boolean = !param1.view.alternativa3d::constrained && param1.deferredLighting && param1.deferredLightingStrength > 0;
var local16:Boolean = local15 && Boolean(param6.alternativa3d::useDepth) && param6.useLight;
local9.setProgram(this.getProgram(false,false,false,false,param1.view.alternativa3d::quality,repeat,alternativa3d::_mipMapping > 0,param6.alternativa3d::concatenatedColorTransform != null,param6.alternativa3d::concatenatedAlpha < 1,local10,local11,local12,local13,local14,local8 == null,local8 == null && alternativa3d::_textureATFAlpha != null,local16,false,param1.view.alternativa3d::correction,param6.alternativa3d::concatenatedBlendMode != "normal",false,param7));
local9.setTextureAt(0,alternativa3d::textureResource);
uvCorrection[0] = alternativa3d::textureResource.correctionU;
uvCorrection[1] = alternativa3d::textureResource.correctionV;
if(local12 || local11) {
local9.setTextureAt(1,param1.alternativa3d::depthMap);
} else {
local9.setTextureAt(1,null);
}
if(local14) {
local9.setTextureAt(2,param1.shadowMap.alternativa3d::map);
local9.setTextureAt(3,param1.shadowMap.alternativa3d::noise);
} else {
local9.setTextureAt(2,null);
local9.setTextureAt(3,null);
}
local9.setTextureAt(4,null);
local9.setTextureAt(6,null);
if(local16) {
local9.setTextureAt(5,param1.alternativa3d::lightMap);
} else {
local9.setTextureAt(5,null);
}
local9.setVertexBufferAt(0,param2,0,Context3DVertexBufferFormat.FLOAT_1);
local9.setVertexBufferAt(1,null);
local9.setVertexBufferAt(2,null);
local9.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,param6.alternativa3d::transformConst,3,false);
local9.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,uvCorrection,1);
if(local11) {
fragmentConst[2] = param6.softAttenuation;
local9.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,14,fragmentConst,1);
}
if(param6.alternativa3d::concatenatedColorTransform != null) {
local9.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.alternativa3d::colorConst,2,false);
} else if(param6.alternativa3d::concatenatedAlpha < 1) {
local9.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.alternativa3d::colorConst,1);
}
local9.drawTriangles(param3,param4,param5);
++param1.alternativa3d::numDraws;
param1.alternativa3d::numTriangles += param5;
}
override protected function getProgram(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean, param6:Boolean, param7:Boolean, param8:Boolean, param9:Boolean, param10:Boolean, param11:Boolean, param12:Boolean, param13:Boolean, param14:Boolean, param15:Boolean, param16:Boolean, param17:Boolean, param18:Boolean, param19:Boolean, param20:Boolean, param21:Boolean, param22:Boolean) : ProgramResource {
var local25:ByteArray = null;
var local26:ByteArray = null;
var local23:int = int(param1) | int(param2) << 1 | int(param3) << 2 | int(param4) << 3 | int(param5) << 4 | int(param6) << 5 | int(param7) << 6 | int(param8) << 7 | int(param9) << 8 | int(param10) << 9 | int(param11) << 10 | int(param12) << 11 | int(param13) << 12 | int(param14) << 13 | int(param15) << 14 | int(param16) << 15 | int(param17) << 16 | int(param18) << 17 | int(param19) << 18 | int(param20) << 19 | int(param21) << 20 | int(param22) << 21;
var local24:ProgramResource = programs[local23];
if(local24 == null) {
local25 = new TrackMaterialVertexShader(!param22,param14 || param11 || param12 || param17,param13,param4,param14,param10,param2,param3,param3,param19).agalcode;
local26 = new TextureMaterialFragmentShader(param6,param5,param7,param15,param16,param21,!param1 && !param16 && !param15,param8,param9,param3,param13,param11,param12,param17,param18,param14,param10,param2,param20).agalcode;
local24 = new ProgramResource(local25,local26);
programs[local23] = local24;
}
return local24;
}
override public function set mipMapping(param1:int) : void {
alternativa3d::_mipMapping = param1;
alternativa3d::textureResource = TextureResourcesRegistry.getTextureResource(bitmap,alternativa3d::_mipMapping,repeat,alternativa3d::_hardwareMipMaps);
}
}
}
|
package _codec.projects.tanks.client.garage.models.item.item {
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.resource.types.ImageResource;
import projects.tanks.client.garage.models.item.item.ItemModelCC;
public class CodecItemModelCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_maxRank:ICodec;
private var codec_minRank:ICodec;
private var codec_position:ICodec;
private var codec_preview:ICodec;
public function CodecItemModelCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_maxRank = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_minRank = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_position = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_preview = param1.getCodec(new TypeCodecInfo(ImageResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ItemModelCC = new ItemModelCC();
local2.maxRank = this.codec_maxRank.decode(param1) as int;
local2.minRank = this.codec_minRank.decode(param1) as int;
local2.position = this.codec_position.decode(param1) as int;
local2.preview = this.codec_preview.decode(param1) as ImageResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:ItemModelCC = ItemModelCC(param2);
this.codec_maxRank.encode(param1,local3.maxRank);
this.codec_minRank.encode(param1,local3.minRank);
this.codec_position.encode(param1,local3.position);
this.codec_preview.encode(param1,local3.preview);
}
}
}
|
package alternativa.tanks.view {
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.tanks.controller.events.AccountLoginEvent;
import alternativa.tanks.controller.events.AccountLoginPressed;
import alternativa.tanks.controller.events.AuthorizationFailedEvent;
import alternativa.tanks.controller.events.CaptchaAnswerIsIncorrectEvent;
import alternativa.tanks.controller.events.CaptchaUpdatedEvent;
import alternativa.tanks.controller.events.GetNewCaptchaEvent;
import alternativa.tanks.controller.events.LoginButtonPressed;
import alternativa.tanks.controller.events.LoginEvent;
import alternativa.tanks.controller.events.NavigationEvent;
import alternativa.tanks.controller.events.google.GoogleLoginEvent;
import alternativa.tanks.controller.events.socialnetwork.StartExternalEntranceEvent;
import alternativa.tanks.tracker.ITrackerService;
import alternativa.tanks.view.forms.LoginForm;
import org.robotlegs.core.IInjector;
import org.robotlegs.mvcs.Mediator;
import projects.tanks.client.commons.models.captcha.CaptchaLocation;
import projects.tanks.clients.flash.commons.models.captcha.RefreshCaptchaClickedEvent;
public class LoginFormMediator extends Mediator {
[Inject]
public static var clientLog:IClientLog;
private static const GA_CATEGORY:String = "entrance";
[Inject]
public var view:LoginForm;
[Inject]
public var injector:IInjector;
[Inject]
public var trackerService:ITrackerService;
public function LoginFormMediator() {
super();
}
override public function onRegister() : void {
this.injector.injectInto(this.view);
addViewListener(RefreshCaptchaClickedEvent.CLICKED,this.onRefreshCaptchaClicked,RefreshCaptchaClickedEvent);
addViewListener(LoginButtonPressed.EVENT_TYPE,this.onLoginClicked,LoginButtonPressed);
addViewListener(AccountLoginPressed.EVENT_TYPE,this.onAccountLoginClicked,AccountLoginPressed);
addViewListener(NavigationEvent.GO_TO_REGISTRATION_FORM,dispatch,NavigationEvent);
addViewListener(NavigationEvent.GO_TO_RESTORE_PASSWORD_FORM,dispatch,NavigationEvent);
addViewListener(StartExternalEntranceEvent.START_LOGIN,this.dispatchStartExternalLogin,StartExternalEntranceEvent);
addViewListener(GoogleLoginEvent.EVENT_TYPE,dispatch,GoogleLoginEvent);
addContextListener(AuthorizationFailedEvent.HASH_AUTHORIZATION_FAILED,this.onHashAuthorizationFailed,AuthorizationFailedEvent);
addContextListener(AuthorizationFailedEvent.PASSWORD_AUTHORIZATION_FAILED,this.onPasswordAuthorizationFailed,AuthorizationFailedEvent);
addContextListener(CaptchaUpdatedEvent.LOGIN_FORM_CAPTCHA_UPDATED,this.onCaptchaUpdated,CaptchaUpdatedEvent);
addContextListener(CaptchaAnswerIsIncorrectEvent.EVENT_TYPE,this.onCaptchaFailed);
}
private function onCaptchaFailed(param1:CaptchaAnswerIsIncorrectEvent) : void {
this.view.captchaFailed();
}
private function onRefreshCaptchaClicked(param1:RefreshCaptchaClickedEvent) : void {
dispatch(new GetNewCaptchaEvent(CaptchaLocation.LOGIN_FORM));
}
private function onLoginClicked(param1:LoginButtonPressed) : void {
this.trackerService.trackEvent(GA_CATEGORY,"play",this.view.rememberMe ? "remember" : "no_remember");
dispatch(new LoginEvent(LoginEvent.CHECK_CAPTCHA_AND_LOGIN,this.view.callsign,this.view.password,this.view.rememberMe,this.view.captchaAnswer));
}
private function onAccountLoginClicked(param1:AccountLoginPressed) : void {
this.trackerService.trackEvent(GA_CATEGORY,"play",this.view.rememberMe ? "remember" : "no_remember");
dispatch(new AccountLoginEvent(this.view.hash));
}
private function dispatchStartExternalLogin(param1:StartExternalEntranceEvent) : void {
this.trackerService.trackEvent(GA_CATEGORY,"externalLogin",Boolean(param1.socialNetworkId + " " + this.view.rememberMe) ? "remember" : "no_remember");
dispatch(param1);
}
private function dispatchGoogleLogin(param1:GoogleLoginEvent) : void {
this.trackerService.trackEvent(GA_CATEGORY,"externalLogin","google");
dispatch(param1);
}
private function onCaptchaUpdated(param1:CaptchaUpdatedEvent) : void {
clientLog.logError("er","capcha reg");
this.view.showCaptchaSection();
this.view.captchaImage = param1.image;
}
private function onPasswordAuthorizationFailed(param1:AuthorizationFailedEvent) : void {
this.view.alertAboutWrongPassword();
}
private function onHashAuthorizationFailed(param1:AuthorizationFailedEvent) : void {
if(Boolean(this.view.stage)) {
this.view.alertAboutWrongPassword();
}
}
}
}
|
package alternativa.tanks.calculators {
import alternativa.tanks.service.payment.IPaymentPackagesService;
import alternativa.tanks.service.payment.IPaymentService;
public class ExchangeCalculator implements IExchangeCalculator {
[Inject]
public static var paymentPackagesService:IPaymentPackagesService;
[Inject]
public static var paymentService:IPaymentService;
private static const RUB_CURRENCY:String = "RUB";
private var multiplier:Number;
private var addition:Number;
private var currencyRate:Number;
private var _currency:String;
public function ExchangeCalculator(param1:Number, param2:String, param3:Number = 0, param4:Number = 0) {
super();
this.multiplier = param1;
this._currency = param2;
this.addition = param3;
this.currencyRate = param4;
}
public function set currency(param1:String) : void {
this._currency = param1;
}
public function calculateWithoutPackets(param1:int) : Number {
return CalculatorHelper.toMoney((param1 * this.multiplier + this.addition) / this.currencyRate);
}
public function calculateCrystalsWithoutPackets(param1:Number) : int {
return CalculatorHelper.toCrystals((param1 * this.currencyRate - this.addition) / this.multiplier);
}
public function calculate(param1:int) : Number {
var local2:int = paymentPackagesService.numPackages(RUB_CURRENCY);
var local3:Number = this.calculatePackages(param1 * paymentService.getCrystalCost(),paymentPackagesService.getPrice,paymentPackagesService.getPrice,local2);
var local4:int = this.calculatePackages(local3,paymentPackagesService.getPrice,paymentPackagesService.getPackageCrystals,local2);
var local5:int = param1 - local4;
if(local5 < 0) {
local5 = 0;
}
var local6:Number = local5 * this.multiplier + this.applyCommission(local3);
return local6 > 0 ? CalculatorHelper.toMoney(local6 / this.currencyRate) : 0;
}
public function calculateUsingPaymentPackages(param1:int) : Number {
var local2:Number = NaN;
if(paymentPackagesService.hasPackagesInCurrency(this._currency)) {
local2 = paymentPackagesService.getPackagePrice(this._currency,param1);
if(local2 > 0) {
return CalculatorHelper.toMoney(local2 * this.multiplier / paymentService.getCrystalCost() + this.addition);
}
}
return this.calculate(param1);
}
public function calculateInverse(param1:Number) : int {
var local2:int = paymentPackagesService.numPackages(RUB_CURRENCY);
var local3:Number = (param1 * this.currencyRate - this.addition) / this.multiplier * paymentService.getCrystalCost();
var local4:Number = this.calculatePackages(local3,paymentPackagesService.getPrice,paymentPackagesService.getPrice,local2);
var local5:int = this.calculatePackages(local3,paymentPackagesService.getPrice,paymentPackagesService.getPackageCrystals,local2);
var local6:Number = (local3 - local4) / paymentService.getCrystalCost();
return CalculatorHelper.toCrystals(local5 + local6);
}
public function calculateBonus(param1:Number) : int {
var local2:Number = (param1 * this.currencyRate - this.addition) / this.multiplier * paymentService.getCrystalCost();
return this.calculatePackages(local2,paymentPackagesService.getPrice,paymentPackagesService.getBonusCrystals,paymentPackagesService.numPackages(RUB_CURRENCY));
}
public function calculatePremiumDuration(param1:Number) : int {
var local2:Number = (param1 * this.currencyRate - this.addition) / this.multiplier * paymentService.getCrystalCost();
return this.calculatePackages(local2,paymentPackagesService.getPrice,paymentPackagesService.getPremiumDuration,paymentPackagesService.numPackages(RUB_CURRENCY));
}
public function init(param1:Number, param2:Number = 0, param3:Number = 0) : void {
this.multiplier = param1;
this.addition = param2;
this.currencyRate = param3;
}
private function applyCommission(param1:Number) : Number {
return param1 / paymentService.getCrystalCost() * this.multiplier + this.addition;
}
private function calculatePackages(param1:Number, param2:Function, param3:Function, param4:int) : Number {
var local8:int = 0;
var local9:int = 0;
var local5:Number = param1;
var local6:Number = 0;
var local7:int = param4 - 1;
while(local7 >= 0) {
local8 = param2(local7,RUB_CURRENCY);
local9 = int(local5 / local8);
local6 += param3(local7,RUB_CURRENCY) * local9;
local5 -= local8 * local9;
if(local5 == 0) {
break;
}
local7--;
}
return local6;
}
}
}
|
package alternativa.tanks.models.weapon.ricochet {
[ModelInterface]
public interface IRicochetSFXModel {
function getSfxData() : RicochetSFXData;
function getRicochetEffects() : RicochetEffects;
}
}
|
package alternativa.tanks.controller.events.showform {
import flash.display.Bitmap;
import flash.events.Event;
public class ShowPartnersFormEvent extends Event {
public static const REGISTRATION_FORM:String = "ShowPartnersFormEvent.REGISTRATION_FORM";
public static const LOGIN_FORM:String = "ShowPartnersFormEvent.LOGIN_FORM";
private var _loginCaptchaEnabled:Boolean;
private var _allowExternalLogin:Boolean;
private var _backgroundImage:Bitmap;
public function ShowPartnersFormEvent(param1:String, param2:Bitmap, param3:Boolean = true, param4:Boolean = false) {
super(param1);
this._backgroundImage = param2;
this._allowExternalLogin = param3;
this._loginCaptchaEnabled = param4;
}
public function get allowExternalLogin() : Boolean {
return this._allowExternalLogin;
}
public function get backgroundImage() : Bitmap {
return this._backgroundImage;
}
override public function clone() : Event {
return new ShowPartnersFormEvent(this.type,this.backgroundImage,this.allowExternalLogin,this.loginCaptchaEnabled);
}
public function get loginCaptchaEnabled() : Boolean {
return this._loginCaptchaEnabled;
}
}
}
|
package _codec.platform.client.core.general.socialnetwork.types {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import platform.client.core.general.socialnetwork.types.Gender;
public class VectorCodecGenderLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecGenderLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(Gender,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.<Gender> = new Vector.<Gender>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = Gender(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:Gender = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<Gender> = Vector.<Gender>(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.models.weapon.gauss {
import alternativa.math.Vector3;
import platform.client.fp10.core.type.IGameObject;
[ModelInterface]
public interface GaussWeaponCallback {
function doPrimaryShot(param1:int, param2:Vector3) : void;
function doSecondaryShot(param1:IGameObject, param2:Vector3, param3:Vector3) : void;
function doDummyShot() : void;
function doStartAiming() : void;
function doStopAiming() : void;
function doPrimaryHitStatic(param1:int, param2:Vector3) : void;
function doPrimaryHitTarget(param1:int, param2:IGameObject, param3:Vector3, param4:Vector3) : void;
}
}
|
package platform.clients.fp10.libraries.alternativapartners.type {
import platform.client.core.general.socialnetwork.types.LoginParameters;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IParametersListenerEvents implements IParametersListener {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IParametersListenerEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function onSetParameters(param1:LoginParameters) : void {
var i:int = 0;
var m:IParametersListener = null;
var parameters:LoginParameters = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IParametersListener(this.impl[i]);
m.onSetParameters(parameters);
i++;
}
}
finally {
Model.popObject();
}
}
public function onFailSetParameters() : void {
var i:int = 0;
var m:IParametersListener = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IParametersListener(this.impl[i]);
m.onFailSetParameters();
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_deepcoolingIconClass.png")]
public class DeviceIcons_deepcoolingIconClass extends BitmapAsset {
public function DeviceIcons_deepcoolingIconClass() {
super();
}
}
}
|
package controls.scroller.green {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.scroller.green.ScrollSkinGreen_thumbMiddle.png")]
public class ScrollSkinGreen_thumbMiddle extends BitmapAsset {
public function ScrollSkinGreen_thumbMiddle() {
super();
}
}
}
|
package alternativa.tanks.models.battlefield.effects.levelup.rangs
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class BigRangIcon_rang_13 extends BitmapAsset
{
public function BigRangIcon_rang_13()
{
super();
}
}
}
|
package assets.button {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.button.button_blue_DOWN_LEFT.png")]
public dynamic class button_blue_DOWN_LEFT extends BitmapData {
public function button_blue_DOWN_LEFT(param1:int = 7, param2:int = 30) {
super(param1,param2);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.firebird {
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 FlameThrowingSFXModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:FlameThrowingSFXModelServer;
private var client:IFlameThrowingSFXModelBase = IFlameThrowingSFXModelBase(this);
private var modelId:Long = Long.getLong(253811659,1003298843);
public function FlameThrowingSFXModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new FlameThrowingSFXModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(FlameThrowingSFXCC,false)));
}
protected function getInitParam() : FlameThrowingSFXCC {
return FlameThrowingSFXCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.partners.impl.armorgames {
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 ArmorGamesLoginModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ArmorGamesLoginModelServer(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 projects.tanks.client.battlefield.models.battle.battlefield {
import alternativa.types.Long;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.battlefield.types.BattlefieldSounds;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
import projects.tanks.client.battleservice.Range;
public class BattlefieldCC {
private var _active:Boolean;
private var _battleId:Long;
private var _battlefieldSounds:BattlefieldSounds;
private var _colorTransformMultiplier:Number;
private var _idleKickPeriodMsec:int;
private var _map:IGameObject;
private var _mineExplosionLighting:LightingSFXEntity;
private var _proBattle:Boolean;
private var _range:Range;
private var _reArmorEnabled:Boolean;
private var _respawnDuration:int;
private var _shadowMapCorrectionFactor:Number;
private var _showAddressLink:Boolean;
private var _spectator:Boolean;
private var _withoutBonuses:Boolean;
private var _withoutDrones:Boolean;
private var _withoutSupplies:Boolean;
public function BattlefieldCC(param1:Boolean = false, param2:Long = null, param3:BattlefieldSounds = null, param4:Number = 0, param5:int = 0, param6:IGameObject = null, param7:LightingSFXEntity = null, param8:Boolean = false, param9:Range = null, param10:Boolean = false, param11:int = 0, param12:Number = 0, param13:Boolean = false, param14:Boolean = false, param15:Boolean = false, param16:Boolean = false, param17:Boolean = false) {
super();
this._active = param1;
this._battleId = param2;
this._battlefieldSounds = param3;
this._colorTransformMultiplier = param4;
this._idleKickPeriodMsec = param5;
this._map = param6;
this._mineExplosionLighting = param7;
this._proBattle = param8;
this._range = param9;
this._reArmorEnabled = param10;
this._respawnDuration = param11;
this._shadowMapCorrectionFactor = param12;
this._showAddressLink = param13;
this._spectator = param14;
this._withoutBonuses = param15;
this._withoutDrones = param16;
this._withoutSupplies = param17;
}
public function get active() : Boolean {
return this._active;
}
public function set active(param1:Boolean) : void {
this._active = param1;
}
public function get battleId() : Long {
return this._battleId;
}
public function set battleId(param1:Long) : void {
this._battleId = param1;
}
public function get battlefieldSounds() : BattlefieldSounds {
return this._battlefieldSounds;
}
public function set battlefieldSounds(param1:BattlefieldSounds) : void {
this._battlefieldSounds = param1;
}
public function get colorTransformMultiplier() : Number {
return this._colorTransformMultiplier;
}
public function set colorTransformMultiplier(param1:Number) : void {
this._colorTransformMultiplier = param1;
}
public function get idleKickPeriodMsec() : int {
return this._idleKickPeriodMsec;
}
public function set idleKickPeriodMsec(param1:int) : void {
this._idleKickPeriodMsec = param1;
}
public function get map() : IGameObject {
return this._map;
}
public function set map(param1:IGameObject) : void {
this._map = param1;
}
public function get mineExplosionLighting() : LightingSFXEntity {
return this._mineExplosionLighting;
}
public function set mineExplosionLighting(param1:LightingSFXEntity) : void {
this._mineExplosionLighting = param1;
}
public function get proBattle() : Boolean {
return this._proBattle;
}
public function set proBattle(param1:Boolean) : void {
this._proBattle = param1;
}
public function get range() : Range {
return this._range;
}
public function set range(param1:Range) : void {
this._range = param1;
}
public function get reArmorEnabled() : Boolean {
return this._reArmorEnabled;
}
public function set reArmorEnabled(param1:Boolean) : void {
this._reArmorEnabled = param1;
}
public function get respawnDuration() : int {
return this._respawnDuration;
}
public function set respawnDuration(param1:int) : void {
this._respawnDuration = param1;
}
public function get shadowMapCorrectionFactor() : Number {
return this._shadowMapCorrectionFactor;
}
public function set shadowMapCorrectionFactor(param1:Number) : void {
this._shadowMapCorrectionFactor = param1;
}
public function get showAddressLink() : Boolean {
return this._showAddressLink;
}
public function set showAddressLink(param1:Boolean) : void {
this._showAddressLink = param1;
}
public function get spectator() : Boolean {
return this._spectator;
}
public function set spectator(param1:Boolean) : void {
this._spectator = param1;
}
public function get withoutBonuses() : Boolean {
return this._withoutBonuses;
}
public function set withoutBonuses(param1:Boolean) : void {
this._withoutBonuses = param1;
}
public function get withoutDrones() : Boolean {
return this._withoutDrones;
}
public function set withoutDrones(param1:Boolean) : void {
this._withoutDrones = param1;
}
public function get withoutSupplies() : Boolean {
return this._withoutSupplies;
}
public function set withoutSupplies(param1:Boolean) : void {
this._withoutSupplies = param1;
}
public function toString() : String {
var local1:String = "BattlefieldCC [";
local1 += "active = " + this.active + " ";
local1 += "battleId = " + this.battleId + " ";
local1 += "battlefieldSounds = " + this.battlefieldSounds + " ";
local1 += "colorTransformMultiplier = " + this.colorTransformMultiplier + " ";
local1 += "idleKickPeriodMsec = " + this.idleKickPeriodMsec + " ";
local1 += "map = " + this.map + " ";
local1 += "mineExplosionLighting = " + this.mineExplosionLighting + " ";
local1 += "proBattle = " + this.proBattle + " ";
local1 += "range = " + this.range + " ";
local1 += "reArmorEnabled = " + this.reArmorEnabled + " ";
local1 += "respawnDuration = " + this.respawnDuration + " ";
local1 += "shadowMapCorrectionFactor = " + this.shadowMapCorrectionFactor + " ";
local1 += "showAddressLink = " + this.showAddressLink + " ";
local1 += "spectator = " + this.spectator + " ";
local1 += "withoutBonuses = " + this.withoutBonuses + " ";
local1 += "withoutDrones = " + this.withoutDrones + " ";
local1 += "withoutSupplies = " + this.withoutSupplies + " ";
return local1 + "]";
}
}
}
|
package _codec.projects.tanks.client.chat.models.chat.chat {
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.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.chat.models.chat.chat.ChatCC;
import projects.tanks.client.users.services.chatmoderator.ChatModeratorLevel;
public class CodecChatCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_admin:ICodec;
private var codec_antifloodEnabled:ICodec;
private var codec_bufferSize:ICodec;
private var codec_channels:ICodec;
private var codec_chatEnabled:ICodec;
private var codec_chatModeratorLevel:ICodec;
private var codec_linksWhiteList:ICodec;
private var codec_minChar:ICodec;
private var codec_minWord:ICodec;
private var codec_privateMessagesEnabled:ICodec;
private var codec_selfName:ICodec;
private var codec_showLinks:ICodec;
private var codec_typingSpeedAntifloodEnabled:ICodec;
public function CodecChatCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_admin = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_antifloodEnabled = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_bufferSize = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_channels = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(String,false),false,1));
this.codec_chatEnabled = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_chatModeratorLevel = param1.getCodec(new EnumCodecInfo(ChatModeratorLevel,false));
this.codec_linksWhiteList = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(String,false),false,1));
this.codec_minChar = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_minWord = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_privateMessagesEnabled = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_selfName = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_showLinks = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_typingSpeedAntifloodEnabled = param1.getCodec(new TypeCodecInfo(Boolean,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ChatCC = new ChatCC();
local2.admin = this.codec_admin.decode(param1) as Boolean;
local2.antifloodEnabled = this.codec_antifloodEnabled.decode(param1) as Boolean;
local2.bufferSize = this.codec_bufferSize.decode(param1) as int;
local2.channels = this.codec_channels.decode(param1) as Vector.<String>;
local2.chatEnabled = this.codec_chatEnabled.decode(param1) as Boolean;
local2.chatModeratorLevel = this.codec_chatModeratorLevel.decode(param1) as ChatModeratorLevel;
local2.linksWhiteList = this.codec_linksWhiteList.decode(param1) as Vector.<String>;
local2.minChar = this.codec_minChar.decode(param1) as int;
local2.minWord = this.codec_minWord.decode(param1) as int;
local2.privateMessagesEnabled = this.codec_privateMessagesEnabled.decode(param1) as Boolean;
local2.selfName = this.codec_selfName.decode(param1) as String;
local2.showLinks = this.codec_showLinks.decode(param1) as Boolean;
local2.typingSpeedAntifloodEnabled = this.codec_typingSpeedAntifloodEnabled.decode(param1) as Boolean;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:ChatCC = ChatCC(param2);
this.codec_admin.encode(param1,local3.admin);
this.codec_antifloodEnabled.encode(param1,local3.antifloodEnabled);
this.codec_bufferSize.encode(param1,local3.bufferSize);
this.codec_channels.encode(param1,local3.channels);
this.codec_chatEnabled.encode(param1,local3.chatEnabled);
this.codec_chatModeratorLevel.encode(param1,local3.chatModeratorLevel);
this.codec_linksWhiteList.encode(param1,local3.linksWhiteList);
this.codec_minChar.encode(param1,local3.minChar);
this.codec_minWord.encode(param1,local3.minWord);
this.codec_privateMessagesEnabled.encode(param1,local3.privateMessagesEnabled);
this.codec_selfName.encode(param1,local3.selfName);
this.codec_showLinks.encode(param1,local3.showLinks);
this.codec_typingSpeedAntifloodEnabled.encode(param1,local3.typingSpeedAntifloodEnabled);
}
}
}
|
package alternativa.tanks.models.weapon.angles.verticals {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class VerticalAnglesAdapt implements VerticalAngles {
private var object:IGameObject;
private var impl:VerticalAngles;
public function VerticalAnglesAdapt(param1:IGameObject, param2:VerticalAngles) {
super();
this.object = param1;
this.impl = param2;
}
public function getAngleUp() : Number {
var result:Number = NaN;
try {
Model.object = this.object;
result = Number(this.impl.getAngleUp());
}
finally {
Model.popObject();
}
return result;
}
public function getAngleDown() : Number {
var result:Number = NaN;
try {
Model.object = this.object;
result = Number(this.impl.getAngleDown());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.panel.model.shop.goldboxpackage {
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 GoldBoxPackageModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function GoldBoxPackageModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package controls.lifeindicator
{
import controls.resultassets.WhiteFrame;
public class LifeIndicator extends WhiteFrame
{
private var lineCharge:LineCharge;
private var lineLife:LineLife;
private var _charge:Number = 1;
private var _life:Number = 1;
public function LifeIndicator()
{
super();
this.lineCharge = new LineCharge();
this.lineCharge.x = 6;
this.lineCharge.y = 22;
addChild(this.lineCharge);
this.lineLife = new LineLife();
addChild(this.lineLife);
this.lineLife.x = 6;
this.lineLife.y = 6;
}
override public function draw() : void
{
super.draw();
this.charge = this._charge;
this.life = this._life;
}
public function set charge(value:Number) : void
{
if(this._charge == value)
{
return;
}
this._charge = value;
this.lineCharge.setWidth((_width - 12) * this._charge);
}
public function set life(value:Number) : void
{
if(this._life == value)
{
return;
}
this._life = value;
this.lineLife.setWidth((_width - 12) * this._life);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.flag {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlag;
public class VectorCodecClientFlagLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecClientFlagLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ClientFlag,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.<ClientFlag> = new Vector.<ClientFlag>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ClientFlag(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ClientFlag = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ClientFlag> = Vector.<ClientFlag>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package _codec.projects.tanks.client.garage.models.item.discount {
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 alternativa.types.Float;
import projects.tanks.client.garage.models.item.discount.DiscountCC;
public class CodecDiscountCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_discount:ICodec;
private var codec_timeLeftInSeconds:ICodec;
private var codec_timeToStartInSeconds:ICodec;
public function CodecDiscountCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_discount = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_timeLeftInSeconds = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_timeToStartInSeconds = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:DiscountCC = new DiscountCC();
local2.discount = this.codec_discount.decode(param1) as Number;
local2.timeLeftInSeconds = this.codec_timeLeftInSeconds.decode(param1) as int;
local2.timeToStartInSeconds = this.codec_timeToStartInSeconds.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:DiscountCC = DiscountCC(param2);
this.codec_discount.encode(param1,local3.discount);
this.codec_timeLeftInSeconds.encode(param1,local3.timeLeftInSeconds);
this.codec_timeToStartInSeconds.encode(param1,local3.timeToStartInSeconds);
}
}
}
|
package projects.tanks.client.panel.model.shop.paintpackage {
public class PaintPackageCC {
private var _description:String;
private var _name:String;
public function PaintPackageCC(param1:String = null, param2:String = null) {
super();
this._description = param1;
this._name = param2;
}
public function get description() : String {
return this._description;
}
public function set description(param1:String) : void {
this._description = param1;
}
public function get name() : String {
return this._name;
}
public function set name(param1:String) : void {
this._name = param1;
}
public function toString() : String {
var local1:String = "PaintPackageCC [";
local1 += "description = " + this.description + " ";
local1 += "name = " + this.name + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.controllers.mathmacking {
import flash.events.Event;
public class ShowGroupInviteWindowEvent extends Event {
public static const TYPE:String = "ShowGroupInviteWindowEvent";
public function ShowGroupInviteWindowEvent() {
super(TYPE);
}
}
}
|
package alternativa.tanks.model.promo {
import alternativa.tanks.gui.shop.payment.promo.PromoCodeActivateForm;
[ModelInterface]
public interface ShopPromoCode {
function getForm() : PromoCodeActivateForm;
}
}
|
package _codec.projects.tanks.client.panel.model.payment {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.payment.PaymentPackage;
public class VectorCodecPaymentPackageLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecPaymentPackageLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(PaymentPackage,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.<PaymentPackage> = new Vector.<PaymentPackage>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = PaymentPackage(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:PaymentPackage = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<PaymentPackage> = Vector.<PaymentPackage>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.gui.panel.buttons {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.panel.buttons.QuestsButton_startIconClass.png")]
public class QuestsButton_startIconClass extends BitmapAsset {
public function QuestsButton_startIconClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.effects.hornet.radar {
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 BattleUltimateRadarModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function BattleUltimateRadarModelServer(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.panel.model.videoads.containers {
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.videoads.containers.VideoAdsMobileLootBoxCC;
public class CodecVideoAdsMobileLootBoxCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_adsAvailable:ICodec;
public function CodecVideoAdsMobileLootBoxCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_adsAvailable = param1.getCodec(new TypeCodecInfo(Boolean,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:VideoAdsMobileLootBoxCC = new VideoAdsMobileLootBoxCC();
local2.adsAvailable = this.codec_adsAvailable.decode(param1) as Boolean;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:VideoAdsMobileLootBoxCC = VideoAdsMobileLootBoxCC(param2);
this.codec_adsAvailable.encode(param1,local3.adsAvailable);
}
}
}
|
package alternativa.tanks.gui.shop.forms {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.payment.controls.ProceedButton;
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode;
import assets.icons.InputCheckIcon;
import controls.labels.MouseDisabledLabel;
import flash.events.MouseEvent;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.model.payment.PayModeProceed;
public class WaitUrlForm extends PayModeForm {
[Inject]
public static var localeService:ILocaleService;
private static const PROCEED_BUTTON_WIDTH:int = 100;
private static const WIDTH:int = 270;
private static const HEIGHT:int = 60;
private var proceedButton:ProceedButton;
private var waitIcon:InputCheckIcon;
public function WaitUrlForm(param1:IGameObject) {
super(param1);
this.addStatusLabel();
this.addWaitIcon();
this.addProceedButton();
this.render();
}
private function render() : void {
this.waitIcon.x = WIDTH - this.waitIcon.width;
this.proceedButton.x = WIDTH - PROCEED_BUTTON_WIDTH >> 1;
this.proceedButton.y = HEIGHT - this.proceedButton.height;
}
private function addStatusLabel() : void {
var local1:MouseDisabledLabel = new MouseDisabledLabel();
local1.text = localeService.getText(TanksLocale.TEXT_LOADING_PAYMENT_PAGE);
addChild(local1);
}
private function addWaitIcon() : void {
this.waitIcon = new InputCheckIcon();
addChild(this.waitIcon);
}
private function addProceedButton() : void {
this.proceedButton = new ProceedButton();
this.proceedButton.label = localeService.getText(TanksLocale.TEXT_PAYMENT_BUTTON_PROCEED_TEXT);
this.proceedButton.enable = false;
this.proceedButton.addEventListener(MouseEvent.CLICK,this.onProceedClick);
this.proceedButton.width = PROCEED_BUTTON_WIDTH;
addChild(this.proceedButton);
}
private function onProceedClick(param1:MouseEvent) : void {
PayModeProceed(payMode.adapt(PayModeProceed)).proceedPayment();
logProceedAction();
}
override public function activate() : void {
this.proceedButton.enable = false;
this.waitIcon.gotoAndStop(1);
AsyncUrlPayMode(payMode.adapt(AsyncUrlPayMode)).requestAsyncUrl();
}
public function onPaymentUrlReceived() : void {
this.proceedButton.enable = true;
this.waitIcon.gotoAndStop(2);
}
public function onErrorUrlReceived() : void {
this.waitIcon.gotoAndStop(3);
}
override public function destroy() : void {
super.destroy();
this.proceedButton.removeEventListener(MouseEvent.CLICK,this.onProceedClick);
}
override public function get width() : Number {
return WIDTH;
}
override public function get height() : Number {
return HEIGHT;
}
}
}
|
package projects.tanks.client.garage.models.item.container.resources {
import platform.client.fp10.core.resource.types.ImageResource;
public class ContainerResourceCC {
private var _fiveBoxImage:ImageResource;
private var _fiveBoxLightImage:ImageResource;
private var _fiveBoxOpenedImage:ImageResource;
private var _oneBoxImage:ImageResource;
private var _oneBoxLightImage:ImageResource;
private var _oneBoxOpenedImage:ImageResource;
private var _threeBoxImage:ImageResource;
private var _threeBoxLightImage:ImageResource;
private var _threeBoxOpenedImage:ImageResource;
public function ContainerResourceCC(param1:ImageResource = null, param2:ImageResource = null, param3:ImageResource = null, param4:ImageResource = null, param5:ImageResource = null, param6:ImageResource = null, param7:ImageResource = null, param8:ImageResource = null, param9:ImageResource = null) {
super();
this._fiveBoxImage = param1;
this._fiveBoxLightImage = param2;
this._fiveBoxOpenedImage = param3;
this._oneBoxImage = param4;
this._oneBoxLightImage = param5;
this._oneBoxOpenedImage = param6;
this._threeBoxImage = param7;
this._threeBoxLightImage = param8;
this._threeBoxOpenedImage = param9;
}
public function get fiveBoxImage() : ImageResource {
return this._fiveBoxImage;
}
public function set fiveBoxImage(param1:ImageResource) : void {
this._fiveBoxImage = param1;
}
public function get fiveBoxLightImage() : ImageResource {
return this._fiveBoxLightImage;
}
public function set fiveBoxLightImage(param1:ImageResource) : void {
this._fiveBoxLightImage = param1;
}
public function get fiveBoxOpenedImage() : ImageResource {
return this._fiveBoxOpenedImage;
}
public function set fiveBoxOpenedImage(param1:ImageResource) : void {
this._fiveBoxOpenedImage = param1;
}
public function get oneBoxImage() : ImageResource {
return this._oneBoxImage;
}
public function set oneBoxImage(param1:ImageResource) : void {
this._oneBoxImage = param1;
}
public function get oneBoxLightImage() : ImageResource {
return this._oneBoxLightImage;
}
public function set oneBoxLightImage(param1:ImageResource) : void {
this._oneBoxLightImage = param1;
}
public function get oneBoxOpenedImage() : ImageResource {
return this._oneBoxOpenedImage;
}
public function set oneBoxOpenedImage(param1:ImageResource) : void {
this._oneBoxOpenedImage = param1;
}
public function get threeBoxImage() : ImageResource {
return this._threeBoxImage;
}
public function set threeBoxImage(param1:ImageResource) : void {
this._threeBoxImage = param1;
}
public function get threeBoxLightImage() : ImageResource {
return this._threeBoxLightImage;
}
public function set threeBoxLightImage(param1:ImageResource) : void {
this._threeBoxLightImage = param1;
}
public function get threeBoxOpenedImage() : ImageResource {
return this._threeBoxOpenedImage;
}
public function set threeBoxOpenedImage(param1:ImageResource) : void {
this._threeBoxOpenedImage = param1;
}
public function toString() : String {
var local1:String = "ContainerResourceCC [";
local1 += "fiveBoxImage = " + this.fiveBoxImage + " ";
local1 += "fiveBoxLightImage = " + this.fiveBoxLightImage + " ";
local1 += "fiveBoxOpenedImage = " + this.fiveBoxOpenedImage + " ";
local1 += "oneBoxImage = " + this.oneBoxImage + " ";
local1 += "oneBoxLightImage = " + this.oneBoxLightImage + " ";
local1 += "oneBoxOpenedImage = " + this.oneBoxOpenedImage + " ";
local1 += "threeBoxImage = " + this.threeBoxImage + " ";
local1 += "threeBoxLightImage = " + this.threeBoxLightImage + " ";
local1 += "threeBoxOpenedImage = " + this.threeBoxOpenedImage + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.view.forms.commons {
import alternativa.tanks.view.events.AntiAddictionInfoUpdatedEvent;
import controls.TankWindowInner;
import controls.base.LabelBase;
import controls.base.TankInputBase;
import forms.events.LoginFormEvent;
import projects.tanks.clients.flash.commons.services.validate.IValidateService;
public class AntiAddictionSection extends TankWindowInner {
[Inject]
public static var validateService:IValidateService;
public var realName:TankInputBase;
public var idNumber:TankInputBase;
private var _idValid:Boolean;
private var _realNameValid:Boolean;
public function AntiAddictionSection() {
super();
this.width = 350;
var local1:LabelBase = new LabelBase();
local1.text = "按照版署《网络游戏未成年人防沉迷系统》要求 \n" + "\t未满18岁的用户和身份信息不完整的用户将受到防沉迷系统的限制,游戏沉迷时间超过3小时收益减半,超过5小时收益为0 。" + "\n\t已满18岁的用户将等待公安机关的身份验证,验证通过的用户将不受限制,不通过的用户需要重新修改身份信息,否则将纳入防沉迷系统管理。";
local1.x = 15;
local1.y = 15;
local1.wordWrap = true;
local1.width = width - 30;
this.realName = new TankInputBase();
this.realName.label = "您的真实姓名:";
this.realName.x = 112;
this.realName.y = local1.y + local1.height + 15;
this.realName.width = width - this.realName.x - 15;
this._realNameValid = false;
this.idNumber = new TankInputBase();
this.idNumber.label = "身份证号码:";
this.idNumber.x = 112;
this.idNumber.y = this.realName.y + this.realName.height + 10;
this.idNumber.width = width - this.idNumber.x - 15;
this._idValid = false;
this.height = this.idNumber.y + this.idNumber.height + 15;
addChild(local1);
addChild(this.realName);
addChild(this.idNumber);
this.idNumber.addEventListener(LoginFormEvent.TEXT_CHANGED,this.validateAddictionID);
this.realName.addEventListener(LoginFormEvent.TEXT_CHANGED,this.validateRealName);
}
private function validateRealName(param1:LoginFormEvent) : void {
var local2:String = null;
var local3:Boolean = false;
var local4:Boolean = false;
if(this.realName != null) {
local2 = this.trimString(this.realName.value);
local3 = Boolean(validateService.isChinaNameValid(local2));
local4 = local3 || local2.length == 0;
this.realName.validValue = local4;
this._realNameValid = local3;
}
dispatchEvent(new AntiAddictionInfoUpdatedEvent());
}
private function validateAddictionID(param1:LoginFormEvent) : void {
var local2:String = null;
var local3:Boolean = false;
var local4:Boolean = false;
if(this.idNumber != null) {
local2 = this.trimString(this.idNumber.value);
local3 = Boolean(validateService.isChinaCardIdValid(local2));
local4 = local3 || local2.length == 0;
this.idNumber.validValue = local4;
this._idValid = local3;
}
dispatchEvent(new AntiAddictionInfoUpdatedEvent());
}
private function trimString(param1:String) : String {
if(param1.charAt(0) == " ") {
param1 = this.trimString(param1.substring(1));
}
if(param1.charAt(param1.length - 1) == " ") {
param1 = this.trimString(param1.substring(0,param1.length - 1));
}
return param1;
}
public function isIdValid() : Boolean {
return this._idValid;
}
public function isRealNameValid() : Boolean {
return this._realNameValid;
}
}
}
|
package alternativa.tanks.model.payment.modes {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PayModeManualDescriptionAdapt implements PayModeManualDescription {
private var object:IGameObject;
private var impl:PayModeManualDescription;
public function PayModeManualDescriptionAdapt(param1:IGameObject, param2:PayModeManualDescription) {
super();
this.object = param1;
this.impl = param2;
}
public function hasCustomManualDescription() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.hasCustomManualDescription());
}
finally {
Model.popObject();
}
return result;
}
public function getCustomManualDescription() : String {
var result:String = null;
try {
Model.object = this.object;
result = this.impl.getCustomManualDescription();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.sfx.christmas
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChristmasTreeToyEffect_RedTexture extends BitmapAsset
{
public function ChristmasTreeToyEffect_RedTexture()
{
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.twins {
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
public class TwinsShootSFXCC {
private var _explosionTexture:MultiframeTextureResource;
private var _hitMarkTexture:TextureResource;
private var _lightingSFXEntity:LightingSFXEntity;
private var _muzzleFlashTexture:TextureResource;
private var _shotSound:SoundResource;
private var _shotTexture:MultiframeTextureResource;
public function TwinsShootSFXCC(param1:MultiframeTextureResource = null, param2:TextureResource = null, param3:LightingSFXEntity = null, param4:TextureResource = null, param5:SoundResource = null, param6:MultiframeTextureResource = null) {
super();
this._explosionTexture = param1;
this._hitMarkTexture = param2;
this._lightingSFXEntity = param3;
this._muzzleFlashTexture = param4;
this._shotSound = param5;
this._shotTexture = param6;
}
public function get explosionTexture() : MultiframeTextureResource {
return this._explosionTexture;
}
public function set explosionTexture(param1:MultiframeTextureResource) : void {
this._explosionTexture = param1;
}
public function get hitMarkTexture() : TextureResource {
return this._hitMarkTexture;
}
public function set hitMarkTexture(param1:TextureResource) : void {
this._hitMarkTexture = param1;
}
public function get lightingSFXEntity() : LightingSFXEntity {
return this._lightingSFXEntity;
}
public function set lightingSFXEntity(param1:LightingSFXEntity) : void {
this._lightingSFXEntity = param1;
}
public function get muzzleFlashTexture() : TextureResource {
return this._muzzleFlashTexture;
}
public function set muzzleFlashTexture(param1:TextureResource) : void {
this._muzzleFlashTexture = param1;
}
public function get shotSound() : SoundResource {
return this._shotSound;
}
public function set shotSound(param1:SoundResource) : void {
this._shotSound = param1;
}
public function get shotTexture() : MultiframeTextureResource {
return this._shotTexture;
}
public function set shotTexture(param1:MultiframeTextureResource) : void {
this._shotTexture = param1;
}
public function toString() : String {
var local1:String = "TwinsShootSFXCC [";
local1 += "explosionTexture = " + this.explosionTexture + " ";
local1 += "hitMarkTexture = " + this.hitMarkTexture + " ";
local1 += "lightingSFXEntity = " + this.lightingSFXEntity + " ";
local1 += "muzzleFlashTexture = " + this.muzzleFlashTexture + " ";
local1 += "shotSound = " + this.shotSound + " ";
local1 += "shotTexture = " + this.shotTexture + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.garage.models.item.fitting {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
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 ItemFittingModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _fitId:Long = Long.getLong(1031114541,134796764);
private var model:IModel;
public function ItemFittingModelServer(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());
}
public function fit() : 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._fitId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.client.battlefield.models.teamlight {
public interface ITeamLightModelBase {
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class EffectIndicator_iconNitroCls extends BitmapAsset
{
public function EffectIndicator_iconNitroCls()
{
super();
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.