warscript 0.0.1-dev.78d01a4 → 0.0.1-dev.7909297
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/attributes.d.ts +5 -0
- package/attributes.lua +8 -1
- package/config.d.ts +5 -0
- package/config.lua +10 -0
- package/core/types/effect.d.ts +1 -3
- package/core/types/effect.lua +65 -39
- package/core/types/order.d.ts +1 -0
- package/core/types/order.lua +11 -1
- package/core/types/sound.d.ts +17 -24
- package/core/types/sound.lua +99 -24
- package/core/types/timer.d.ts +6 -7
- package/core/types/timer.lua +18 -21
- package/core/util.lua +6 -1
- package/decl/native.d.ts +840 -786
- package/engine/behaviour/ability/apply-buff.d.ts +5 -0
- package/engine/behaviour/ability/apply-buff.lua +32 -0
- package/engine/behaviour/ability/apply-unit-behavior.lua +1 -0
- package/engine/behaviour/ability/damage.d.ts +9 -3
- package/engine/behaviour/ability/damage.lua +26 -38
- package/engine/behaviour/ability/emulate-impact.lua +12 -7
- package/engine/behaviour/ability/on-command-impact.lua +7 -0
- package/engine/behaviour/ability.d.ts +12 -3
- package/engine/behaviour/ability.lua +66 -7
- package/engine/behaviour/unit.d.ts +12 -0
- package/engine/behaviour/unit.lua +85 -0
- package/engine/buff.d.ts +56 -41
- package/engine/buff.lua +295 -228
- package/engine/internal/ability.d.ts +13 -1
- package/engine/internal/ability.lua +74 -2
- package/engine/internal/item/ability.lua +112 -4
- package/engine/internal/item.d.ts +5 -4
- package/engine/internal/item.lua +107 -28
- package/engine/internal/mechanics/ability-duration.lua +1 -1
- package/engine/internal/misc/damage-metadata-by-target.d.ts +2 -0
- package/engine/internal/misc/damage-metadata-by-target.lua +5 -0
- package/engine/internal/object-data/auto-attack-speed-increase.d.ts +1 -1
- package/engine/internal/object-data/auto-attack-speed-increase.lua +2 -0
- package/engine/internal/object-data/evasion-probability.d.ts +2 -0
- package/engine/internal/object-data/evasion-probability.lua +16 -0
- package/engine/internal/unit/add-item-to-slot-init.d.ts +2 -0
- package/engine/internal/unit/add-item-to-slot-init.lua +23 -0
- package/engine/internal/unit/add-item-to-slot.d.ts +2 -0
- package/engine/internal/unit/add-item-to-slot.lua +52 -0
- package/engine/internal/unit/allowed-targets.d.ts +1 -1
- package/engine/internal/unit/allowed-targets.lua +9 -1
- package/engine/internal/unit/bonus.d.ts +2 -0
- package/engine/internal/unit/bonus.lua +17 -0
- package/engine/internal/unit/ignore-events-items.d.ts +2 -0
- package/engine/internal/unit/ignore-events-items.lua +5 -0
- package/engine/internal/unit/item.lua +6 -12
- package/engine/internal/unit+damage.d.ts +2 -11
- package/engine/internal/unit+damage.lua +10 -14
- package/engine/internal/unit+spellSteal.lua +1 -2
- package/engine/internal/unit-missile-launch.lua +1 -1
- package/engine/internal/unit.d.ts +26 -4
- package/engine/internal/unit.lua +194 -48
- package/engine/internal/utility.lua +12 -0
- package/engine/lightning.d.ts +12 -5
- package/engine/lightning.lua +48 -14
- package/engine/object-data/auxiliary/animation-name.d.ts +1 -0
- package/engine/object-data/auxiliary/animation-name.lua +16 -0
- package/engine/object-data/auxiliary/attachment-preset.d.ts +7 -2
- package/engine/object-data/auxiliary/attachment-preset.lua +4 -3
- package/engine/object-data/auxiliary/attack-type.d.ts +7 -8
- package/engine/object-data/auxiliary/attack-type.lua +42 -0
- package/engine/object-data/auxiliary/movement-type.d.ts +7 -7
- package/engine/object-data/auxiliary/movement-type.lua +22 -0
- package/engine/object-data/auxiliary/sound-eax.d.ts +10 -0
- package/engine/object-data/auxiliary/sound-eax.lua +2 -0
- package/engine/object-data/auxiliary/tech-tree-dependency.d.ts +1 -1
- package/engine/object-data/auxiliary/unit-attribute.d.ts +6 -0
- package/engine/object-data/auxiliary/unit-attribute.lua +9 -0
- package/engine/object-data/entry/ability-type/berserk.d.ts +2 -0
- package/engine/object-data/entry/ability-type/berserk.lua +13 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +12 -1
- package/engine/object-data/entry/ability-type/carrion-swarm.d.ts +14 -0
- package/engine/object-data/entry/ability-type/carrion-swarm.lua +65 -0
- package/engine/object-data/entry/ability-type/disease-cloud.lua +2 -2
- package/engine/object-data/entry/ability-type/engineering-upgrade.lua +2 -2
- package/engine/object-data/entry/ability-type/ensnare.d.ts +12 -0
- package/engine/object-data/entry/ability-type/ensnare.lua +52 -0
- package/engine/object-data/entry/ability-type/feral-spirit.lua +2 -2
- package/engine/object-data/entry/ability-type/permanent-invisibility.d.ts +8 -0
- package/engine/object-data/entry/ability-type/permanent-invisibility.lua +26 -0
- package/engine/object-data/entry/ability-type/phase-shift.d.ts +10 -0
- package/engine/object-data/entry/ability-type/phase-shift.lua +39 -0
- package/engine/object-data/entry/ability-type/phoenix-morph.lua +4 -4
- package/engine/object-data/entry/ability-type/raise-dead.d.ts +17 -0
- package/engine/object-data/entry/ability-type/raise-dead.lua +78 -0
- package/engine/object-data/entry/ability-type/shock-wave.d.ts +4 -0
- package/engine/object-data/entry/ability-type/shock-wave.lua +26 -0
- package/engine/object-data/entry/ability-type/slow-poison.d.ts +10 -0
- package/engine/object-data/entry/ability-type/slow-poison.lua +58 -0
- package/engine/object-data/entry/ability-type/summon-quilbeast.lua +2 -2
- package/engine/object-data/entry/ability-type/summon-water-elemental.lua +2 -2
- package/engine/object-data/entry/ability-type/web.d.ts +12 -0
- package/engine/object-data/entry/ability-type/web.lua +52 -0
- package/engine/object-data/entry/ability-type.d.ts +19 -17
- package/engine/object-data/entry/ability-type.lua +89 -33
- package/engine/object-data/entry/buff-type/applicable.lua +18 -37
- package/engine/object-data/entry/buff-type.d.ts +6 -12
- package/engine/object-data/entry/buff-type.lua +13 -29
- package/engine/object-data/entry/destructible-type.d.ts +1 -1
- package/engine/object-data/entry/item-type.d.ts +3 -1
- package/engine/object-data/entry/item-type.lua +15 -2
- package/engine/object-data/entry/lightning-type.d.ts +1 -1
- package/engine/object-data/entry/sound-preset.d.ts +33 -0
- package/engine/object-data/entry/sound-preset.lua +140 -0
- package/engine/object-data/entry/unit-type.d.ts +10 -3
- package/engine/object-data/entry/unit-type.lua +155 -92
- package/engine/object-data/entry/upgrade.d.ts +1 -1
- package/engine/object-data/entry/upgrade.lua +4 -4
- package/engine/object-data/entry.d.ts +16 -14
- package/engine/object-data/entry.lua +60 -32
- package/engine/object-data/utility/object-data-entry-id-generator.lua +7 -0
- package/engine/object-field/ability.d.ts +6 -3
- package/engine/object-field/ability.lua +3 -0
- package/engine/object-field/unit.d.ts +46 -3
- package/engine/object-field/unit.lua +173 -7
- package/engine/object-field.d.ts +11 -3
- package/engine/object-field.lua +162 -76
- package/engine/standard/entries/buff-type.d.ts +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- package/engine/standard/entries/sound-preset.d.ts +10 -0
- package/engine/standard/entries/sound-preset.lua +10 -0
- package/engine/unit.d.ts +1 -0
- package/engine/unit.lua +1 -0
- package/objutil/buff.lua +1 -2
- package/objutil/unit.lua +8 -0
- package/package.json +2 -2
- package/utility/arrays.d.ts +1 -0
- package/utility/arrays.lua +3 -0
- package/utility/functions.d.ts +1 -0
- package/utility/functions.lua +1 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +3 -0
- package/utility/lua-maps.d.ts +3 -0
- package/utility/lua-maps.lua +16 -0
- package/utility/lua-sets.d.ts +1 -0
- package/utility/lua-sets.lua +3 -0
- package/utility/reflection.lua +11 -7
|
@@ -35,6 +35,9 @@ export declare abstract class Ability extends Handle<jability> {
|
|
|
35
35
|
setField(field: jabilitystringlevelfield, level: number, value: string): boolean;
|
|
36
36
|
get levelCount(): number;
|
|
37
37
|
abstract get level(): number;
|
|
38
|
+
abstract get cooldownRemaining(): number;
|
|
39
|
+
abstract set cooldownRemaining(cooldownRemaining: number);
|
|
40
|
+
abstract interruptCast(): void;
|
|
38
41
|
static get onCreate(): Event<[Ability]>;
|
|
39
42
|
static get destroyEvent(): Event<[Ability]>;
|
|
40
43
|
}
|
|
@@ -45,6 +48,9 @@ export declare class UnrecognizedAbility extends Ability {
|
|
|
45
48
|
readonly owner: Unit;
|
|
46
49
|
constructor(typeId: number, owner: Unit);
|
|
47
50
|
get level(): number;
|
|
51
|
+
get cooldownRemaining(): number;
|
|
52
|
+
set cooldownRemaining(_: number);
|
|
53
|
+
interruptCast(): void;
|
|
48
54
|
}
|
|
49
55
|
export declare class UnitAbility extends Ability {
|
|
50
56
|
readonly owner: Unit;
|
|
@@ -52,10 +58,13 @@ export declare class UnitAbility extends Ability {
|
|
|
52
58
|
constructor(handle: jability, typeId: number, owner: Unit);
|
|
53
59
|
incrementHideCounter(): void;
|
|
54
60
|
decrementHideCounter(): void;
|
|
61
|
+
incrementDisableCounter(): void;
|
|
62
|
+
decrementDisableCounter(): void;
|
|
55
63
|
get level(): number;
|
|
56
64
|
set level(v: number);
|
|
57
65
|
get cooldownRemaining(): number;
|
|
58
|
-
set cooldownRemaining(
|
|
66
|
+
set cooldownRemaining(cooldownRemaining: number);
|
|
67
|
+
interruptCast(): void;
|
|
59
68
|
static get onCreate(): Event<[UnitAbility]>;
|
|
60
69
|
static get onDestroy(): Event<[UnitAbility]>;
|
|
61
70
|
}
|
|
@@ -79,6 +88,9 @@ export declare class ItemAbility extends Ability {
|
|
|
79
88
|
setField(field: jabilitybooleanlevelfield, level: number, value: boolean): boolean;
|
|
80
89
|
setField(field: jabilitystringlevelfield, level: number, value: string): boolean;
|
|
81
90
|
get level(): number;
|
|
91
|
+
get cooldownRemaining(): number;
|
|
92
|
+
set cooldownRemaining(cooldownRemaining: number);
|
|
93
|
+
interruptCast(): void;
|
|
82
94
|
static get onCreate(): Event<[ItemAbility]>;
|
|
83
95
|
static get onDestroy(): Event<[ItemAbility]>;
|
|
84
96
|
}
|
|
@@ -10,7 +10,10 @@ local ____exports = {}
|
|
|
10
10
|
local ____handle = require("core.types.handle")
|
|
11
11
|
local Handle = ____handle.Handle
|
|
12
12
|
local ____ability = require("engine.internal.item.ability")
|
|
13
|
+
local abilityActionDummy = ____ability.abilityActionDummy
|
|
13
14
|
local doAbilityAction = ____ability.doAbilityAction
|
|
15
|
+
local doAbilityActionForceDummy = ____ability.doAbilityActionForceDummy
|
|
16
|
+
local startItemCooldown = ____ability.startItemCooldown
|
|
14
17
|
local getUnitAbilityLevel = GetUnitAbilityLevel
|
|
15
18
|
local setUnitAbilityLevel = SetUnitAbilityLevel
|
|
16
19
|
local setAbilityIntegerField = BlzSetAbilityIntegerField
|
|
@@ -32,7 +35,10 @@ local getAbilityStringLevelField = BlzGetAbilityStringLevelField
|
|
|
32
35
|
local getUnitAbilityCooldownRemaining = BlzGetUnitAbilityCooldownRemaining
|
|
33
36
|
local startUnitAbilityCooldown = BlzStartUnitAbilityCooldown
|
|
34
37
|
local getHandleId = GetHandleId
|
|
38
|
+
local getItemBooleanField = BlzGetItemBooleanField
|
|
39
|
+
local setItemBooleanField = BlzSetItemBooleanField
|
|
35
40
|
local unitHideAbility = BlzUnitHideAbility
|
|
41
|
+
local unitDisableAbility = BlzUnitDisableAbility
|
|
36
42
|
local match = string.match
|
|
37
43
|
local ____type = _G.type
|
|
38
44
|
local ____tostring = _G.tostring
|
|
@@ -326,6 +332,17 @@ __TS__SetDescriptor(
|
|
|
326
332
|
end},
|
|
327
333
|
true
|
|
328
334
|
)
|
|
335
|
+
__TS__SetDescriptor(
|
|
336
|
+
Ability.prototype,
|
|
337
|
+
"cooldownRemaining",
|
|
338
|
+
{
|
|
339
|
+
get = function(self)
|
|
340
|
+
end,
|
|
341
|
+
set = function(self, cooldownRemaining)
|
|
342
|
+
end
|
|
343
|
+
},
|
|
344
|
+
true
|
|
345
|
+
)
|
|
329
346
|
__TS__ObjectDefineProperty(
|
|
330
347
|
Ability,
|
|
331
348
|
"onCreate",
|
|
@@ -349,6 +366,8 @@ function UnrecognizedAbility.prototype.____constructor(self, typeId, owner)
|
|
|
349
366
|
UnrecognizedAbility.____super.prototype.____constructor(self, nil, typeId)
|
|
350
367
|
self.owner = owner
|
|
351
368
|
end
|
|
369
|
+
function UnrecognizedAbility.prototype.interruptCast(self)
|
|
370
|
+
end
|
|
352
371
|
__TS__SetDescriptor(
|
|
353
372
|
UnrecognizedAbility.prototype,
|
|
354
373
|
"level",
|
|
@@ -357,6 +376,18 @@ __TS__SetDescriptor(
|
|
|
357
376
|
end},
|
|
358
377
|
true
|
|
359
378
|
)
|
|
379
|
+
__TS__SetDescriptor(
|
|
380
|
+
UnrecognizedAbility.prototype,
|
|
381
|
+
"cooldownRemaining",
|
|
382
|
+
{
|
|
383
|
+
get = function(self)
|
|
384
|
+
return 0
|
|
385
|
+
end,
|
|
386
|
+
set = function(self, _)
|
|
387
|
+
end
|
|
388
|
+
},
|
|
389
|
+
true
|
|
390
|
+
)
|
|
360
391
|
____exports.UnitAbility = __TS__Class()
|
|
361
392
|
local UnitAbility = ____exports.UnitAbility
|
|
362
393
|
UnitAbility.name = "UnitAbility"
|
|
@@ -372,6 +403,15 @@ end
|
|
|
372
403
|
function UnitAbility.prototype.decrementHideCounter(self)
|
|
373
404
|
unitHideAbility(self.u, self.typeId, false)
|
|
374
405
|
end
|
|
406
|
+
function UnitAbility.prototype.incrementDisableCounter(self)
|
|
407
|
+
unitDisableAbility(self.u, self.typeId, true, false)
|
|
408
|
+
end
|
|
409
|
+
function UnitAbility.prototype.decrementDisableCounter(self)
|
|
410
|
+
unitDisableAbility(self.u, self.typeId, false, false)
|
|
411
|
+
end
|
|
412
|
+
function UnitAbility.prototype.interruptCast(self)
|
|
413
|
+
self.owner:interruptCast(self.typeId)
|
|
414
|
+
end
|
|
375
415
|
__TS__SetDescriptor(
|
|
376
416
|
UnitAbility.prototype,
|
|
377
417
|
"level",
|
|
@@ -392,8 +432,8 @@ __TS__SetDescriptor(
|
|
|
392
432
|
get = function(self)
|
|
393
433
|
return getUnitAbilityCooldownRemaining(self.u, self.typeId)
|
|
394
434
|
end,
|
|
395
|
-
set = function(self,
|
|
396
|
-
startUnitAbilityCooldown(self.u, self.typeId,
|
|
435
|
+
set = function(self, cooldownRemaining)
|
|
436
|
+
startUnitAbilityCooldown(self.u, self.typeId, cooldownRemaining)
|
|
397
437
|
end
|
|
398
438
|
},
|
|
399
439
|
true
|
|
@@ -418,6 +458,9 @@ end
|
|
|
418
458
|
local function setAbilityField(_, ability, field, levelOrValue, value)
|
|
419
459
|
return ____exports.Ability.prototype.setField(ability, field, levelOrValue, value)
|
|
420
460
|
end
|
|
461
|
+
local function getAbilityCooldown(_, abilityTypeId)
|
|
462
|
+
return getUnitAbilityCooldownRemaining(abilityActionDummy, abilityTypeId)
|
|
463
|
+
end
|
|
421
464
|
____exports.ItemAbility = __TS__Class()
|
|
422
465
|
local ItemAbility = ____exports.ItemAbility
|
|
423
466
|
ItemAbility.name = "ItemAbility"
|
|
@@ -445,6 +488,14 @@ function ItemAbility.prototype.setField(self, field, levelOrValue, value)
|
|
|
445
488
|
value
|
|
446
489
|
)
|
|
447
490
|
end
|
|
491
|
+
function ItemAbility.prototype.interruptCast(self)
|
|
492
|
+
local handle = self.owner.handle
|
|
493
|
+
local activelyUsed = getItemBooleanField(handle, ITEM_BF_ACTIVELY_USED)
|
|
494
|
+
if activelyUsed then
|
|
495
|
+
setItemBooleanField(handle, ITEM_BF_ACTIVELY_USED, false)
|
|
496
|
+
setItemBooleanField(handle, ITEM_BF_ACTIVELY_USED, true)
|
|
497
|
+
end
|
|
498
|
+
end
|
|
448
499
|
__TS__SetDescriptor(
|
|
449
500
|
ItemAbility.prototype,
|
|
450
501
|
"level",
|
|
@@ -453,6 +504,27 @@ __TS__SetDescriptor(
|
|
|
453
504
|
end},
|
|
454
505
|
true
|
|
455
506
|
)
|
|
507
|
+
__TS__SetDescriptor(
|
|
508
|
+
ItemAbility.prototype,
|
|
509
|
+
"cooldownRemaining",
|
|
510
|
+
{
|
|
511
|
+
get = function(self)
|
|
512
|
+
local item = self.owner
|
|
513
|
+
local ____doAbilityActionForceDummy_4 = doAbilityActionForceDummy
|
|
514
|
+
local ____item_handle_3 = item.handle
|
|
515
|
+
local ____opt_1 = item.owner
|
|
516
|
+
return ____doAbilityActionForceDummy_4(____item_handle_3, ____opt_1 and ____opt_1.handle, getAbilityCooldown, self.typeId)
|
|
517
|
+
end,
|
|
518
|
+
set = function(self, cooldownRemaining)
|
|
519
|
+
local item = self.owner
|
|
520
|
+
local ____startItemCooldown_8 = startItemCooldown
|
|
521
|
+
local ____item_handle_7 = item.handle
|
|
522
|
+
local ____opt_5 = item.owner
|
|
523
|
+
____startItemCooldown_8(____item_handle_7, ____opt_5 and ____opt_5.handle, cooldownRemaining)
|
|
524
|
+
end
|
|
525
|
+
},
|
|
526
|
+
true
|
|
527
|
+
)
|
|
456
528
|
__TS__ObjectDefineProperty(
|
|
457
529
|
ItemAbility,
|
|
458
530
|
"onCreate",
|
|
@@ -1,27 +1,100 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
+
local restoreCooldownGroup
|
|
2
3
|
local ____player = require("core.types.player")
|
|
3
4
|
local Player = ____player.Player
|
|
4
5
|
local ____dummy = require("objutil.dummy")
|
|
5
6
|
local dummyUnitId = ____dummy.dummyUnitId
|
|
7
|
+
local ____utility = require("engine.internal.utility")
|
|
8
|
+
local findUnitItemSlot = ____utility.findUnitItemSlot
|
|
9
|
+
local ____blank = require("engine.object-data.entry.item-type.blank")
|
|
10
|
+
local BlankItemType = ____blank.BlankItemType
|
|
11
|
+
local ____object_2Ddata_2Dentry_2Did_2Dgenerator = require("engine.object-data.utility.object-data-entry-id-generator")
|
|
12
|
+
local abilityTypeIdGenerator = ____object_2Ddata_2Dentry_2Did_2Dgenerator.abilityTypeIdGenerator
|
|
13
|
+
local ____math = require("math")
|
|
14
|
+
local MINIMUM_POSITIVE_NORMALIZED_FLOAT = ____math.MINIMUM_POSITIVE_NORMALIZED_FLOAT
|
|
15
|
+
local ____timer = require("core.types.timer")
|
|
16
|
+
local Timer = ____timer.Timer
|
|
17
|
+
local ____ignore_2Devents_2Ditems = require("engine.internal.unit.ignore-events-items")
|
|
18
|
+
local ignoreEventsItems = ____ignore_2Devents_2Ditems.ignoreEventsItems
|
|
19
|
+
local ____add_2Ditem_2Dto_2Dslot = require("engine.internal.unit.add-item-to-slot")
|
|
20
|
+
local unitAddItemToSlot = ____add_2Ditem_2Dto_2Dslot.unitAddItemToSlot
|
|
6
21
|
local isItemOwned = IsItemOwned
|
|
7
22
|
local isItemPowerup = IsItemPowerup
|
|
8
23
|
local getItemX = GetItemX
|
|
9
24
|
local getItemY = GetItemY
|
|
25
|
+
local setAbilityRealLevelField = BlzSetAbilityRealLevelField
|
|
26
|
+
local setItemIntegerField = BlzSetItemIntegerField
|
|
27
|
+
local getItemIntegerField = BlzGetItemIntegerField
|
|
10
28
|
local setItemBooleanField = BlzSetItemBooleanField
|
|
11
29
|
local setItemPosition = SetItemPosition
|
|
12
30
|
local unitAddItem = UnitAddItem
|
|
13
31
|
local unitRemoveItem = UnitRemoveItem
|
|
14
|
-
local
|
|
32
|
+
local unitUseItem = UnitUseItem
|
|
33
|
+
local unitResetCooldown = UnitResetCooldown
|
|
34
|
+
local COOLDOWN_STARTER_ABILITY_TYPE_ID = compiletime(function()
|
|
35
|
+
if not currentMap then
|
|
36
|
+
return 0
|
|
37
|
+
end
|
|
38
|
+
local abilityType = currentMap.objects.ability:newObject(
|
|
39
|
+
util.id2s(abilityTypeIdGenerator:next()),
|
|
40
|
+
"Absk"
|
|
41
|
+
)
|
|
42
|
+
abilityType["bsk1+0"] = 0
|
|
43
|
+
abilityType["bsk2+0"] = 0
|
|
44
|
+
abilityType["bsk3+0"] = 0
|
|
45
|
+
abilityType["amcs+0"] = 0
|
|
46
|
+
abilityType["adur+0"] = MINIMUM_POSITIVE_NORMALIZED_FLOAT
|
|
47
|
+
abilityType["ahdu+0"] = MINIMUM_POSITIVE_NORMALIZED_FLOAT
|
|
48
|
+
return util.s2id(abilityType.id)
|
|
49
|
+
end)
|
|
50
|
+
local COOLDOWN_STARTER_ITEM_TYPE_ID = compiletime(function()
|
|
51
|
+
local itemType = BlankItemType:create()
|
|
52
|
+
itemType.name = "[Warscript/Dummy] Item Cooldown Starter"
|
|
53
|
+
itemType.abilityTypeIds = {COOLDOWN_STARTER_ABILITY_TYPE_ID}
|
|
54
|
+
itemType.cooldownGroupId = COOLDOWN_STARTER_ABILITY_TYPE_ID
|
|
55
|
+
itemType.activelyUsed = true
|
|
56
|
+
return itemType.id
|
|
57
|
+
end)
|
|
58
|
+
---
|
|
59
|
+
-- @internal For use by internal systems only.
|
|
60
|
+
____exports.itemAbilityDummy = assert(CreateUnit(
|
|
15
61
|
Player.neutralVictim.handle,
|
|
16
62
|
dummyUnitId,
|
|
17
63
|
0,
|
|
18
64
|
0,
|
|
19
65
|
270
|
|
20
66
|
))
|
|
21
|
-
|
|
67
|
+
local cooldownStarterItem = UnitAddItemById(____exports.itemAbilityDummy, COOLDOWN_STARTER_ITEM_TYPE_ID)
|
|
68
|
+
local cooldownStarterAbility = BlzGetItemAbility(cooldownStarterItem, COOLDOWN_STARTER_ABILITY_TYPE_ID)
|
|
69
|
+
ShowUnit(____exports.itemAbilityDummy, false)
|
|
70
|
+
local function startItemCooldownInternal(handle, cooldown)
|
|
71
|
+
local cooldownGroup = getItemIntegerField(handle, ITEM_IF_COOLDOWN_GROUP)
|
|
72
|
+
setItemIntegerField(handle, ITEM_IF_COOLDOWN_GROUP, COOLDOWN_STARTER_ABILITY_TYPE_ID)
|
|
73
|
+
setAbilityRealLevelField(cooldownStarterAbility, ABILITY_RLF_COOLDOWN, 0, cooldown)
|
|
74
|
+
unitResetCooldown(____exports.itemAbilityDummy)
|
|
75
|
+
unitUseItem(____exports.itemAbilityDummy, cooldownStarterItem)
|
|
76
|
+
Timer:run(restoreCooldownGroup, handle, cooldownGroup)
|
|
77
|
+
end
|
|
78
|
+
restoreCooldownGroup = function(handle, cooldownGroup)
|
|
79
|
+
if getItemIntegerField(handle, ITEM_IF_COOLDOWN_GROUP) == COOLDOWN_STARTER_ABILITY_TYPE_ID then
|
|
80
|
+
setItemIntegerField(handle, ITEM_IF_COOLDOWN_GROUP, cooldownGroup)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
---
|
|
84
|
+
-- @internal For use by internal systems only.
|
|
85
|
+
____exports.startItemCooldown = function(handle, owner, cooldown)
|
|
86
|
+
____exports.doAbilityActionForceDummy(handle, owner, startItemCooldownInternal, cooldown)
|
|
87
|
+
end
|
|
88
|
+
---
|
|
89
|
+
-- @internal For use by internal systems only.
|
|
90
|
+
____exports.abilityActionDummy = ____exports.itemAbilityDummy
|
|
22
91
|
---
|
|
23
92
|
-- @internal For use by internal systems only.
|
|
24
93
|
____exports.doAbilityAction = function(handle, action, ...)
|
|
94
|
+
local isAlreadyIgnoredInEvents = ignoreEventsItems[handle] ~= nil
|
|
95
|
+
if not isAlreadyIgnoredInEvents then
|
|
96
|
+
ignoreEventsItems[handle] = true
|
|
97
|
+
end
|
|
25
98
|
local isOwned = isItemOwned(handle)
|
|
26
99
|
local isPowerup
|
|
27
100
|
local x
|
|
@@ -33,16 +106,51 @@ ____exports.doAbilityAction = function(handle, action, ...)
|
|
|
33
106
|
end
|
|
34
107
|
x = getItemX(handle)
|
|
35
108
|
y = getItemY(handle)
|
|
36
|
-
unitAddItem(
|
|
109
|
+
unitAddItem(____exports.itemAbilityDummy, handle)
|
|
37
110
|
end
|
|
38
111
|
local result = action(handle, ...)
|
|
39
112
|
if not isOwned then
|
|
40
|
-
unitRemoveItem(
|
|
113
|
+
unitRemoveItem(____exports.itemAbilityDummy, handle)
|
|
41
114
|
setItemPosition(handle, x, y)
|
|
42
115
|
if isPowerup then
|
|
43
116
|
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, true)
|
|
44
117
|
end
|
|
45
118
|
end
|
|
119
|
+
if not isAlreadyIgnoredInEvents then
|
|
120
|
+
ignoreEventsItems[handle] = nil
|
|
121
|
+
end
|
|
122
|
+
return result
|
|
123
|
+
end
|
|
124
|
+
---
|
|
125
|
+
-- @internal For use by internal systems only.
|
|
126
|
+
____exports.doAbilityActionForceDummy = function(handle, owner, action, ...)
|
|
127
|
+
if owner == nil then
|
|
128
|
+
return ____exports.doAbilityAction(handle, action, ...)
|
|
129
|
+
end
|
|
130
|
+
local slot = findUnitItemSlot(owner, handle)
|
|
131
|
+
if slot == nil then
|
|
132
|
+
return ____exports.doAbilityAction(handle, action, ...)
|
|
133
|
+
end
|
|
134
|
+
local isAlreadyIgnoredInEvents = ignoreEventsItems[handle] ~= nil
|
|
135
|
+
if not isAlreadyIgnoredInEvents then
|
|
136
|
+
ignoreEventsItems[handle] = true
|
|
137
|
+
end
|
|
138
|
+
local isPowerup
|
|
139
|
+
if isItemPowerup(handle) then
|
|
140
|
+
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, false)
|
|
141
|
+
isPowerup = true
|
|
142
|
+
end
|
|
143
|
+
unitRemoveItem(owner, handle)
|
|
144
|
+
unitAddItem(____exports.itemAbilityDummy, handle)
|
|
145
|
+
local result = action(handle, ...)
|
|
146
|
+
unitRemoveItem(____exports.itemAbilityDummy, handle)
|
|
147
|
+
unitAddItemToSlot(owner, handle, slot)
|
|
148
|
+
if isPowerup then
|
|
149
|
+
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, true)
|
|
150
|
+
end
|
|
151
|
+
if not isAlreadyIgnoredInEvents then
|
|
152
|
+
ignoreEventsItems[handle] = nil
|
|
153
|
+
end
|
|
46
154
|
return result
|
|
47
155
|
end
|
|
48
156
|
return ____exports
|
|
@@ -5,8 +5,8 @@ import { Event } from "../../event";
|
|
|
5
5
|
import { ReadonlyRect } from "../../core/types/rect";
|
|
6
6
|
import { ItemAbility } from "./ability";
|
|
7
7
|
import { AbilityTypeId } from "../object-data/entry/ability-type";
|
|
8
|
+
import type { ItemTypeId } from "../object-data/entry/item-type";
|
|
8
9
|
type DefenseType = 0 | 1 | 2 | 3 | 4 | 5;
|
|
9
|
-
export declare const addAndGetAbility: (handle: jitem, abilityTypeId: AbilityTypeId) => jability | null;
|
|
10
10
|
declare const enum ItemPropertyKey {
|
|
11
11
|
ABILITIES = 100,
|
|
12
12
|
LUA_INDEX_BY_ABILITY_TYPE_ID = 101
|
|
@@ -17,7 +17,7 @@ export declare class Item extends Handle<jitem> {
|
|
|
17
17
|
constructor(handle: jitem);
|
|
18
18
|
protected onDestroy(): HandleDestructor;
|
|
19
19
|
static create<T extends Item>(this: typeof Item & (new (handle: jitem) => T), id: number, x: number, y: number, skinId?: number): T;
|
|
20
|
-
get typeId():
|
|
20
|
+
get typeId(): ItemTypeId;
|
|
21
21
|
set skinId(v: number);
|
|
22
22
|
get skinId(): number;
|
|
23
23
|
set name(v: string);
|
|
@@ -73,14 +73,15 @@ export declare class Item extends Handle<jitem> {
|
|
|
73
73
|
set position(v: Vec2);
|
|
74
74
|
set charges(v: number);
|
|
75
75
|
get charges(): number;
|
|
76
|
+
consumeCharge(): boolean;
|
|
76
77
|
addAbility(abilityTypeId: AbilityTypeId): ItemAbility | undefined;
|
|
77
78
|
removeAbility(abilityTypeId: AbilityTypeId): boolean;
|
|
78
79
|
hasAbility(abilityTypeId: AbilityTypeId): boolean;
|
|
79
80
|
getAbility(abilityTypeId: AbilityTypeId): ItemAbility | undefined;
|
|
80
81
|
get abilities(): readonly ItemAbility[];
|
|
81
|
-
static getInRange(
|
|
82
|
+
static getInRange(x: number, y: number, range: number): Item[];
|
|
82
83
|
static getInRect(rect: ReadonlyRect): Item[];
|
|
83
84
|
static get onCreate(): Event<[Item]>;
|
|
84
|
-
static get
|
|
85
|
+
static get destroyEvent(): Event<[Item]>;
|
|
85
86
|
}
|
|
86
87
|
export {};
|
package/engine/internal/item.lua
CHANGED
|
@@ -15,6 +15,14 @@ local ____ability = require("engine.internal.ability")
|
|
|
15
15
|
local ItemAbility = ____ability.ItemAbility
|
|
16
16
|
local ____ability = require("engine.internal.item.ability")
|
|
17
17
|
local doAbilityAction = ____ability.doAbilityAction
|
|
18
|
+
local doAbilityActionForceDummy = ____ability.doAbilityActionForceDummy
|
|
19
|
+
local itemAbilityDummy = ____ability.itemAbilityDummy
|
|
20
|
+
local ____dummy_2Ditem = require("engine.internal.object-data.dummy-item")
|
|
21
|
+
local DUMMY_ITEM_ID = ____dummy_2Ditem.DUMMY_ITEM_ID
|
|
22
|
+
local ____add_2Ditem_2Dto_2Dslot = require("engine.internal.unit.add-item-to-slot")
|
|
23
|
+
local SLOT_FILLER_ITEM_TYPE_ID = ____add_2Ditem_2Dto_2Dslot.SLOT_FILLER_ITEM_TYPE_ID
|
|
24
|
+
local ____vec2 = require("math.vec2")
|
|
25
|
+
local distance = ____vec2.distance
|
|
18
26
|
local itemAddAbility = BlzItemAddAbility
|
|
19
27
|
local itemRemoveAbility = BlzItemRemoveAbility
|
|
20
28
|
local getItemAbility = BlzGetItemAbility
|
|
@@ -24,10 +32,22 @@ local getAbilityId = BlzGetAbilityId
|
|
|
24
32
|
local getWidgetLife = GetWidgetLife
|
|
25
33
|
local removeItem = RemoveItem
|
|
26
34
|
local getHandleId = GetHandleId
|
|
35
|
+
local setRect = SetRect
|
|
36
|
+
local enumItemsInRect = EnumItemsInRect
|
|
37
|
+
local getEnumItem = GetEnumItem
|
|
38
|
+
local getItemTypeId = GetItemTypeId
|
|
39
|
+
local getItemX = GetItemX
|
|
40
|
+
local getItemY = GetItemY
|
|
41
|
+
local getItemCharges = GetItemCharges
|
|
42
|
+
local setItemCharges = SetItemCharges
|
|
43
|
+
local unitRemoveAbility = UnitRemoveAbility
|
|
44
|
+
local unitUseItem = UnitUseItem
|
|
27
45
|
local getItemIntegerField = BlzGetItemIntegerField
|
|
28
46
|
local setItemBooleanField = BlzSetItemBooleanField
|
|
29
47
|
local getItemBooleanField = BlzGetItemBooleanField
|
|
30
48
|
local enumRect = Rect:create(0, 0, 0, 0).handle
|
|
49
|
+
---
|
|
50
|
+
-- @internal For use by internal systems only.
|
|
31
51
|
____exports.addAndGetAbility = function(handle, abilityTypeId)
|
|
32
52
|
if itemAddAbility(handle, abilityTypeId) then
|
|
33
53
|
return getItemAbility(handle, abilityTypeId)
|
|
@@ -53,6 +73,49 @@ local function getItemAbilities(handle, item)
|
|
|
53
73
|
end
|
|
54
74
|
return abilities
|
|
55
75
|
end
|
|
76
|
+
local function consumeCharge(handle)
|
|
77
|
+
do
|
|
78
|
+
local i = 0
|
|
79
|
+
local ability = getItemAbilityByIndex(handle, i)
|
|
80
|
+
while ability ~= nil do
|
|
81
|
+
unitRemoveAbility(
|
|
82
|
+
itemAbilityDummy,
|
|
83
|
+
getAbilityId(ability)
|
|
84
|
+
)
|
|
85
|
+
do
|
|
86
|
+
i = i + 1
|
|
87
|
+
ability = getItemAbilityByIndex(handle, i)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
unitUseItem(itemAbilityDummy, handle)
|
|
92
|
+
end
|
|
93
|
+
local targetCollection
|
|
94
|
+
local targetCollectionNextIndex
|
|
95
|
+
local centerX
|
|
96
|
+
local centerY
|
|
97
|
+
local enumRange
|
|
98
|
+
local function collectIntoTarget()
|
|
99
|
+
local item = getEnumItem()
|
|
100
|
+
local typeId = getItemTypeId(item)
|
|
101
|
+
if typeId ~= DUMMY_ITEM_ID and typeId ~= SLOT_FILLER_ITEM_TYPE_ID then
|
|
102
|
+
targetCollection[targetCollectionNextIndex] = ____exports.Item:of(item)
|
|
103
|
+
targetCollectionNextIndex = targetCollectionNextIndex + 1
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
local function collectIntoTargetRange()
|
|
107
|
+
local item = getEnumItem()
|
|
108
|
+
local typeId = getItemTypeId(item)
|
|
109
|
+
if distance(
|
|
110
|
+
getItemX(item),
|
|
111
|
+
getItemY(item),
|
|
112
|
+
centerX,
|
|
113
|
+
centerY
|
|
114
|
+
) <= enumRange and typeId ~= DUMMY_ITEM_ID and typeId ~= SLOT_FILLER_ITEM_TYPE_ID then
|
|
115
|
+
targetCollection[targetCollectionNextIndex] = ____exports.Item:of(item)
|
|
116
|
+
targetCollectionNextIndex = targetCollectionNextIndex + 1
|
|
117
|
+
end
|
|
118
|
+
end
|
|
56
119
|
____exports.Item = __TS__Class()
|
|
57
120
|
local Item = ____exports.Item
|
|
58
121
|
Item.name = "Item"
|
|
@@ -78,6 +141,29 @@ end
|
|
|
78
141
|
function Item.create(self, id, x, y, skinId)
|
|
79
142
|
return self:of(BlzCreateItemWithSkin(id, x, y, skinId or id))
|
|
80
143
|
end
|
|
144
|
+
function Item.prototype.consumeCharge(self)
|
|
145
|
+
local handle = self.handle
|
|
146
|
+
local charges = getItemCharges(handle)
|
|
147
|
+
if charges >= 2 then
|
|
148
|
+
setItemCharges(handle, charges - 1)
|
|
149
|
+
return true
|
|
150
|
+
end
|
|
151
|
+
if charges == 1 then
|
|
152
|
+
if getItemBooleanField(handle, ITEM_BF_PERISHABLE) then
|
|
153
|
+
self:destroy()
|
|
154
|
+
return true
|
|
155
|
+
end
|
|
156
|
+
if not getItemBooleanField(handle, ITEM_BF_ACTIVELY_USED) then
|
|
157
|
+
setItemCharges(handle, 0)
|
|
158
|
+
return true
|
|
159
|
+
end
|
|
160
|
+
local ____doAbilityActionForceDummy_2 = doAbilityActionForceDummy
|
|
161
|
+
local ____opt_0 = self.owner
|
|
162
|
+
____doAbilityActionForceDummy_2(handle, ____opt_0 and ____opt_0.handle, consumeCharge)
|
|
163
|
+
return true
|
|
164
|
+
end
|
|
165
|
+
return false
|
|
166
|
+
end
|
|
81
167
|
function Item.prototype.addAbility(self, abilityTypeId)
|
|
82
168
|
local nativeAbility = doAbilityAction(self.handle, ____exports.addAndGetAbility, abilityTypeId)
|
|
83
169
|
if nativeAbility ~= nil then
|
|
@@ -111,34 +197,27 @@ function Item.prototype.getAbility(self, abilityTypeId)
|
|
|
111
197
|
local ability = self[101][abilityTypeId] ~= nil and doAbilityAction(self.handle, getItemAbility, abilityTypeId)
|
|
112
198
|
return ability and ItemAbility:of(ability, abilityTypeId, self) or nil
|
|
113
199
|
end
|
|
114
|
-
function Item.getInRange(self,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
pos.y + range
|
|
122
|
-
)
|
|
123
|
-
EnumItemsInRect(
|
|
200
|
+
function Item.getInRange(self, x, y, range)
|
|
201
|
+
targetCollection = {}
|
|
202
|
+
targetCollectionNextIndex = 1
|
|
203
|
+
centerX = x
|
|
204
|
+
centerY = y
|
|
205
|
+
enumRange = range
|
|
206
|
+
setRect(
|
|
124
207
|
enumRect,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
208
|
+
x - range,
|
|
209
|
+
y - range,
|
|
210
|
+
x + range,
|
|
211
|
+
y + range
|
|
129
212
|
)
|
|
130
|
-
|
|
213
|
+
enumItemsInRect(enumRect, nil, collectIntoTargetRange)
|
|
214
|
+
return targetCollection
|
|
131
215
|
end
|
|
132
216
|
function Item.getInRect(self, rect)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
function()
|
|
138
|
-
collection[#collection + 1] = self:of(GetEnumItem())
|
|
139
|
-
end
|
|
140
|
-
)
|
|
141
|
-
return collection
|
|
217
|
+
targetCollection = {}
|
|
218
|
+
targetCollectionNextIndex = 1
|
|
219
|
+
enumItemsInRect(rect.handle, nil, collectIntoTarget)
|
|
220
|
+
return targetCollection
|
|
142
221
|
end
|
|
143
222
|
__TS__SetDescriptor(
|
|
144
223
|
Item.prototype,
|
|
@@ -270,7 +349,7 @@ __TS__SetDescriptor(
|
|
|
270
349
|
"perishable",
|
|
271
350
|
{
|
|
272
351
|
get = function(self)
|
|
273
|
-
return
|
|
352
|
+
return getItemBooleanField(self.handle, ITEM_BF_PERISHABLE)
|
|
274
353
|
end,
|
|
275
354
|
set = function(self, v)
|
|
276
355
|
BlzSetItemBooleanField(self.handle, ITEM_BF_PERISHABLE, v)
|
|
@@ -526,10 +605,10 @@ __TS__SetDescriptor(
|
|
|
526
605
|
"charges",
|
|
527
606
|
{
|
|
528
607
|
get = function(self)
|
|
529
|
-
return
|
|
608
|
+
return getItemCharges(self.handle)
|
|
530
609
|
end,
|
|
531
610
|
set = function(self, v)
|
|
532
|
-
|
|
611
|
+
setItemCharges(self.handle, v)
|
|
533
612
|
end
|
|
534
613
|
},
|
|
535
614
|
true
|
|
@@ -551,7 +630,7 @@ __TS__ObjectDefineProperty(
|
|
|
551
630
|
)
|
|
552
631
|
__TS__ObjectDefineProperty(
|
|
553
632
|
Item,
|
|
554
|
-
"
|
|
633
|
+
"destroyEvent",
|
|
555
634
|
{get = function(self)
|
|
556
635
|
return self.onDestroyEvent
|
|
557
636
|
end}
|
|
@@ -8,6 +8,6 @@ local DURATION_NORMAL_ABILITY_FLOAT_LEVEL_FIELD = ____ability.DURATION_NORMAL_AB
|
|
|
8
8
|
-- @internal For use by internal systems only.
|
|
9
9
|
____exports.getAbilityDuration = function(ability, target)
|
|
10
10
|
local level = ability.level
|
|
11
|
-
return target ~= nil and target:hasClassification(UnitClassification.RESISTANT) and DURATION_HERO_ABILITY_FLOAT_LEVEL_FIELD:getValue(ability, level) or DURATION_NORMAL_ABILITY_FLOAT_LEVEL_FIELD:getValue(ability, level)
|
|
11
|
+
return target ~= nil and (target.isHero or target:getField(UNIT_IF_LEVEL) >= 6 or target:hasClassification(UnitClassification.RESISTANT)) and DURATION_HERO_ABILITY_FLOAT_LEVEL_FIELD:getValue(ability, level) or DURATION_NORMAL_ABILITY_FLOAT_LEVEL_FIELD:getValue(ability, level)
|
|
12
12
|
end
|
|
13
13
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
export
|
|
2
|
+
export {};
|
|
@@ -10,5 +10,7 @@ ____exports.AUTO_ATTACK_SPEED_INCREASE_DUMMY_ABILITY_TYPE_ID = compiletime(funct
|
|
|
10
10
|
abilityType.autoAttackSpeedIncreaseFactor = 0
|
|
11
11
|
return abilityType.id
|
|
12
12
|
end)
|
|
13
|
+
---
|
|
14
|
+
-- @internal For use by internal systems.
|
|
13
15
|
____exports.AUTO_ATTACK_SPEED_INCREASE_FACTOR_ABILITY_FIELD = ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1
|
|
14
16
|
return ____exports
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____evasion = require("engine.object-data.entry.ability-type.evasion")
|
|
3
|
+
local EvasionAbilityType = ____evasion.EvasionAbilityType
|
|
4
|
+
---
|
|
5
|
+
-- @internal For use by internal systems.
|
|
6
|
+
____exports.EVASION_PROBABILITY_DUMMY_ABILITY_TYPE_ID = compiletime(function()
|
|
7
|
+
local abilityType = EvasionAbilityType:create()
|
|
8
|
+
abilityType.isInternal = true
|
|
9
|
+
abilityType.isButtonVisible = false
|
|
10
|
+
abilityType.evasionProbability = 0
|
|
11
|
+
return abilityType.id
|
|
12
|
+
end)
|
|
13
|
+
---
|
|
14
|
+
-- @internal For use by internal systems.
|
|
15
|
+
____exports.EVASION_PROBABILITY_ABILITY_FIELD = ABILITY_RLF_CHANCE_TO_EVADE_EEV1
|
|
16
|
+
return ____exports
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____unit = require("engine.internal.unit")
|
|
3
|
+
local Unit = ____unit.Unit
|
|
4
|
+
local ____add_2Ditem_2Dto_2Dslot = require("engine.internal.unit.add-item-to-slot")
|
|
5
|
+
local fillerItems = ____add_2Ditem_2Dto_2Dslot.fillerItems
|
|
6
|
+
local unitsWithFillerItems = ____add_2Ditem_2Dto_2Dslot.unitsWithFillerItems
|
|
7
|
+
local setItemVisible = SetItemVisible
|
|
8
|
+
local unitRemoveItem = UnitRemoveItem
|
|
9
|
+
Unit.itemPickedUpEvent:addListener(
|
|
10
|
+
4,
|
|
11
|
+
function(unit)
|
|
12
|
+
local handle = unit.handle
|
|
13
|
+
if unitsWithFillerItems[handle] ~= nil then
|
|
14
|
+
for previousSlot = 1, 6 do
|
|
15
|
+
local fillerItem = fillerItems[previousSlot]
|
|
16
|
+
unitRemoveItem(handle, fillerItem)
|
|
17
|
+
setItemVisible(fillerItem, false)
|
|
18
|
+
end
|
|
19
|
+
unitsWithFillerItems[handle] = nil
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
)
|
|
23
|
+
return ____exports
|