warscript 0.0.1-dev.697548e → 0.0.1-dev.69b6655
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/core/types/frame.d.ts +1 -0
- package/core/types/frame.lua +112 -37
- package/core/types/handle.lua +6 -9
- package/core/types/item.d.ts +1 -0
- package/core/types/item.lua +1 -0
- package/core/types/player.d.ts +2 -1
- package/core/types/player.lua +18 -13
- package/core/types/playerColor.lua +4 -3
- package/core/types/sound.d.ts +1 -1
- package/core/types/sound.lua +13 -8
- package/core/types/unit.d.ts +4 -0
- package/core/types/unit.lua +4 -0
- package/decl/native.d.ts +705 -7
- package/engine/behaviour/ability/damage.lua +11 -14
- package/engine/behaviour/ability/emulate-impact.lua +5 -4
- package/engine/behaviour/ability.d.ts +1 -0
- package/engine/behaviour/ability.lua +11 -0
- package/engine/behaviour/unit.d.ts +1 -0
- package/engine/behaviour/unit.lua +1 -0
- package/engine/buff.d.ts +13 -10
- package/engine/buff.lua +66 -17
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +4 -0
- package/engine/internal/ability.lua +52 -33
- package/engine/internal/item/fields.d.ts +12 -0
- package/engine/internal/item/fields.lua +33 -0
- package/engine/internal/item+owner.d.ts +1 -0
- package/engine/internal/item+owner.lua +7 -0
- package/engine/internal/item.d.ts +16 -5
- package/engine/internal/item.lua +130 -57
- package/engine/internal/unit/ability.lua +15 -3
- package/engine/internal/unit/appearance.d.ts +15 -0
- package/engine/internal/unit/appearance.lua +85 -0
- package/engine/internal/unit/bag.d.ts +18 -0
- package/engine/internal/unit/bag.lua +63 -0
- package/engine/internal/unit/buff.d.ts +2 -2
- package/engine/internal/unit/buff.lua +34 -19
- package/engine/internal/unit/equipment.d.ts +36 -0
- package/engine/internal/unit/equipment.lua +169 -0
- package/engine/internal/unit/{item.d.ts → inventory.d.ts} +3 -3
- package/engine/internal/unit/{item.lua → inventory.lua} +25 -26
- package/engine/internal/unit/pseudo-passive-abilities.d.ts +2 -0
- package/engine/internal/unit/pseudo-passive-abilities.lua +11 -0
- package/engine/internal/unit+damage.d.ts +9 -0
- package/engine/internal/unit+damage.lua +33 -0
- package/engine/internal/unit-missile-data.lua +58 -32
- package/engine/internal/unit.d.ts +0 -1
- package/engine/internal/unit.lua +2 -7
- package/engine/local-client.d.ts +25 -0
- package/engine/local-client.lua +364 -54
- package/engine/object-data/auxiliary/equipment-slot.d.ts +12 -0
- package/engine/object-data/auxiliary/equipment-slot.lua +2 -0
- package/engine/object-data/auxiliary/equipment-type.d.ts +13 -0
- package/engine/object-data/auxiliary/equipment-type.lua +2 -0
- package/engine/object-data/auxiliary/item-tag.d.ts +12 -0
- package/engine/object-data/auxiliary/item-tag.lua +2 -0
- package/engine/object-data/auxiliary/sound-set-name.d.ts +14 -3
- package/engine/object-data/entry/ability-type/apprehend.d.ts +22 -0
- package/engine/object-data/entry/ability-type/apprehend.lua +66 -0
- package/engine/object-data/entry/ability-type/banshee.d.ts +8 -0
- package/engine/object-data/entry/ability-type/banshee.lua +13 -0
- package/engine/object-data/entry/ability-type/banshees-wail-damage-amp.d.ts +12 -0
- package/engine/object-data/entry/ability-type/banshees-wail-damage-amp.lua +27 -0
- package/engine/object-data/entry/ability-type/banshees-wail.d.ts +31 -0
- package/engine/object-data/entry/ability-type/banshees-wail.lua +117 -0
- package/engine/object-data/entry/ability-type/battering-ram.d.ts +33 -0
- package/engine/object-data/entry/ability-type/battering-ram.lua +130 -0
- package/engine/object-data/entry/ability-type/blank-configurable.d.ts +3 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +30 -0
- package/engine/object-data/entry/ability-type/cleansing-fire.d.ts +27 -0
- package/engine/object-data/entry/ability-type/cleansing-fire.lua +104 -0
- package/engine/object-data/entry/ability-type/consecration.d.ts +15 -0
- package/engine/object-data/entry/ability-type/consecration.lua +52 -0
- package/engine/object-data/entry/ability-type/cooldown-reduction.d.ts +12 -0
- package/engine/object-data/entry/ability-type/cooldown-reduction.lua +39 -0
- package/engine/object-data/entry/ability-type/critical-strike-system.d.ts +18 -0
- package/engine/object-data/entry/ability-type/critical-strike-system.lua +65 -0
- package/engine/object-data/entry/ability-type/deathseeker-arrows.d.ts +21 -0
- package/engine/object-data/entry/ability-type/deathseeker-arrows.lua +78 -0
- package/engine/object-data/entry/ability-type/equipment-inventory-interface.d.ts +8 -0
- package/engine/object-data/entry/ability-type/equipment-inventory-interface.lua +13 -0
- package/engine/object-data/entry/ability-type/equipment-inventory.d.ts +13 -0
- package/engine/object-data/entry/ability-type/equipment-inventory.lua +27 -0
- package/engine/object-data/entry/ability-type/equipment.d.ts +13 -0
- package/engine/object-data/entry/ability-type/equipment.lua +27 -0
- package/engine/object-data/entry/ability-type/grant-talent-point.d.ts +8 -0
- package/engine/object-data/entry/ability-type/grant-talent-point.lua +13 -0
- package/engine/object-data/entry/ability-type/grim-conviction.d.ts +36 -0
- package/engine/object-data/entry/ability-type/grim-conviction.lua +131 -0
- package/engine/object-data/entry/ability-type/grit.d.ts +18 -0
- package/engine/object-data/entry/ability-type/grit.lua +65 -0
- package/engine/object-data/entry/ability-type/guiding-hand.d.ts +27 -0
- package/engine/object-data/entry/ability-type/guiding-hand.lua +104 -0
- package/engine/object-data/entry/ability-type/headsplitter.d.ts +27 -0
- package/engine/object-data/entry/ability-type/headsplitter.lua +104 -0
- package/engine/object-data/entry/ability-type/healing-modifier.d.ts +9 -0
- package/engine/object-data/entry/ability-type/healing-modifier.lua +26 -0
- package/engine/object-data/entry/ability-type/heroic-slash.d.ts +18 -0
- package/engine/object-data/entry/ability-type/heroic-slash.lua +65 -0
- package/engine/object-data/entry/ability-type/holy-wrath.d.ts +30 -0
- package/engine/object-data/entry/ability-type/holy-wrath.lua +117 -0
- package/engine/object-data/entry/ability-type/inspire-courage.d.ts +18 -0
- package/engine/object-data/entry/ability-type/inspire-courage.lua +65 -0
- package/engine/object-data/entry/ability-type/lights-mercy.d.ts +27 -0
- package/engine/object-data/entry/ability-type/lights-mercy.lua +104 -0
- package/engine/object-data/entry/ability-type/mana-efficiency.d.ts +12 -0
- package/engine/object-data/entry/ability-type/mana-efficiency.lua +39 -0
- package/engine/object-data/entry/ability-type/mind-control.d.ts +21 -0
- package/engine/object-data/entry/ability-type/mind-control.lua +78 -0
- package/engine/object-data/entry/ability-type/on-attack-cast-spell.d.ts +21 -0
- package/engine/object-data/entry/ability-type/on-attack-cast-spell.lua +52 -0
- package/engine/object-data/entry/ability-type/on-basic-attack-cast-spell.d.ts +19 -0
- package/engine/object-data/entry/ability-type/on-basic-attack-cast-spell.lua +65 -0
- package/engine/object-data/entry/ability-type/on-hit-cast-spell.d.ts +15 -0
- package/engine/object-data/entry/ability-type/on-hit-cast-spell.lua +26 -0
- package/engine/object-data/entry/ability-type/on-magic-attack-cast-spell.d.ts +6 -0
- package/engine/object-data/entry/ability-type/on-magic-attack-cast-spell.lua +12 -0
- package/engine/object-data/entry/ability-type/provoke.d.ts +21 -0
- package/engine/object-data/entry/ability-type/provoke.lua +66 -0
- package/engine/object-data/entry/ability-type/raise-the-banner.d.ts +9 -0
- package/engine/object-data/entry/ability-type/raise-the-banner.lua +26 -0
- package/engine/object-data/entry/ability-type/resolve.d.ts +12 -0
- package/engine/object-data/entry/ability-type/resolve.lua +39 -0
- package/engine/object-data/entry/ability-type/righteous-fury.d.ts +33 -0
- package/engine/object-data/entry/ability-type/righteous-fury.lua +130 -0
- package/engine/object-data/entry/ability-type/sacred-aura.d.ts +27 -0
- package/engine/object-data/entry/ability-type/sacred-aura.lua +104 -0
- package/engine/object-data/entry/ability-type/soul-lantern.d.ts +30 -0
- package/engine/object-data/entry/ability-type/soul-lantern.lua +117 -0
- package/engine/object-data/entry/ability-type/spell-amp.d.ts +15 -0
- package/engine/object-data/entry/ability-type/spell-amp.lua +52 -0
- package/engine/object-data/entry/ability-type/spell-critical-strike.d.ts +12 -0
- package/engine/object-data/entry/ability-type/spell-critical-strike.lua +39 -0
- package/engine/object-data/entry/ability-type/spell-vamp.d.ts +12 -0
- package/engine/object-data/entry/ability-type/spell-vamp.lua +39 -0
- package/engine/object-data/entry/ability-type/stackable-evasion.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-evasion.lua +13 -0
- package/engine/object-data/entry/ability-type/stackable-hardened-skin.d.ts +21 -0
- package/engine/object-data/entry/ability-type/stackable-hardened-skin.lua +78 -0
- package/engine/object-data/entry/ability-type/stackable-life-steal.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-life-steal.lua +26 -0
- package/engine/object-data/entry/ability-type/stackable-spell-damage-reduction.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-spell-damage-reduction.lua +13 -0
- package/engine/object-data/entry/ability-type/stackable-thorn-shield.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-thorn-shield.lua +13 -0
- package/engine/object-data/entry/ability-type/stat-details.d.ts +12 -0
- package/engine/object-data/entry/ability-type/stat-details.lua +27 -0
- package/engine/object-data/entry/ability-type/surge-of-light.d.ts +33 -0
- package/engine/object-data/entry/ability-type/surge-of-light.lua +130 -0
- package/engine/object-data/entry/ability-type/sweeping-strike.d.ts +57 -0
- package/engine/object-data/entry/ability-type/sweeping-strike.lua +234 -0
- package/engine/object-data/entry/ability-type/talents.d.ts +12 -0
- package/engine/object-data/entry/ability-type/talents.lua +27 -0
- package/engine/object-data/entry/ability-type/unyielding-guard.d.ts +30 -0
- package/engine/object-data/entry/ability-type/unyielding-guard.lua +117 -0
- package/engine/object-data/entry/ability-type/valiant-charge.d.ts +27 -0
- package/engine/object-data/entry/ability-type/valiant-charge.lua +104 -0
- package/engine/object-data/entry/ability-type/warcry.d.ts +9 -0
- package/engine/object-data/entry/ability-type/warcry.lua +26 -0
- package/engine/object-data/entry/ability-type/withering-fire.d.ts +21 -0
- package/engine/object-data/entry/ability-type/withering-fire.lua +78 -0
- package/engine/object-data/entry/ability-type.d.ts +10 -3
- package/engine/object-data/entry/ability-type.lua +53 -0
- package/engine/object-data/entry/buff-type.d.ts +6 -2
- package/engine/object-data/entry/buff-type.lua +26 -0
- package/engine/object-data/entry/destructible-type.d.ts +6 -2
- package/engine/object-data/entry/destructible-type.lua +26 -0
- package/engine/object-data/entry/item-type.d.ts +12 -3
- package/engine/object-data/entry/item-type.lua +52 -0
- package/engine/object-data/entry/lightning-type.d.ts +2 -2
- package/engine/object-data/entry/sound-preset.d.ts +2 -2
- package/engine/object-data/entry/unit-type.d.ts +47 -2
- package/engine/object-data/entry/unit-type.lua +383 -49
- package/engine/object-data/entry/upgrade.d.ts +2 -2
- package/engine/object-data/entry.d.ts +4 -1
- package/engine/object-field/item.d.ts +22 -0
- package/engine/object-field/item.lua +118 -0
- package/engine/standard/entries/ability-type.d.ts +3102 -7
- package/engine/standard/entries/ability-type.lua +0 -6
- package/engine/standard/entries/item-type.d.ts +1299 -0
- package/engine/standard/entries/item-type.lua +2 -0
- package/engine/standard/entries/unit-type.d.ts +5 -0
- package/engine/standard/entries/unit-type.lua +5 -0
- package/engine/standard/fields/item.d.ts +4 -0
- package/engine/standard/fields/item.lua +6 -0
- package/engine/unit.d.ts +4 -1
- package/engine/unit.lua +4 -1
- package/event.d.ts +1 -1
- package/lualib_bundle.lua +46 -117
- package/math.d.ts +2 -0
- package/math.lua +14 -0
- package/network.lua +25 -1
- package/operation.d.ts +8 -1
- package/operation.lua +49 -35
- package/package.json +3 -23
- package/utility/linked-map.d.ts +2 -1
- package/utility/linked-map.lua +6 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +6 -0
- package/utility/random.d.ts +102 -0
- package/utility/random.lua +273 -0
- package/utility/unordered-map.d.ts +27 -0
- package/utility/unordered-map.lua +99 -0
package/engine/local-client.lua
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
3
|
local __TS__Class = ____lualib.__TS__Class
|
|
4
4
|
local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
5
5
|
local __TS__ObjectDefineProperty = ____lualib.__TS__ObjectDefineProperty
|
|
6
|
-
local
|
|
6
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
7
7
|
local ____exports = {}
|
|
8
|
+
local actualizeTargetingModeState
|
|
8
9
|
local ____unit = require("core.types.unit")
|
|
9
10
|
local Unit = ____unit.Unit
|
|
10
11
|
local ____event = require("event")
|
|
@@ -18,34 +19,78 @@ local ____timer = require("core.types.timer")
|
|
|
18
19
|
local Timer = ____timer.Timer
|
|
19
20
|
local ____color = require("core.types.color")
|
|
20
21
|
local Color = ____color.Color
|
|
21
|
-
local
|
|
22
|
-
local
|
|
23
|
-
local
|
|
24
|
-
local
|
|
25
|
-
local
|
|
22
|
+
local ____arrays = require("utility.arrays")
|
|
23
|
+
local array = ____arrays.array
|
|
24
|
+
local ____unit = require("objutil.unit")
|
|
25
|
+
local UnitDefinition = ____unit.UnitDefinition
|
|
26
|
+
local ____socket = require("net.socket")
|
|
27
|
+
local Socket = ____socket.Socket
|
|
28
|
+
local frameToPixelX = BlzFrameToPixelX
|
|
29
|
+
local frameToPixelY = BlzFrameToPixelY
|
|
26
30
|
local getHandleId = GetHandleId
|
|
31
|
+
local getLocalClientHeight = BlzGetLocalClientHeight
|
|
32
|
+
local getLocalClientWidth = BlzGetLocalClientWidth
|
|
33
|
+
local getLocale = BlzGetLocale
|
|
27
34
|
local getMouseFocusUnit = BlzGetMouseFocusUnit
|
|
35
|
+
local getMouseScreenPosX = BlzGetMouseScreenPosX
|
|
36
|
+
local getMouseScreenPosY = BlzGetMouseScreenPosY
|
|
28
37
|
local getUnitRealField = BlzGetUnitRealField
|
|
29
38
|
local getUnitTypeId = GetUnitTypeId
|
|
30
|
-
local
|
|
39
|
+
local isHeroUnitId = IsHeroUnitId
|
|
40
|
+
local isKeyPressed = BlzIsKeyPressed
|
|
41
|
+
local isLocalClientActive = BlzIsLocalClientActive
|
|
42
|
+
local isMetaKeyPressed = BlzIsMetaKeyPressed
|
|
43
|
+
local isMouseButtonPressed = BlzIsMouseButtonPressed
|
|
44
|
+
local loadTOCFile = BlzLoadTOCFile
|
|
31
45
|
local pingMinimap = PingMinimap
|
|
32
46
|
local pingMinimapEx = PingMinimapEx
|
|
47
|
+
local pixelToFrameX = BlzPixelToFrameX
|
|
48
|
+
local pixelToFrameY = BlzPixelToFrameY
|
|
33
49
|
local tableSort = table.sort
|
|
34
|
-
local
|
|
50
|
+
local hdTocPath = "_warscript\\IsHD.toc"
|
|
51
|
+
local deTocPath = "_warscript\\IsDE.toc"
|
|
35
52
|
compiletime(function()
|
|
36
53
|
if currentMap then
|
|
37
|
-
local
|
|
38
|
-
currentMap:addFileString("_HD.w3mod\\" ..
|
|
39
|
-
currentMap:addFileString("_HD.w3mod\\" ..
|
|
54
|
+
local hdFdfPath = "_warscript\\IsHD.fdf"
|
|
55
|
+
currentMap:addFileString("_HD.w3mod\\" .. hdFdfPath, "\r\n")
|
|
56
|
+
currentMap:addFileString("_HD.w3mod\\" .. hdTocPath, hdFdfPath .. "\r\n")
|
|
57
|
+
local deFdfPath = "_warscript\\IsDE.fdf"
|
|
58
|
+
currentMap:addFileString("_DE.w3mod\\" .. deFdfPath, "\r\n")
|
|
59
|
+
currentMap:addFileString("_DE.w3mod\\" .. deTocPath, deFdfPath .. "\r\n")
|
|
40
60
|
end
|
|
41
61
|
end)
|
|
42
|
-
local
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
62
|
+
local selectionWarmupUnitTypeId = compiletime(function()
|
|
63
|
+
local dummy = __TS__New(UnitDefinition, "hfoo", nil, {
|
|
64
|
+
name = "[Warscript/Selection Warmup] Unit",
|
|
65
|
+
model = "",
|
|
66
|
+
modelHD = "",
|
|
67
|
+
foodCost = 0,
|
|
68
|
+
movementType = "none",
|
|
69
|
+
collisionSize = 0,
|
|
70
|
+
selectionScale = 0,
|
|
71
|
+
sightRadiusDay = 0,
|
|
72
|
+
sightRadiusNight = 0,
|
|
73
|
+
abilitiesNormal = {"Avul"}
|
|
74
|
+
})
|
|
75
|
+
dummy.weapons[1].enabled = false
|
|
76
|
+
dummy.weapons[2].enabled = false
|
|
77
|
+
return fourCC(dummy.id)
|
|
48
78
|
end)
|
|
79
|
+
local function getSelectionButtons()
|
|
80
|
+
return Frame:byName("SimpleInfoPanelUnitDetail").parent:getChild(5):getChild(0)
|
|
81
|
+
end
|
|
82
|
+
local function getMainSelectedUnitIndex(selectionButtons, buttonCount)
|
|
83
|
+
local mainSelectedUnitIndex
|
|
84
|
+
local maxButtonWidth = 0
|
|
85
|
+
for i = 0, buttonCount - 1 do
|
|
86
|
+
local width = selectionButtons:getChild(i):getChild(1).width
|
|
87
|
+
if width > maxButtonWidth then
|
|
88
|
+
maxButtonWidth = width
|
|
89
|
+
mainSelectedUnitIndex = i
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
return mainSelectedUnitIndex
|
|
93
|
+
end
|
|
49
94
|
local localSelectedUnits = {}
|
|
50
95
|
local indexByLocalSelectedUnit = {}
|
|
51
96
|
local function compareUnitsSelectionPriority(a, b)
|
|
@@ -62,6 +107,11 @@ local function compareUnitsSelectionPriority(a, b)
|
|
|
62
107
|
end
|
|
63
108
|
local mainSelectedUnitChangeEvent
|
|
64
109
|
local previousMainSelectedUnit
|
|
110
|
+
local currentMainSelectedUnit
|
|
111
|
+
local lastTargetingModeState = false
|
|
112
|
+
local targetingModeEnterEvent = __TS__New(Event)
|
|
113
|
+
local targetingModeLeaveEvent = __TS__New(Event)
|
|
114
|
+
local targetingModeStateChangeEvent = __TS__New(Event)
|
|
65
115
|
____exports.LocalClient = __TS__Class()
|
|
66
116
|
local LocalClient = ____exports.LocalClient
|
|
67
117
|
LocalClient.name = "LocalClient"
|
|
@@ -92,6 +142,27 @@ function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrFlashy
|
|
|
92
142
|
)
|
|
93
143
|
end
|
|
94
144
|
end
|
|
145
|
+
function LocalClient.isKeyPressed(self, key)
|
|
146
|
+
return isKeyPressed(key)
|
|
147
|
+
end
|
|
148
|
+
function LocalClient.isMetaKeyPressed(self, key)
|
|
149
|
+
return isMetaKeyPressed(key)
|
|
150
|
+
end
|
|
151
|
+
function LocalClient.isMouseButtonPressed(self, button)
|
|
152
|
+
return isMouseButtonPressed(button)
|
|
153
|
+
end
|
|
154
|
+
function LocalClient.screenToFrameX(self, x)
|
|
155
|
+
return pixelToFrameX(x)
|
|
156
|
+
end
|
|
157
|
+
function LocalClient.screenToFrameY(self, y)
|
|
158
|
+
return pixelToFrameY(y)
|
|
159
|
+
end
|
|
160
|
+
function LocalClient.frameToScreenX(self, x)
|
|
161
|
+
return frameToPixelX(x)
|
|
162
|
+
end
|
|
163
|
+
function LocalClient.frameToScreenY(self, y)
|
|
164
|
+
return frameToPixelY(y)
|
|
165
|
+
end
|
|
95
166
|
LocalClient.locale = getLocale()
|
|
96
167
|
__TS__ObjectDefineProperty(
|
|
97
168
|
LocalClient,
|
|
@@ -107,6 +178,13 @@ __TS__ObjectDefineProperty(
|
|
|
107
178
|
return getLocalClientHeight()
|
|
108
179
|
end}
|
|
109
180
|
)
|
|
181
|
+
__TS__ObjectDefineProperty(
|
|
182
|
+
LocalClient,
|
|
183
|
+
"isSD",
|
|
184
|
+
{get = function(self)
|
|
185
|
+
return true
|
|
186
|
+
end}
|
|
187
|
+
)
|
|
110
188
|
__TS__ObjectDefineProperty(
|
|
111
189
|
LocalClient,
|
|
112
190
|
"isHD",
|
|
@@ -114,11 +192,18 @@ __TS__ObjectDefineProperty(
|
|
|
114
192
|
return false
|
|
115
193
|
end}
|
|
116
194
|
)
|
|
195
|
+
__TS__ObjectDefineProperty(
|
|
196
|
+
LocalClient,
|
|
197
|
+
"isDE",
|
|
198
|
+
{get = function(self)
|
|
199
|
+
return false
|
|
200
|
+
end}
|
|
201
|
+
)
|
|
117
202
|
__TS__ObjectDefineProperty(
|
|
118
203
|
LocalClient,
|
|
119
204
|
"graphicsMode",
|
|
120
205
|
{get = function(self)
|
|
121
|
-
return
|
|
206
|
+
return 0
|
|
122
207
|
end}
|
|
123
208
|
)
|
|
124
209
|
__TS__ObjectDefineProperty(
|
|
@@ -128,6 +213,41 @@ __TS__ObjectDefineProperty(
|
|
|
128
213
|
return isLocalClientActive()
|
|
129
214
|
end}
|
|
130
215
|
)
|
|
216
|
+
__TS__ObjectDefineProperty(
|
|
217
|
+
LocalClient,
|
|
218
|
+
"isMinimized",
|
|
219
|
+
{get = function(self)
|
|
220
|
+
return getLocalClientHeight() == 0
|
|
221
|
+
end}
|
|
222
|
+
)
|
|
223
|
+
__TS__ObjectDefineProperty(
|
|
224
|
+
LocalClient,
|
|
225
|
+
"mouseScreenX",
|
|
226
|
+
{get = function(self)
|
|
227
|
+
return getMouseScreenPosX()
|
|
228
|
+
end}
|
|
229
|
+
)
|
|
230
|
+
__TS__ObjectDefineProperty(
|
|
231
|
+
LocalClient,
|
|
232
|
+
"mouseScreenY",
|
|
233
|
+
{get = function(self)
|
|
234
|
+
return getMouseScreenPosY()
|
|
235
|
+
end}
|
|
236
|
+
)
|
|
237
|
+
__TS__ObjectDefineProperty(
|
|
238
|
+
LocalClient,
|
|
239
|
+
"mouseFrameX",
|
|
240
|
+
{get = function(self)
|
|
241
|
+
return pixelToFrameX(getMouseScreenPosX())
|
|
242
|
+
end}
|
|
243
|
+
)
|
|
244
|
+
__TS__ObjectDefineProperty(
|
|
245
|
+
LocalClient,
|
|
246
|
+
"mouseFrameY",
|
|
247
|
+
{get = function(self)
|
|
248
|
+
return pixelToFrameY(getMouseScreenPosY())
|
|
249
|
+
end}
|
|
250
|
+
)
|
|
131
251
|
__TS__ObjectDefineProperty(
|
|
132
252
|
LocalClient,
|
|
133
253
|
"mouseFocusUnit",
|
|
@@ -139,33 +259,7 @@ __TS__ObjectDefineProperty(
|
|
|
139
259
|
LocalClient,
|
|
140
260
|
"mainSelectedUnit",
|
|
141
261
|
{get = function(self)
|
|
142
|
-
|
|
143
|
-
for i = 1, #localSelectedUnits do
|
|
144
|
-
indexByLocalSelectedUnit[localSelectedUnits[i]] = i
|
|
145
|
-
end
|
|
146
|
-
tableSort(localSelectedUnits, compareUnitsSelectionPriority)
|
|
147
|
-
local mainSelectedUnitIndex
|
|
148
|
-
if selectionButtons and #localSelectedUnits > 1 then
|
|
149
|
-
local maxButtonWidth = 0
|
|
150
|
-
for i = 0, #selectionButtons - 1 do
|
|
151
|
-
local width = selectionButtons[i + 1].width
|
|
152
|
-
if width > maxButtonWidth then
|
|
153
|
-
maxButtonWidth = width
|
|
154
|
-
mainSelectedUnitIndex = i
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
|
-
local mainSelectedUnit = localSelectedUnits[(mainSelectedUnitIndex or 0) + 1]
|
|
159
|
-
for i = 1, #localSelectedUnits do
|
|
160
|
-
indexByLocalSelectedUnit[localSelectedUnits[i]] = nil
|
|
161
|
-
localSelectedUnits[i] = nil
|
|
162
|
-
end
|
|
163
|
-
if mainSelectedUnitChangeEvent ~= nil and mainSelectedUnit ~= previousMainSelectedUnit then
|
|
164
|
-
local previousPreviousMainSelectedUnit = previousMainSelectedUnit
|
|
165
|
-
previousMainSelectedUnit = mainSelectedUnit
|
|
166
|
-
Event.invoke(mainSelectedUnitChangeEvent, previousPreviousMainSelectedUnit, previousMainSelectedUnit)
|
|
167
|
-
end
|
|
168
|
-
return mainSelectedUnit
|
|
262
|
+
return currentMainSelectedUnit
|
|
169
263
|
end}
|
|
170
264
|
)
|
|
171
265
|
__TS__ObjectDefineProperty(
|
|
@@ -174,13 +268,20 @@ __TS__ObjectDefineProperty(
|
|
|
174
268
|
{get = function(self)
|
|
175
269
|
if mainSelectedUnitChangeEvent == nil then
|
|
176
270
|
mainSelectedUnitChangeEvent = __TS__New(Event)
|
|
177
|
-
Timer.onPeriod[1 / 64]:addListener(function()
|
|
178
|
-
local _ = ____exports.LocalClient.mainSelectedUnit
|
|
179
|
-
end)
|
|
180
271
|
end
|
|
181
272
|
return mainSelectedUnitChangeEvent
|
|
182
273
|
end}
|
|
183
274
|
)
|
|
275
|
+
__TS__ObjectDefineProperty(
|
|
276
|
+
LocalClient,
|
|
277
|
+
"isInTargetingMode",
|
|
278
|
+
{get = function(self)
|
|
279
|
+
return actualizeTargetingModeState()
|
|
280
|
+
end}
|
|
281
|
+
)
|
|
282
|
+
LocalClient.targetingModeEnterEvent = targetingModeEnterEvent
|
|
283
|
+
LocalClient.targetingModeLeaveEvent = targetingModeLeaveEvent
|
|
284
|
+
LocalClient.targetingModeStateChangeEvent = targetingModeStateChangeEvent
|
|
184
285
|
LocalClient.onDisconnect = __TS__New(
|
|
185
286
|
TriggerEvent,
|
|
186
287
|
function(trigger)
|
|
@@ -188,11 +289,220 @@ LocalClient.onDisconnect = __TS__New(
|
|
|
188
289
|
end,
|
|
189
290
|
function() return end
|
|
190
291
|
)
|
|
292
|
+
local function actualizeMainSelectedUnit()
|
|
293
|
+
Unit:getSelectionOf(Player["local"], localSelectedUnits)
|
|
294
|
+
for i = 1, #localSelectedUnits do
|
|
295
|
+
indexByLocalSelectedUnit[localSelectedUnits[i]] = i
|
|
296
|
+
end
|
|
297
|
+
tableSort(localSelectedUnits, compareUnitsSelectionPriority)
|
|
298
|
+
local mainSelectedUnitIndex
|
|
299
|
+
if #localSelectedUnits > 1 then
|
|
300
|
+
local selectionButtons = getSelectionButtons()
|
|
301
|
+
mainSelectedUnitIndex = getMainSelectedUnitIndex(
|
|
302
|
+
selectionButtons,
|
|
303
|
+
selectionButtons:getChildrenCount()
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
local mainSelectedUnit = localSelectedUnits[(#localSelectedUnits > 1 and (mainSelectedUnitIndex or 0) or 0) + 1]
|
|
307
|
+
for i = 1, #localSelectedUnits do
|
|
308
|
+
indexByLocalSelectedUnit[localSelectedUnits[i]] = nil
|
|
309
|
+
localSelectedUnits[i] = nil
|
|
310
|
+
end
|
|
311
|
+
currentMainSelectedUnit = mainSelectedUnit
|
|
312
|
+
if mainSelectedUnitChangeEvent ~= nil and mainSelectedUnit ~= previousMainSelectedUnit then
|
|
313
|
+
local previousPreviousMainSelectedUnit = previousMainSelectedUnit
|
|
314
|
+
previousMainSelectedUnit = mainSelectedUnit
|
|
315
|
+
Event.invoke(mainSelectedUnitChangeEvent, previousPreviousMainSelectedUnit, previousMainSelectedUnit)
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
local commandButtons = array(
|
|
319
|
+
12,
|
|
320
|
+
function(i) return Frame:byOrigin(ORIGIN_FRAME_COMMAND_BUTTON, i) end
|
|
321
|
+
)
|
|
322
|
+
local function getTargetingModeState()
|
|
323
|
+
for i = 0, 10 do
|
|
324
|
+
if commandButtons[i + 1].visible then
|
|
325
|
+
return false
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
return commandButtons[12].visible
|
|
329
|
+
end
|
|
330
|
+
actualizeTargetingModeState = function()
|
|
331
|
+
if getTargetingModeState() then
|
|
332
|
+
if not lastTargetingModeState then
|
|
333
|
+
lastTargetingModeState = true
|
|
334
|
+
Event.invoke(targetingModeEnterEvent)
|
|
335
|
+
Event.invoke(targetingModeStateChangeEvent)
|
|
336
|
+
end
|
|
337
|
+
return true
|
|
338
|
+
end
|
|
339
|
+
if lastTargetingModeState then
|
|
340
|
+
lastTargetingModeState = false
|
|
341
|
+
Event.invoke(targetingModeLeaveEvent)
|
|
342
|
+
Event.invoke(targetingModeStateChangeEvent)
|
|
343
|
+
end
|
|
344
|
+
return false
|
|
345
|
+
end
|
|
346
|
+
Timer.onPeriod[1 / 64]:addListener(function()
|
|
347
|
+
actualizeTargetingModeState()
|
|
348
|
+
end)
|
|
349
|
+
local function initializeSelectionFrames()
|
|
350
|
+
local checkProgress, onMessage, observeSelection, retryTimer
|
|
351
|
+
local warmups = {}
|
|
352
|
+
local warmupByPlayer = {}
|
|
353
|
+
local dummyUnits = {}
|
|
354
|
+
local socket = __TS__New(Socket)
|
|
355
|
+
local finished = false
|
|
356
|
+
local transitionPending = false
|
|
357
|
+
local sent12 = false
|
|
358
|
+
local sent24 = false
|
|
359
|
+
local function retrySelection()
|
|
360
|
+
for ____, warmup in ipairs(warmups) do
|
|
361
|
+
do
|
|
362
|
+
if not warmup.player.isPlaying or warmup.hasSeen12 and warmup.hasSeen24 then
|
|
363
|
+
goto __continue58
|
|
364
|
+
end
|
|
365
|
+
local count = warmup.hasSeen24 and 12 or 24
|
|
366
|
+
if warmup.player == Player["local"] then
|
|
367
|
+
local selection = Unit:getSelectionOf(Player["local"])
|
|
368
|
+
local normalSelection = __TS__ArrayFilter(
|
|
369
|
+
selection,
|
|
370
|
+
function(____, unit) return not (dummyUnits[unit] ~= nil) end
|
|
371
|
+
)
|
|
372
|
+
if #normalSelection > 0 or #selection == 0 then
|
|
373
|
+
warmup.previousSelection = normalSelection
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
warmup.player:clearSelection()
|
|
377
|
+
for i = 0, count - 1 do
|
|
378
|
+
warmup.player:select(warmup.units[i + 1])
|
|
379
|
+
end
|
|
380
|
+
if count == 12 and #warmup.units == 24 then
|
|
381
|
+
for i = 23, 12, -1 do
|
|
382
|
+
warmup.units[i + 1]:destroy()
|
|
383
|
+
warmup.units[i + 1] = nil
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
::__continue58::
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
local function finish()
|
|
391
|
+
finished = true
|
|
392
|
+
retryTimer:destroy()
|
|
393
|
+
Timer.onPeriod[1 / 64]:removeListener(observeSelection)
|
|
394
|
+
socket.onMessage:removeListener(onMessage)
|
|
395
|
+
Player.onLeave:removeListener(checkProgress)
|
|
396
|
+
local restoreSelection
|
|
397
|
+
local selection = Unit:getSelectionOf(Player["local"])
|
|
398
|
+
for ____, unit in ipairs(selection) do
|
|
399
|
+
if dummyUnits[unit] ~= nil then
|
|
400
|
+
restoreSelection = __TS__ArrayFilter(
|
|
401
|
+
selection,
|
|
402
|
+
function(____, selected) return not (dummyUnits[selected] ~= nil) end
|
|
403
|
+
)
|
|
404
|
+
if #restoreSelection == 0 then
|
|
405
|
+
local ____opt_0 = warmupByPlayer[Player["local"]]
|
|
406
|
+
restoreSelection = ____opt_0 and ____opt_0.previousSelection
|
|
407
|
+
end
|
|
408
|
+
Player["local"]:clearSelection()
|
|
409
|
+
break
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
for ____, warmup in ipairs(warmups) do
|
|
413
|
+
for ____, unit in ipairs(warmup.units) do
|
|
414
|
+
unit:destroy()
|
|
415
|
+
end
|
|
416
|
+
warmup.units = {}
|
|
417
|
+
end
|
|
418
|
+
if restoreSelection ~= nil then
|
|
419
|
+
for ____, unit in ipairs(restoreSelection) do
|
|
420
|
+
if getUnitTypeId(unit.handle) ~= 0 then
|
|
421
|
+
Player["local"]:select(unit)
|
|
422
|
+
end
|
|
423
|
+
end
|
|
424
|
+
end
|
|
425
|
+
Timer.onPeriod[1 / 64]:addListener(actualizeMainSelectedUnit)
|
|
426
|
+
end
|
|
427
|
+
checkProgress = function()
|
|
428
|
+
if finished or transitionPending then
|
|
429
|
+
return
|
|
430
|
+
end
|
|
431
|
+
for ____, warmup in ipairs(warmups) do
|
|
432
|
+
if warmup.player.isPlaying and (not warmup.hasSeen12 or not warmup.hasSeen24) then
|
|
433
|
+
return
|
|
434
|
+
end
|
|
435
|
+
end
|
|
436
|
+
transitionPending = true
|
|
437
|
+
Timer:simple(1 / 64, finish)
|
|
438
|
+
end
|
|
439
|
+
onMessage = function(player, layout)
|
|
440
|
+
local warmup = warmupByPlayer[player]
|
|
441
|
+
if warmup == nil or not player.isPlaying then
|
|
442
|
+
return
|
|
443
|
+
end
|
|
444
|
+
if layout == "12" then
|
|
445
|
+
warmup.hasSeen12 = true
|
|
446
|
+
elseif layout == "24" then
|
|
447
|
+
warmup.hasSeen24 = true
|
|
448
|
+
else
|
|
449
|
+
return
|
|
450
|
+
end
|
|
451
|
+
checkProgress()
|
|
452
|
+
end
|
|
453
|
+
observeSelection = function()
|
|
454
|
+
if not (warmupByPlayer[Player["local"]] ~= nil) or not Player["local"].isPlaying then
|
|
455
|
+
return
|
|
456
|
+
end
|
|
457
|
+
local localSelectionCount = #Unit:getSelectionOf(Player["local"])
|
|
458
|
+
if not sent12 and localSelectionCount >= 2 and localSelectionCount <= 12 then
|
|
459
|
+
socket:send("12")
|
|
460
|
+
sent12 = true
|
|
461
|
+
elseif not sent24 and localSelectionCount >= 13 and localSelectionCount <= 24 then
|
|
462
|
+
socket:send("24")
|
|
463
|
+
sent24 = true
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
for ____, player in ipairs(Player.all) do
|
|
467
|
+
if player.isUser and player.isPlaying then
|
|
468
|
+
local warmup = {
|
|
469
|
+
player = player,
|
|
470
|
+
units = {},
|
|
471
|
+
previousSelection = player == Player["local"] and Unit:getSelectionOf(player) or ({}),
|
|
472
|
+
hasSeen12 = false,
|
|
473
|
+
hasSeen24 = false
|
|
474
|
+
}
|
|
475
|
+
warmups[#warmups + 1] = warmup
|
|
476
|
+
warmupByPlayer[player] = warmup
|
|
477
|
+
for i = 0, 23 do
|
|
478
|
+
local unit = assert(Unit:create(
|
|
479
|
+
player,
|
|
480
|
+
selectionWarmupUnitTypeId,
|
|
481
|
+
0,
|
|
482
|
+
0,
|
|
483
|
+
0
|
|
484
|
+
))
|
|
485
|
+
unit.isPaused = true
|
|
486
|
+
warmup.units[i + 1] = unit
|
|
487
|
+
dummyUnits[unit] = true
|
|
488
|
+
end
|
|
489
|
+
end
|
|
490
|
+
end
|
|
491
|
+
socket.onMessage:addListener(onMessage)
|
|
492
|
+
Player.onLeave:addListener(checkProgress)
|
|
493
|
+
Timer.onPeriod[1 / 64]:addListener(observeSelection)
|
|
494
|
+
retryTimer = Timer:periodic(1, retrySelection)
|
|
495
|
+
observeSelection()
|
|
496
|
+
retrySelection()
|
|
497
|
+
checkProgress()
|
|
498
|
+
end
|
|
191
499
|
warpack.afterMapInit(function()
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
)
|
|
500
|
+
local isDE = loadTOCFile(deTocPath)
|
|
501
|
+
local isHD = not isDE and loadTOCFile(hdTocPath)
|
|
502
|
+
rawset(____exports.LocalClient, "isDE", isDE)
|
|
503
|
+
rawset(____exports.LocalClient, "isHD", isHD)
|
|
504
|
+
rawset(____exports.LocalClient, "isSD", not isDE and not isHD)
|
|
505
|
+
rawset(____exports.LocalClient, "graphicsMode", isDE and 2 or (isHD and 1 or 0))
|
|
197
506
|
end)
|
|
507
|
+
Timer:run(initializeSelectionFrames)
|
|
198
508
|
return ____exports
|
|
@@ -11,8 +11,9 @@ export declare const enum SoundSetName {
|
|
|
11
11
|
ALTAR_OF_ELDERS = "AltarOfElders",
|
|
12
12
|
ALTAR_OF_KINGS = "AltarOfKings",
|
|
13
13
|
ALTAR_OF_STORMS = "AltarOfStorms",
|
|
14
|
-
ARCHMAGE = "
|
|
14
|
+
ARCHMAGE = "HeroArchMage",
|
|
15
15
|
BANDIT = "Bandit",
|
|
16
|
+
BANSHEE = "Banshee",
|
|
16
17
|
BLOOD_MAGE = "BloodElfSorceror",
|
|
17
18
|
BREWMASTER = "PandarenBrewmaster",
|
|
18
19
|
CLOCKWERK_GOBLIN = "ClockwerkGoblin",
|
|
@@ -20,16 +21,26 @@ export declare const enum SoundSetName {
|
|
|
20
21
|
DEATH_KNIGHT = "HeroDeathKnight",
|
|
21
22
|
DEMON_HUNTER = "HeroDemonHunter",
|
|
22
23
|
DEMON_HUNTER_MORPHED = "HeroDemonHunterMorphed",
|
|
23
|
-
|
|
24
|
+
EVIL_ARTHAS = "EvilArthas",
|
|
24
25
|
FEL_ORC_GRUNT = "ChaosGrunt",
|
|
26
|
+
FEMALE_CENTAUR = "FemaleCentaur",
|
|
25
27
|
FEMALE_DEMON_HUNTER = "HeroFemaleDemonHunter",
|
|
26
28
|
FEMALE_DEMON_HUNTER_MORPHED = "HeroFemaleDemonHunterMorphed",
|
|
29
|
+
FOOTMAN = "Footman",
|
|
30
|
+
FOREST_TROLL = "ForestTroll",
|
|
27
31
|
FURBOLG = "Furbolg",
|
|
28
32
|
GOBLIN_SAPPER = "GoblinSapper",
|
|
33
|
+
GROM = "Grom",
|
|
29
34
|
GRUNT = "Grunt",
|
|
35
|
+
ILLIDAN = "Illidan",
|
|
30
36
|
MOUNTAIN_KING = "HeroMountainKing",
|
|
31
37
|
NERUBIAN = "Nerubian",
|
|
32
38
|
PALADIN = "HeroPaladin",
|
|
39
|
+
PRIEST = "Priest",
|
|
40
|
+
REVENANT = "Revenant",
|
|
33
41
|
RIFLEMAN = "Rifleman",
|
|
34
|
-
|
|
42
|
+
SKELETON = "Skeleton",
|
|
43
|
+
SNAP_DRAGON = "SnapDragon",
|
|
44
|
+
TINKER = "HeroTinker",
|
|
45
|
+
WARDEN = "HeroWarden"
|
|
35
46
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
import { EnsnareAbilityType } from "./ensnare";
|
|
3
|
+
import { AbilityTypeId } from "../ability-type";
|
|
4
|
+
import { ObjectDataEntryLevelFieldValueSupplier } from "../../entry";
|
|
5
|
+
/**
|
|
6
|
+
* Apprehend (Aena) — ensnare with stun/attack speed/bonus damage/silence extensions (Data D-G).
|
|
7
|
+
*/
|
|
8
|
+
export declare class ApprehendAbilityType extends EnsnareAbilityType {
|
|
9
|
+
static readonly BASE_ID: AbilityTypeId;
|
|
10
|
+
/** Stun Duration */
|
|
11
|
+
get stunDuration(): number[];
|
|
12
|
+
set stunDuration(stunDuration: ObjectDataEntryLevelFieldValueSupplier<number>);
|
|
13
|
+
/** Attack Speed Reduction Percent */
|
|
14
|
+
get attackSpeedReductionPercentage(): number[];
|
|
15
|
+
set attackSpeedReductionPercentage(attackSpeedReductionPercentage: ObjectDataEntryLevelFieldValueSupplier<number>);
|
|
16
|
+
/** Bonus Damage Taken Percent */
|
|
17
|
+
get bonusDamageTakenPercentage(): number[];
|
|
18
|
+
set bonusDamageTakenPercentage(bonusDamageTakenPercentage: ObjectDataEntryLevelFieldValueSupplier<number>);
|
|
19
|
+
/** Silences When Ensnared */
|
|
20
|
+
get silencesWhenEnsnared(): boolean[];
|
|
21
|
+
set silencesWhenEnsnared(silencesWhenEnsnared: ObjectDataEntryLevelFieldValueSupplier<boolean>);
|
|
22
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
5
|
+
local ____exports = {}
|
|
6
|
+
local ____ensnare = require("engine.object-data.entry.ability-type.ensnare")
|
|
7
|
+
local EnsnareAbilityType = ____ensnare.EnsnareAbilityType
|
|
8
|
+
--- Apprehend (Aena) — ensnare with stun/attack speed/bonus damage/silence extensions (Data D-G).
|
|
9
|
+
____exports.ApprehendAbilityType = __TS__Class()
|
|
10
|
+
local ApprehendAbilityType = ____exports.ApprehendAbilityType
|
|
11
|
+
ApprehendAbilityType.name = "ApprehendAbilityType"
|
|
12
|
+
__TS__ClassExtends(ApprehendAbilityType, EnsnareAbilityType)
|
|
13
|
+
ApprehendAbilityType.BASE_ID = fourCC("Aena")
|
|
14
|
+
__TS__SetDescriptor(
|
|
15
|
+
ApprehendAbilityType.prototype,
|
|
16
|
+
"stunDuration",
|
|
17
|
+
{
|
|
18
|
+
get = function(self)
|
|
19
|
+
return self:getNumberLevelField("Ens4")
|
|
20
|
+
end,
|
|
21
|
+
set = function(self, stunDuration)
|
|
22
|
+
self:setNumberLevelField("Ens4", stunDuration)
|
|
23
|
+
end
|
|
24
|
+
},
|
|
25
|
+
true
|
|
26
|
+
)
|
|
27
|
+
__TS__SetDescriptor(
|
|
28
|
+
ApprehendAbilityType.prototype,
|
|
29
|
+
"attackSpeedReductionPercentage",
|
|
30
|
+
{
|
|
31
|
+
get = function(self)
|
|
32
|
+
return self:getNumberLevelField("Ens5")
|
|
33
|
+
end,
|
|
34
|
+
set = function(self, attackSpeedReductionPercentage)
|
|
35
|
+
self:setNumberLevelField("Ens5", attackSpeedReductionPercentage)
|
|
36
|
+
end
|
|
37
|
+
},
|
|
38
|
+
true
|
|
39
|
+
)
|
|
40
|
+
__TS__SetDescriptor(
|
|
41
|
+
ApprehendAbilityType.prototype,
|
|
42
|
+
"bonusDamageTakenPercentage",
|
|
43
|
+
{
|
|
44
|
+
get = function(self)
|
|
45
|
+
return self:getNumberLevelField("Ens6")
|
|
46
|
+
end,
|
|
47
|
+
set = function(self, bonusDamageTakenPercentage)
|
|
48
|
+
self:setNumberLevelField("Ens6", bonusDamageTakenPercentage)
|
|
49
|
+
end
|
|
50
|
+
},
|
|
51
|
+
true
|
|
52
|
+
)
|
|
53
|
+
__TS__SetDescriptor(
|
|
54
|
+
ApprehendAbilityType.prototype,
|
|
55
|
+
"silencesWhenEnsnared",
|
|
56
|
+
{
|
|
57
|
+
get = function(self)
|
|
58
|
+
return self:getBooleanLevelField("Ens7")
|
|
59
|
+
end,
|
|
60
|
+
set = function(self, silencesWhenEnsnared)
|
|
61
|
+
self:setBooleanLevelField("Ens7", silencesWhenEnsnared)
|
|
62
|
+
end
|
|
63
|
+
},
|
|
64
|
+
true
|
|
65
|
+
)
|
|
66
|
+
return ____exports
|