Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function handleMultiSectionQuickMove(param1:IMenuView, param2:Transporter):void {
- var _loc6_:AccordionView = null;
- var _loc7_:int = 0;
- var _loc8_:int = 0;
- var _loc9_:AccordionMenuComponent = null;
- var _loc10_:Array = null;
- var _loc11_:Array = null;
- var _loc12_:Object = null;
- var _loc13_:String = null;
- var _loc14_:Config = null;
- var _loc15_:Array = null;
- var _loc16_:ItemInstanceVO = null;
- var _loc17_:int = 0;
- var _loc18_:String = null;
- var _loc19_:int = 0;
- var _loc20_:Equipment = null;
- var _loc21_:SlotSetVO = null;
- var _loc22_:String = null;
- var _loc23_:int = 0;
- var _loc24_:Dictionary = null;
- var _loc25_:InventoryItemComponent = null;
- var _loc26_:int = 0;
- var _loc27_:Array = null;
- var _loc28_:int = 0;
- param2 = new Transporter();
- var _loc3_:Array = [];
- var _loc4_:Array = [];
- if (param1 is AccordionView) {
- _loc6_ = param1 as AccordionView;
- _loc7_ = _loc6_.numChildren;
- _loc8_ = 0;
- while (_loc8_ < _loc7_) {
- _loc9_ = _loc6_.getChildAt(_loc8_) as AccordionMenuComponent;
- if (_loc9_) {
- _loc10_ = _loc9_.menuList;
- _loc4_ = _loc4_.concat(_loc10_);
- }
- _loc8_++;
- }
- }
- var _loc5_:String = this._currentDraggedIcon.menuSectionComponent.getContainingViewID();
- switch (_loc5_) {
- case Settings.INVENTORY_NAME:
- _loc11_ = null;
- if (this.multiSelection != null) {
- if (this.currentIconIsPartOfSelection()) {
- if (this.multiSelection.length == 0) {
- _loc11_ = [this._currentDraggedIcon];
- } else {
- _loc11_ = this.multiSelection;
- }
- } else {
- _loc11_ = [this._currentDraggedIcon];
- }
- } else {
- _loc11_ = [this._currentDraggedIcon];
- }
- _loc12_ = {};
- _loc13_ = this.currentDraggedIconProxy.group;
- _loc14_ = ConfigManager.getInstance().configs[Settings.activeConfig];
- _loc15_ = this.sortItems(_loc14_.equipments, _loc10_, "drone");
- _loc16_ = this.currentDraggedIconProxy.getItemInstanceData();
- _loc17_ = _loc15_.length;
- _loc19_ = 0;
- while (_loc19_ < _loc17_) {
- _loc20_ = _loc15_[_loc19_];
- _loc22_ = _loc20_.name.substr(6, _loc20_.name.length - 1);
- if (_loc13_ == DataInterchange.DRONE_DESIGN_STATS_TYPE_CLASS) {
- _loc21_ = _loc20_.slotSets[DataInterchange.DESIGN_STATS];
- } else if (_loc13_ == DataInterchange.DRONE_DESIGN_VISUAL_TYPE_CLASS) {
- _loc21_ = _loc20_.slotSets[DataInterchange.DESIGN_VISUAL];
- } else {
- _loc21_ = _loc20_.slotSets[DataInterchange.DEFAULT];
- }
- _loc23_ = _loc21_.maxSlotCount - _loc21_.items.length;
- _loc24_ = new Dictionary();
- _loc26_ = _loc11_.length - 1;
- if (_loc23_ > 0) {
- _loc27_ = [];
- _loc28_ = 0;
- while (_loc28_ < _loc23_ && _loc26_ >= 0) {
- if (_loc11_ != null) {
- _loc25_ = _loc11_[_loc26_];
- if (_loc24_[_loc25_.itemName]) {
- _loc26_--;
- continue;
- }
- if (_loc25_.group.substr(0, 6) == "Extra_") {
- _loc24_[_loc25_.itemName] = true;
- }
- _loc27_.push(_loc25_.itemID);
- _loc11_.removeAt(_loc11_.indexOf(_loc25_));
- _loc26_--;
- }
- _loc28_++;
- }
- _loc12_[_loc22_] = _loc27_;
- }
- _loc19_++;
- }
- param2.action = ActionIdentifiers.DRONE_EQUIP;
- param2.from["configId"] = Settings.activeConfig;
- param2.from["target"] = this._currentDraggedIcon.menuSectionComponent.getContainingViewID().toLowerCase();
- param2.from["droneItems"] = _loc12_;
- param2.to["configId"] = Settings.activeConfig;
- param2.to["target"] = param1.getCurrentlyOpenMenu().toLowerCase();
- if (this.currentDraggedIconProxy.group == DataInterchange.DRONE_DESIGN_STATS_TYPE_CLASS) {
- _loc18_ = DataInterchange.DESIGN_STATS;
- } else if (this.currentDraggedIconProxy.group == DataInterchange.DRONE_DESIGN_VISUAL_TYPE_CLASS) {
- _loc18_ = DataInterchange.DESIGN_VISUAL;
- } else {
- _loc18_ = DataInterchange.DEFAULT;
- }
- param2.to["slotset"] = _loc18_;
- dispatchEvent(new MoveItemEvent(MoveItemEvent.ITEMS_MOVED_TO_N_DRONE_EQUIPMENT, param2));
- break;
- case ActionIdentifiers.DRONES:
- this.handleOnlyOneSectionQuickMove(param1, [], [], param2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement