warscript 0.0.1-dev.f967846 → 0.0.1-dev.f9efacb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/engine/internal/unit.lua +14 -18
- package/package.json +1 -1
package/engine/internal/unit.lua
CHANGED
|
@@ -2552,24 +2552,20 @@ __TS__ObjectDefineProperty(
|
|
|
2552
2552
|
"itemMovedEvent",
|
|
2553
2553
|
{get = function(self)
|
|
2554
2554
|
local event = __TS__New(Event)
|
|
2555
|
-
do
|
|
2556
|
-
local
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
end
|
|
2570
|
-
end)
|
|
2571
|
-
order = order + 1
|
|
2572
|
-
end
|
|
2555
|
+
for order = orderId("moveslot0"), orderId("moveslot5") do
|
|
2556
|
+
local slotTo = order - orderId("moveslot0")
|
|
2557
|
+
self.onTargetOrder[order]:addListener(function(unit, item)
|
|
2558
|
+
local slotFrom = unit.items:findSlot(item)
|
|
2559
|
+
if slotFrom ~= nil then
|
|
2560
|
+
invoke(
|
|
2561
|
+
event,
|
|
2562
|
+
unit,
|
|
2563
|
+
item,
|
|
2564
|
+
slotFrom,
|
|
2565
|
+
slotTo
|
|
2566
|
+
)
|
|
2567
|
+
end
|
|
2568
|
+
end)
|
|
2573
2569
|
end
|
|
2574
2570
|
rawset(self, "itemMovedEvent", event)
|
|
2575
2571
|
return event
|
package/package.json
CHANGED