Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. private function handleMultiSectionQuickMove(param1:IMenuView, param2:Transporter):void {
  2. var _loc6_:AccordionView = null;
  3. var _loc7_:int = 0;
  4. var _loc8_:int = 0;
  5. var _loc9_:AccordionMenuComponent = null;
  6. var _loc10_:Array = null;
  7. var _loc11_:Array = null;
  8. var _loc12_:Object = null;
  9. var _loc13_:String = null;
  10. var _loc14_:Config = null;
  11. var _loc15_:Array = null;
  12. var _loc16_:ItemInstanceVO = null;
  13. var _loc17_:int = 0;
  14. var _loc18_:String = null;
  15. var _loc19_:int = 0;
  16. var _loc20_:Equipment = null;
  17. var _loc21_:SlotSetVO = null;
  18. var _loc22_:String = null;
  19. var _loc23_:int = 0;
  20. var _loc24_:Dictionary = null;
  21. var _loc25_:InventoryItemComponent = null;
  22. var _loc26_:int = 0;
  23. var _loc27_:Array = null;
  24. var _loc28_:int = 0;
  25. param2 = new Transporter();
  26. var _loc3_:Array = [];
  27. var _loc4_:Array = [];
  28. if (param1 is AccordionView) {
  29. _loc6_ = param1 as AccordionView;
  30. _loc7_ = _loc6_.numChildren;
  31. _loc8_ = 0;
  32. while (_loc8_ < _loc7_) {
  33. _loc9_ = _loc6_.getChildAt(_loc8_) as AccordionMenuComponent;
  34. if (_loc9_) {
  35. _loc10_ = _loc9_.menuList;
  36. _loc4_ = _loc4_.concat(_loc10_);
  37. }
  38. _loc8_++;
  39. }
  40. }
  41. var _loc5_:String = this._currentDraggedIcon.menuSectionComponent.getContainingViewID();
  42. switch (_loc5_) {
  43. case Settings.INVENTORY_NAME:
  44. _loc11_ = null;
  45. if (this.multiSelection != null) {
  46. if (this.currentIconIsPartOfSelection()) {
  47. if (this.multiSelection.length == 0) {
  48. _loc11_ = [this._currentDraggedIcon];
  49. } else {
  50. _loc11_ = this.multiSelection;
  51. }
  52. } else {
  53. _loc11_ = [this._currentDraggedIcon];
  54. }
  55. } else {
  56. _loc11_ = [this._currentDraggedIcon];
  57. }
  58. _loc12_ = {};
  59. _loc13_ = this.currentDraggedIconProxy.group;
  60. _loc14_ = ConfigManager.getInstance().configs[Settings.activeConfig];
  61. _loc15_ = this.sortItems(_loc14_.equipments, _loc10_, "drone");
  62. _loc16_ = this.currentDraggedIconProxy.getItemInstanceData();
  63. _loc17_ = _loc15_.length;
  64. _loc19_ = 0;
  65. while (_loc19_ < _loc17_) {
  66. _loc20_ = _loc15_[_loc19_];
  67. _loc22_ = _loc20_.name.substr(6, _loc20_.name.length - 1);
  68. if (_loc13_ == DataInterchange.DRONE_DESIGN_STATS_TYPE_CLASS) {
  69. _loc21_ = _loc20_.slotSets[DataInterchange.DESIGN_STATS];
  70. } else if (_loc13_ == DataInterchange.DRONE_DESIGN_VISUAL_TYPE_CLASS) {
  71. _loc21_ = _loc20_.slotSets[DataInterchange.DESIGN_VISUAL];
  72. } else {
  73. _loc21_ = _loc20_.slotSets[DataInterchange.DEFAULT];
  74. }
  75. _loc23_ = _loc21_.maxSlotCount - _loc21_.items.length;
  76. _loc24_ = new Dictionary();
  77. _loc26_ = _loc11_.length - 1;
  78. if (_loc23_ > 0) {
  79. _loc27_ = [];
  80. _loc28_ = 0;
  81. while (_loc28_ < _loc23_ && _loc26_ >= 0) {
  82. if (_loc11_ != null) {
  83. _loc25_ = _loc11_[_loc26_];
  84. if (_loc24_[_loc25_.itemName]) {
  85. _loc26_--;
  86. continue;
  87. }
  88. if (_loc25_.group.substr(0, 6) == "Extra_") {
  89. _loc24_[_loc25_.itemName] = true;
  90. }
  91. _loc27_.push(_loc25_.itemID);
  92. _loc11_.removeAt(_loc11_.indexOf(_loc25_));
  93. _loc26_--;
  94. }
  95. _loc28_++;
  96. }
  97. _loc12_[_loc22_] = _loc27_;
  98. }
  99. _loc19_++;
  100. }
  101. param2.action = ActionIdentifiers.DRONE_EQUIP;
  102. param2.from["configId"] = Settings.activeConfig;
  103. param2.from["target"] = this._currentDraggedIcon.menuSectionComponent.getContainingViewID().toLowerCase();
  104. param2.from["droneItems"] = _loc12_;
  105. param2.to["configId"] = Settings.activeConfig;
  106. param2.to["target"] = param1.getCurrentlyOpenMenu().toLowerCase();
  107. if (this.currentDraggedIconProxy.group == DataInterchange.DRONE_DESIGN_STATS_TYPE_CLASS) {
  108. _loc18_ = DataInterchange.DESIGN_STATS;
  109. } else if (this.currentDraggedIconProxy.group == DataInterchange.DRONE_DESIGN_VISUAL_TYPE_CLASS) {
  110. _loc18_ = DataInterchange.DESIGN_VISUAL;
  111. } else {
  112. _loc18_ = DataInterchange.DEFAULT;
  113. }
  114. param2.to["slotset"] = _loc18_;
  115. dispatchEvent(new MoveItemEvent(MoveItemEvent.ITEMS_MOVED_TO_N_DRONE_EQUIPMENT, param2));
  116. break;
  117. case ActionIdentifiers.DRONES:
  118. this.handleOnlyOneSectionQuickMove(param1, [], [], param2);
  119. }
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement