warscript 0.0.1-dev.1e8ee27 → 0.0.1-dev.1fcc915
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/dummy.lua +4 -2
- package/core/types/effect.d.ts +11 -1
- package/core/types/effect.lua +43 -77
- package/core/types/frame.d.ts +16 -2
- package/core/types/frame.lua +81 -66
- package/core/types/handle.lua +9 -9
- package/core/types/missile.lua +6 -11
- 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/tileCell.d.ts +7 -2
- package/core/types/tileCell.lua +11 -0
- package/core/types/unit.d.ts +5 -0
- package/core/types/unit.lua +5 -0
- package/core/util.d.ts +3 -1
- package/core/util.lua +109 -3
- package/decl/native.d.ts +706 -7
- package/engine/ability-type-extended-tooltip.d.ts +8 -0
- package/engine/ability-type-extended-tooltip.lua +44 -0
- package/engine/behaviour/ability/apply-unit-behavior.lua +5 -0
- package/engine/behaviour/ability/damage.d.ts +1 -0
- package/engine/behaviour/ability/damage.lua +12 -14
- package/engine/behaviour/ability/emulate-impact.d.ts +14 -0
- package/engine/behaviour/ability/emulate-impact.lua +75 -2
- package/engine/behaviour/ability/instant-impact.d.ts +12 -1
- package/engine/behaviour/ability/instant-impact.lua +17 -2
- package/engine/behaviour/ability/on-command-impact.d.ts +1 -0
- package/engine/behaviour/ability/on-command-impact.lua +1 -0
- package/engine/behaviour/ability.d.ts +8 -0
- package/engine/behaviour/ability.lua +89 -8
- package/engine/behaviour/unit.d.ts +1 -0
- package/engine/behaviour/unit.lua +1 -0
- package/engine/buff.d.ts +65 -54
- package/engine/buff.lua +318 -243
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +7 -0
- package/engine/internal/ability.lua +65 -36
- package/engine/internal/item/owner-cache.d.ts +5 -0
- package/engine/internal/item/owner-cache.lua +4 -0
- package/engine/internal/item+owner.d.ts +2 -0
- package/engine/internal/item+owner.lua +27 -4
- package/engine/internal/item.d.ts +20 -1
- package/engine/internal/item.lua +146 -20
- package/engine/internal/misc/unit-ability-level-natives.d.ts +2 -0
- package/engine/internal/misc/unit-ability-level-natives.lua +12 -0
- package/engine/internal/object-data/health-regeneration-rate-increase.d.ts +2 -0
- package/engine/internal/object-data/health-regeneration-rate-increase.lua +48 -0
- package/engine/internal/object-data/returned-melee-damage-factor.d.ts +2 -0
- package/engine/internal/object-data/returned-melee-damage-factor.lua +21 -0
- package/engine/internal/unit/ability.lua +16 -0
- package/engine/internal/unit/add-item-to-slot-init.lua +3 -14
- package/engine/internal/unit/add-item-to-slot.lua +53 -12
- package/engine/internal/unit/appearance.d.ts +15 -0
- package/engine/internal/unit/appearance.lua +85 -0
- package/engine/internal/unit/bonus.d.ts +11 -0
- package/engine/internal/unit/bonus.lua +80 -5
- package/engine/internal/unit/buff.d.ts +2 -2
- package/engine/internal/unit/buff.lua +34 -19
- package/engine/internal/unit/equipment-inventory.d.ts +44 -0
- package/engine/internal/unit/equipment-inventory.lua +233 -0
- package/engine/internal/unit/expiration-timer.lua +1 -1
- package/engine/internal/unit/extended-inventory.d.ts +25 -0
- package/engine/internal/unit/extended-inventory.lua +99 -0
- package/engine/internal/unit/ignore-events-items.lua +10 -1
- package/engine/internal/unit/{item.d.ts → inventory.d.ts} +7 -3
- package/engine/internal/unit/inventory.lua +87 -0
- package/engine/internal/unit/item-container.d.ts +25 -0
- package/engine/internal/unit/item-container.lua +11 -0
- package/engine/internal/unit/item-order-events.d.ts +17 -0
- package/engine/internal/unit/item-order-events.lua +67 -0
- package/engine/internal/unit/item-slot.d.ts +27 -0
- package/engine/internal/unit/item-slot.lua +92 -0
- package/engine/internal/unit/order.d.ts +3 -3
- package/engine/internal/unit/order.lua +10 -10
- package/engine/internal/unit+ability.d.ts +2 -1
- package/engine/internal/unit+ability.lua +73 -2
- package/engine/internal/unit+damage.d.ts +9 -0
- package/engine/internal/unit+damage.lua +33 -0
- package/engine/internal/unit+rally.lua +9 -31
- package/engine/internal/unit-missile-data.lua +58 -32
- package/engine/internal/unit-missile-launch.lua +13 -13
- package/engine/internal/unit.d.ts +2 -10
- package/engine/internal/unit.lua +53 -100
- package/engine/local-client.d.ts +21 -0
- package/engine/local-client.lua +242 -57
- package/engine/object-data/auxiliary/attachment-preset.d.ts +7 -0
- package/engine/object-data/auxiliary/attachment-preset.lua +7 -0
- 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 +12 -0
- package/engine/object-data/auxiliary/equipment-type.lua +26 -0
- package/engine/object-data/auxiliary/item-class.d.ts +11 -0
- package/engine/object-data/auxiliary/item-class.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/order-type.d.ts +939 -0
- package/engine/object-data/auxiliary/order-type.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/aura-of-blight.d.ts +13 -0
- package/engine/object-data/entry/ability-type/aura-of-blight.lua +39 -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/barrage.d.ts +12 -0
- package/engine/object-data/entry/ability-type/barrage.lua +52 -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.lua +2 -2
- package/engine/object-data/entry/ability-type/blank-passive-with-cooldown.d.ts +23 -0
- package/engine/object-data/entry/ability-type/blank-passive-with-cooldown.lua +112 -0
- package/engine/object-data/entry/ability-type/blank-passive.d.ts +4 -0
- package/engine/object-data/entry/ability-type/blank-passive.lua +27 -7
- package/engine/object-data/entry/ability-type/breath-of-fire.d.ts +11 -0
- package/engine/object-data/entry/ability-type/breath-of-fire.lua +27 -0
- package/engine/object-data/entry/ability-type/channel.d.ts +2 -2
- package/engine/object-data/entry/ability-type/channel.lua +3 -3
- 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/exhume-corpses.d.ts +14 -0
- package/engine/object-data/entry/ability-type/exhume-corpses.lua +40 -0
- package/engine/object-data/entry/ability-type/firebolt.d.ts +7 -0
- package/engine/object-data/entry/ability-type/firebolt.lua +13 -0
- package/engine/object-data/entry/ability-type/flame-strike.d.ts +25 -0
- package/engine/object-data/entry/ability-type/flame-strike.lua +92 -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/healing-ward-aura.d.ts +13 -0
- package/engine/object-data/entry/ability-type/healing-ward-aura.lua +39 -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/item-life-regeneration.d.ts +10 -0
- package/engine/object-data/entry/ability-type/item-life-regeneration.lua +26 -0
- package/engine/object-data/entry/ability-type/life-drain.d.ts +37 -0
- package/engine/object-data/entry/ability-type/life-drain.lua +144 -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/rain-of-fire.d.ts +7 -0
- package/engine/object-data/entry/ability-type/rain-of-fire.lua +13 -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-burn.d.ts +22 -0
- package/engine/object-data/entry/ability-type/soul-burn.lua +79 -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 +33 -8
- package/engine/object-data/entry/ability-type.lua +256 -48
- package/engine/object-data/entry/buff-type/applicable.lua +10 -3
- 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 +18 -3
- package/engine/object-data/entry/item-type.lua +84 -0
- package/engine/object-data/entry/lightning-type.d.ts +6 -8
- package/engine/object-data/entry/lightning-type.lua +1 -1
- package/engine/object-data/entry/sound-preset.d.ts +2 -2
- package/engine/object-data/entry/unit-type.d.ts +57 -2
- package/engine/object-data/entry/unit-type.lua +412 -64
- package/engine/object-data/entry/upgrade.d.ts +2 -2
- package/engine/object-data/entry.d.ts +6 -1
- package/engine/object-data/entry.lua +8 -0
- package/engine/random.lua +1 -1
- package/engine/standard/entries/ability-type.d.ts +3102 -7
- package/engine/standard/entries/ability-type.lua +0 -6
- package/engine/standard/entries/buff-type.d.ts +45 -0
- package/engine/standard/entries/buff-type.lua +43 -0
- package/engine/standard/entries/item-type.d.ts +1299 -0
- package/engine/standard/entries/item-type.lua +2 -0
- package/engine/standard/entries/lightning-type.d.ts +42 -15
- package/engine/standard/entries/lightning-type.lua +0 -14
- package/engine/standard/entries/unit-type.d.ts +5 -0
- package/engine/standard/entries/unit-type.lua +5 -0
- package/engine/standard/fields/ability.d.ts +2 -2
- package/engine/standard/fields/ability.lua +2 -2
- package/engine/unit.d.ts +5 -1
- package/engine/unit.lua +5 -1
- package/event.d.ts +1 -1
- package/network.lua +25 -1
- package/objutil/buff.lua +1 -1
- package/operation.d.ts +8 -1
- package/operation.lua +37 -14
- package/package.json +2 -22
- package/utility/arrays.d.ts +7 -1
- package/utility/arrays.lua +17 -0
- package/utility/random.d.ts +102 -0
- package/utility/random.lua +273 -0
- package/engine/internal/unit/item.lua +0 -78
package/engine/buff.lua
CHANGED
|
@@ -14,6 +14,7 @@ local Unit = ____unit.Unit
|
|
|
14
14
|
local ____applicable = require("engine.object-data.entry.buff-type.applicable")
|
|
15
15
|
local internalApplyBuff = ____applicable.internalApplyBuff
|
|
16
16
|
local removeBuff = ____applicable.removeBuff
|
|
17
|
+
local removeBuffApplicator = ____applicable.removeBuffApplicator
|
|
17
18
|
local ____ability = require("engine.internal.ability")
|
|
18
19
|
local Ability = ____ability.Ability
|
|
19
20
|
local UnitAbility = ____ability.UnitAbility
|
|
@@ -58,6 +59,9 @@ local ____ability = require("engine.behaviour.ability")
|
|
|
58
59
|
local AbilityBehavior = ____ability.AbilityBehavior
|
|
59
60
|
local ____records = require("utility.records")
|
|
60
61
|
local sortedKeysUnnested = ____records.sortedKeysUnnested
|
|
62
|
+
local ____sound = require("core.types.sound")
|
|
63
|
+
local Sound3D = ____sound.Sound3D
|
|
64
|
+
local SoundSettings = ____sound.SoundSettings
|
|
61
65
|
local getUnitAbility = BlzGetUnitAbility
|
|
62
66
|
local stringValueByBuffTypeIdByFieldId = postcompile(function()
|
|
63
67
|
local stringValueByBuffTypeIdByFieldId = {}
|
|
@@ -112,6 +116,7 @@ local buffParametersKeys = {
|
|
|
112
116
|
missProbability = true,
|
|
113
117
|
damageFactor = true,
|
|
114
118
|
receivedDamageFactor = true,
|
|
119
|
+
returnedMeleeDamageFactor = true,
|
|
115
120
|
receivedMagicDamageFactor = true,
|
|
116
121
|
durationIncreaseOnAutoAttack = true,
|
|
117
122
|
maximumDuration = true,
|
|
@@ -131,6 +136,7 @@ local buffParametersKeys = {
|
|
|
131
136
|
maximumDamageAbsorbed = true,
|
|
132
137
|
destroysOnMaximumDamageAbsorbed = true,
|
|
133
138
|
uniqueGroup = true,
|
|
139
|
+
destructionSoundPresetId = true,
|
|
134
140
|
damageOnExpiration = true,
|
|
135
141
|
healingOnExpiration = true,
|
|
136
142
|
killsOnExpiration = true,
|
|
@@ -206,6 +212,7 @@ local buffNumberParameters = {
|
|
|
206
212
|
"maxManaIncrease",
|
|
207
213
|
"damageFactor",
|
|
208
214
|
"receivedDamageFactor",
|
|
215
|
+
"returnedMeleeDamageFactor",
|
|
209
216
|
"maximumAutoAttackCount",
|
|
210
217
|
"maximumDamageDealtEventCount",
|
|
211
218
|
"maximumDamageReceivedEventCount",
|
|
@@ -254,17 +261,21 @@ local function destroyBuff(buff)
|
|
|
254
261
|
buff:destroy()
|
|
255
262
|
end
|
|
256
263
|
local function expireBuff(buff)
|
|
257
|
-
|
|
258
|
-
|
|
264
|
+
if buff.isDestroyed or buff[100] ~= 1 then
|
|
265
|
+
return
|
|
266
|
+
end
|
|
267
|
+
buff[100] = 2
|
|
268
|
+
local remainingDamageOverDuration = buff[114] or 0
|
|
269
|
+
local remainingHealingOverDuration = buff[114] or 0
|
|
259
270
|
if remainingDamageOverDuration ~= 0 or remainingHealingOverDuration ~= 0 then
|
|
260
271
|
buff:flashSpecialEffect()
|
|
261
272
|
if remainingDamageOverDuration ~= 0 then
|
|
262
273
|
(buff[102] or buff[101]):damageTarget(buff[101], remainingDamageOverDuration)
|
|
263
|
-
buff[
|
|
274
|
+
buff[114] = nil
|
|
264
275
|
end
|
|
265
276
|
if remainingHealingOverDuration ~= 0 then
|
|
266
277
|
(buff[102] or buff[101]):healTarget(buff[101], remainingHealingOverDuration)
|
|
267
|
-
buff[
|
|
278
|
+
buff[119] = nil
|
|
268
279
|
end
|
|
269
280
|
end
|
|
270
281
|
Timer:run(destroyBuff, buff)
|
|
@@ -272,8 +283,8 @@ local function expireBuff(buff)
|
|
|
272
283
|
end
|
|
273
284
|
local function buffDamageIntervalInitialTimerCallback(buff)
|
|
274
285
|
buffDamageIntervalTimerCallback(buff)
|
|
275
|
-
local timer = buff[
|
|
276
|
-
local damageInterval = buff[
|
|
286
|
+
local timer = buff[115]
|
|
287
|
+
local damageInterval = buff[113]
|
|
277
288
|
if timer ~= nil and damageInterval ~= nil and damageInterval > 0 then
|
|
278
289
|
timer:start(damageInterval, true, buffDamageIntervalTimerCallback, buff)
|
|
279
290
|
end
|
|
@@ -281,43 +292,43 @@ end
|
|
|
281
292
|
buffDamageIntervalTimerCallback = function(buff)
|
|
282
293
|
buff:flashSpecialEffect()
|
|
283
294
|
local source = buff[102] or buff[101]
|
|
284
|
-
local remainingDamageOverDuration = buff[
|
|
295
|
+
local remainingDamageOverDuration = buff[114] or 0
|
|
285
296
|
if remainingDamageOverDuration ~= 0 then
|
|
286
|
-
local damageInterval = buff[
|
|
297
|
+
local damageInterval = buff[113] or 0
|
|
287
298
|
if damageInterval ~= 0 then
|
|
288
299
|
local damage = remainingDamageOverDuration / (1 + buff.remainingDuration / damageInterval)
|
|
289
300
|
source:damageTarget(buff[101], damage)
|
|
290
|
-
buff[
|
|
301
|
+
buff[114] = remainingDamageOverDuration - damage
|
|
291
302
|
end
|
|
292
303
|
end
|
|
293
|
-
local damagePerInterval = buff[
|
|
304
|
+
local damagePerInterval = buff[112] or 0
|
|
294
305
|
if remainingDamageOverDuration == 0 or damagePerInterval ~= 0 then
|
|
295
306
|
source:damageTarget(buff[101], damagePerInterval)
|
|
296
307
|
end
|
|
297
308
|
end
|
|
298
309
|
local function buffHealingIntervalInitialTimerCallback(buff)
|
|
299
310
|
buffHealingIntervalTimerCallback(buff)
|
|
300
|
-
local timer = buff[
|
|
301
|
-
local healingInterval = buff[
|
|
311
|
+
local timer = buff[120]
|
|
312
|
+
local healingInterval = buff[118]
|
|
302
313
|
if timer ~= nil and healingInterval ~= nil and healingInterval > 0 then
|
|
303
314
|
timer:start(healingInterval, true, buffHealingIntervalTimerCallback, buff)
|
|
304
315
|
end
|
|
305
316
|
end
|
|
306
317
|
buffHealingIntervalTimerCallback = function(buff)
|
|
307
|
-
if buff[
|
|
318
|
+
if buff[118] ~= buff[113] then
|
|
308
319
|
buff:flashSpecialEffect()
|
|
309
320
|
end
|
|
310
321
|
local source = buff[102] or buff[101]
|
|
311
|
-
local remainingHealingOverDuration = buff[
|
|
322
|
+
local remainingHealingOverDuration = buff[119] or 0
|
|
312
323
|
if remainingHealingOverDuration ~= 0 then
|
|
313
|
-
local healingInterval = buff[
|
|
324
|
+
local healingInterval = buff[118] or 0
|
|
314
325
|
if healingInterval ~= 0 then
|
|
315
326
|
local healing = remainingHealingOverDuration / (1 + buff.remainingDuration / healingInterval)
|
|
316
327
|
source:healTarget(buff[101], healing)
|
|
317
|
-
buff[
|
|
328
|
+
buff[119] = remainingHealingOverDuration - healing
|
|
318
329
|
end
|
|
319
330
|
end
|
|
320
|
-
local healingPerInterval = buff[
|
|
331
|
+
local healingPerInterval = buff[117] or 0
|
|
321
332
|
if remainingHealingOverDuration == 0 or healingPerInterval ~= 0 then
|
|
322
333
|
source:healTarget(buff[101], healingPerInterval)
|
|
323
334
|
end
|
|
@@ -397,7 +408,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
397
408
|
local missProbability = parameters and parameters.missProbability or defaultParameters.missProbability
|
|
398
409
|
if missProbability ~= nil then
|
|
399
410
|
missProbability = resolveNumberValue(ability, level, missProbability)
|
|
400
|
-
self[
|
|
411
|
+
self[147] = missProbability
|
|
401
412
|
end
|
|
402
413
|
local buffByTypeId = buffByTypeIdByUnit[_unit]
|
|
403
414
|
if buffByTypeId == nil then
|
|
@@ -442,17 +453,18 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
442
453
|
self[102] = source
|
|
443
454
|
self[103] = duration or 0
|
|
444
455
|
self[104] = uniqueGroup
|
|
445
|
-
self[105] =
|
|
446
|
-
self[106] = BlzGetAbilityStringLevelField(self.handle,
|
|
456
|
+
self[105] = parameters and parameters.destructionSoundPresetId or defaultParameters and defaultParameters.destructionSoundPresetId
|
|
457
|
+
self[106] = BlzGetAbilityStringLevelField(self.handle, ABILITY_SLF_EFFECT, 0)
|
|
458
|
+
self[107] = BlzGetAbilityStringLevelField(self.handle, ABILITY_SLF_SPECIAL, 0)
|
|
447
459
|
if parameters ~= nil or (next(defaultParameters)) ~= nil then
|
|
448
460
|
for ____, buffBooleanParameter in ipairs(buffBooleanParameters) do
|
|
449
|
-
local
|
|
450
|
-
local
|
|
451
|
-
local
|
|
452
|
-
if
|
|
453
|
-
|
|
461
|
+
local ____ability_28 = ability
|
|
462
|
+
local ____level_29 = level
|
|
463
|
+
local ____temp_27 = parameters and parameters[buffBooleanParameter]
|
|
464
|
+
if ____temp_27 == nil then
|
|
465
|
+
____temp_27 = defaultParameters[buffBooleanParameter]
|
|
454
466
|
end
|
|
455
|
-
if resolveBooleanValue(
|
|
467
|
+
if resolveBooleanValue(____ability_28, ____level_29, ____temp_27) then
|
|
456
468
|
self[buffBooleanParameter] = true
|
|
457
469
|
end
|
|
458
470
|
end
|
|
@@ -468,11 +480,11 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
468
480
|
end
|
|
469
481
|
local maximumDuration = parameters and parameters.maximumDuration or defaultParameters.maximumDuration
|
|
470
482
|
if maximumDuration ~= nil then
|
|
471
|
-
self[
|
|
483
|
+
self[109] = resolveNumberValue(ability, level, maximumDuration)
|
|
472
484
|
end
|
|
473
485
|
local maximumRemainingDuration = parameters and parameters.maximumRemainingDuration or defaultParameters.maximumRemainingDuration
|
|
474
486
|
if maximumRemainingDuration ~= nil then
|
|
475
|
-
self[
|
|
487
|
+
self[110] = resolveNumberValue(ability, level, maximumRemainingDuration)
|
|
476
488
|
end
|
|
477
489
|
local parametersAbilityTypeIds = parameters and parameters.abilityTypeIds or defaultParameters.abilityTypeIds
|
|
478
490
|
if parametersAbilityTypeIds ~= nil then
|
|
@@ -482,7 +494,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
482
494
|
self._abilityTypeIds = abilityTypeIds
|
|
483
495
|
end
|
|
484
496
|
for ____, abilityTypeId in ipairs(sortedKeysUnnested(parametersAbilityTypeIds)) do
|
|
485
|
-
local abilityParameters = parametersAbilityTypeIds[abilityTypeId]
|
|
497
|
+
local abilityParameters = checkNotNull(parametersAbilityTypeIds[abilityTypeId])
|
|
486
498
|
local addedAbility = _unit:addAbility(abilityTypeId)
|
|
487
499
|
if addedAbility ~= nil then
|
|
488
500
|
_unit:makeAbilityPermanent(abilityTypeId, true)
|
|
@@ -535,7 +547,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
535
547
|
end
|
|
536
548
|
function Buff.prototype.onAbilityGained(self, ability)
|
|
537
549
|
if __TS__InstanceOf(ability, UnitAbility) then
|
|
538
|
-
local abilityCooldownModifier = self[
|
|
550
|
+
local abilityCooldownModifier = self[149]
|
|
539
551
|
if abilityCooldownModifier then
|
|
540
552
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:applyModifier(ability, abilityCooldownModifier)
|
|
541
553
|
end
|
|
@@ -543,7 +555,7 @@ function Buff.prototype.onAbilityGained(self, ability)
|
|
|
543
555
|
end
|
|
544
556
|
function Buff.prototype.onAbilityLost(self, ability)
|
|
545
557
|
if __TS__InstanceOf(ability, UnitAbility) then
|
|
546
|
-
local abilityCooldownModifier = self[
|
|
558
|
+
local abilityCooldownModifier = self[149]
|
|
547
559
|
if abilityCooldownModifier then
|
|
548
560
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, abilityCooldownModifier)
|
|
549
561
|
end
|
|
@@ -551,7 +563,7 @@ function Buff.prototype.onAbilityLost(self, ability)
|
|
|
551
563
|
end
|
|
552
564
|
function Buff.prototype.flashEffect(self, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
553
565
|
self:flash(
|
|
554
|
-
self[
|
|
566
|
+
self[106],
|
|
555
567
|
stringValueByBuffTypeIdByFieldId[fourCC("feft")][self.typeId] or "origin",
|
|
556
568
|
widgetOrXOrParametersOrDuration,
|
|
557
569
|
yOrParametersOrDuration,
|
|
@@ -560,7 +572,7 @@ function Buff.prototype.flashEffect(self, widgetOrXOrParametersOrDuration, yOrPa
|
|
|
560
572
|
end
|
|
561
573
|
function Buff.prototype.flashSpecialEffect(self, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
562
574
|
self:flash(
|
|
563
|
-
self[
|
|
575
|
+
self[107],
|
|
564
576
|
stringValueByBuffTypeIdByFieldId[fourCC("fspt")][self.typeId] or "origin",
|
|
565
577
|
widgetOrXOrParametersOrDuration,
|
|
566
578
|
yOrParametersOrDuration,
|
|
@@ -572,44 +584,64 @@ function Buff.prototype.flash(self, modelPath, attachmentPoint, widgetOrXOrParam
|
|
|
572
584
|
Effect:flash(modelPath, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
573
585
|
else
|
|
574
586
|
local isWidgetProvided = __TS__InstanceOf(widgetOrXOrParametersOrDuration, Unit) or __TS__InstanceOf(widgetOrXOrParametersOrDuration, Item) or __TS__InstanceOf(widgetOrXOrParametersOrDuration, Destructable)
|
|
575
|
-
local
|
|
576
|
-
local
|
|
577
|
-
local
|
|
578
|
-
local
|
|
587
|
+
local ____Effect_44 = Effect
|
|
588
|
+
local ____Effect_flash_45 = Effect.flash
|
|
589
|
+
local ____array_43 = __TS__SparseArrayNew(modelPath, isWidgetProvided and widgetOrXOrParametersOrDuration or self._unit, attachmentPoint)
|
|
590
|
+
local ____isWidgetProvided_42
|
|
579
591
|
if isWidgetProvided then
|
|
580
|
-
|
|
592
|
+
____isWidgetProvided_42 = yOrParametersOrDuration
|
|
581
593
|
else
|
|
582
|
-
|
|
594
|
+
____isWidgetProvided_42 = widgetOrXOrParametersOrDuration
|
|
583
595
|
end
|
|
584
|
-
__TS__SparseArrayPush(
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
__TS__SparseArraySpread(
|
|
596
|
+
__TS__SparseArrayPush(____array_43, ____isWidgetProvided_42)
|
|
597
|
+
____Effect_flash_45(
|
|
598
|
+
____Effect_44,
|
|
599
|
+
__TS__SparseArraySpread(____array_43)
|
|
588
600
|
)
|
|
589
601
|
end
|
|
590
602
|
end
|
|
591
603
|
function Buff.prototype.expire(self)
|
|
592
604
|
expireBuff(self)
|
|
593
605
|
end
|
|
606
|
+
function Buff.prototype.dispel(self, source)
|
|
607
|
+
if self.isDestroyed or self[100] ~= 1 then
|
|
608
|
+
return
|
|
609
|
+
end
|
|
610
|
+
self[100] = 2
|
|
611
|
+
do
|
|
612
|
+
pcall(function()
|
|
613
|
+
self:onDispel(source)
|
|
614
|
+
end)
|
|
615
|
+
do
|
|
616
|
+
self:destroy()
|
|
617
|
+
end
|
|
618
|
+
end
|
|
619
|
+
end
|
|
594
620
|
function Buff.prototype.onCreate(self)
|
|
595
621
|
end
|
|
596
622
|
function Buff.prototype.onDestroy(self)
|
|
597
623
|
check(self[100] ~= 0, "Cannot destroy a buff that has not finished creating yet.")
|
|
598
624
|
self[100] = 2
|
|
599
625
|
local unit = self._unit
|
|
626
|
+
local destructionSoundPresetId = self[105]
|
|
627
|
+
if destructionSoundPresetId ~= nil then
|
|
628
|
+
Sound3D:playFromLabel(destructionSoundPresetId, SoundSettings.Ability, unit)
|
|
629
|
+
end
|
|
600
630
|
if getUnitAbility(unit.handle, self.typeId) == self.handle then
|
|
601
631
|
removeBuff(unit.handle, self.typeId)
|
|
632
|
+
else
|
|
633
|
+
removeBuffApplicator(unit.handle, self.typeId)
|
|
602
634
|
end
|
|
603
635
|
buffByTypeIdByUnit[unit][self.typeId] = nil
|
|
604
|
-
local healingIntervalTimer = self[
|
|
636
|
+
local healingIntervalTimer = self[120]
|
|
605
637
|
if healingIntervalTimer ~= nil then
|
|
606
638
|
healingIntervalTimer:destroy()
|
|
607
|
-
self[
|
|
639
|
+
self[120] = nil
|
|
608
640
|
end
|
|
609
|
-
local damageIntervalTimer = self[
|
|
641
|
+
local damageIntervalTimer = self[115]
|
|
610
642
|
if damageIntervalTimer ~= nil then
|
|
611
643
|
damageIntervalTimer:destroy()
|
|
612
|
-
self[
|
|
644
|
+
self[115] = nil
|
|
613
645
|
end
|
|
614
646
|
if self._timer ~= nil then
|
|
615
647
|
self._timer:destroy()
|
|
@@ -619,25 +651,25 @@ function Buff.prototype.onDestroy(self)
|
|
|
619
651
|
behavior:destroy()
|
|
620
652
|
end
|
|
621
653
|
end
|
|
622
|
-
local previousAbilityCooldownModifier = self[
|
|
654
|
+
local previousAbilityCooldownModifier = self[149]
|
|
623
655
|
if previousAbilityCooldownModifier then
|
|
624
656
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
625
657
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, previousAbilityCooldownModifier)
|
|
626
658
|
end
|
|
627
659
|
end
|
|
628
|
-
if self[
|
|
660
|
+
if self[144] then
|
|
629
661
|
unit:decrementInvulnerabilityCounter()
|
|
630
662
|
end
|
|
631
|
-
if self[
|
|
663
|
+
if self[143] then
|
|
632
664
|
unit:decrementDisableAutoAttackCounter()
|
|
633
665
|
end
|
|
634
|
-
if self[
|
|
635
|
-
if self[
|
|
666
|
+
if self[141] then
|
|
667
|
+
if self[142] then
|
|
636
668
|
unit:decrementForceStunCounter()
|
|
637
669
|
end
|
|
638
670
|
unit:decrementStunCounter()
|
|
639
671
|
end
|
|
640
|
-
if self[
|
|
672
|
+
if self[140] then
|
|
641
673
|
unit:decrementGhostCounter()
|
|
642
674
|
end
|
|
643
675
|
if self._abilityTypeIds ~= nil then
|
|
@@ -674,49 +706,51 @@ function Buff.apply(self, ...)
|
|
|
674
706
|
end
|
|
675
707
|
end
|
|
676
708
|
function Buff.getByTypeId(self, unit, typeId)
|
|
677
|
-
local
|
|
678
|
-
local buff =
|
|
709
|
+
local ____opt_46 = buffByTypeIdByUnit[unit]
|
|
710
|
+
local buff = ____opt_46 and ____opt_46[typeId]
|
|
679
711
|
if __TS__InstanceOf(buff, self) then
|
|
680
712
|
return buff
|
|
681
713
|
end
|
|
682
714
|
return nil
|
|
683
715
|
end
|
|
716
|
+
function Buff.prototype.onDispel(self, source)
|
|
717
|
+
end
|
|
684
718
|
function Buff.prototype.onExpiration(self)
|
|
685
719
|
local unit = self.unit
|
|
686
|
-
if self[120] ~= nil then
|
|
687
|
-
(self[102] or unit):damageTarget(unit, self[120] or 0)
|
|
688
|
-
end
|
|
689
720
|
if self[121] ~= nil then
|
|
690
|
-
(self[102] or unit):
|
|
721
|
+
(self[102] or unit):damageTarget(unit, self[121] or 0)
|
|
722
|
+
end
|
|
723
|
+
if self[122] ~= nil then
|
|
724
|
+
(self[102] or unit):healTarget(unit, self[121] or 0)
|
|
691
725
|
end
|
|
692
|
-
if self[
|
|
726
|
+
if self[146] then
|
|
693
727
|
unit:explode()
|
|
694
|
-
elseif self[
|
|
728
|
+
elseif self[145] then
|
|
695
729
|
unit:kill()
|
|
696
730
|
end
|
|
697
731
|
end
|
|
698
732
|
function Buff.prototype.onDeath(self, source)
|
|
699
733
|
local unit = self.unit
|
|
700
|
-
if self[
|
|
734
|
+
if self[123] ~= nil then
|
|
701
735
|
damageArea(
|
|
702
736
|
self[102] or unit,
|
|
703
|
-
self[
|
|
737
|
+
self[123],
|
|
704
738
|
unit.x,
|
|
705
739
|
unit.y,
|
|
740
|
+
self[125] or 0,
|
|
706
741
|
self[124] or 0,
|
|
707
|
-
self[
|
|
742
|
+
self[127] or 0,
|
|
708
743
|
self[126] or 0,
|
|
709
|
-
self[
|
|
710
|
-
self[128] or 0
|
|
711
|
-
self[127] or 0
|
|
744
|
+
self[129] or 0,
|
|
745
|
+
self[128] or 0
|
|
712
746
|
)
|
|
713
747
|
end
|
|
714
748
|
end
|
|
715
749
|
function Buff.prototype.onDamageDealt(self, target, event)
|
|
716
750
|
if event.isAttack then
|
|
717
|
-
if self[
|
|
718
|
-
local durationIncrease = self[
|
|
719
|
-
local maximumDuration = self[
|
|
751
|
+
if self[108] ~= nil then
|
|
752
|
+
local durationIncrease = self[108]
|
|
753
|
+
local maximumDuration = self[109] or 0
|
|
720
754
|
if maximumDuration > 0 then
|
|
721
755
|
durationIncrease = min(
|
|
722
756
|
durationIncrease,
|
|
@@ -724,43 +758,43 @@ function Buff.prototype.onDamageDealt(self, target, event)
|
|
|
724
758
|
)
|
|
725
759
|
end
|
|
726
760
|
local remainingDuration = self.remainingDuration + durationIncrease
|
|
727
|
-
local maximumRemainingDuration = self[
|
|
761
|
+
local maximumRemainingDuration = self[110] or 0
|
|
728
762
|
if maximumRemainingDuration > 0 then
|
|
729
763
|
remainingDuration = min(remainingDuration, maximumRemainingDuration)
|
|
730
764
|
end
|
|
731
765
|
self.remainingDuration = remainingDuration
|
|
732
766
|
end
|
|
733
|
-
local autoAttackCount = (self[
|
|
734
|
-
self[
|
|
735
|
-
if autoAttackCount == self[
|
|
767
|
+
local autoAttackCount = (self[130] or 0) + 1
|
|
768
|
+
self[130] = autoAttackCount
|
|
769
|
+
if autoAttackCount == self[131] then
|
|
736
770
|
self:destroy()
|
|
737
771
|
end
|
|
738
772
|
end
|
|
739
773
|
if event.originalAmount ~= 0 then
|
|
740
|
-
local damageDealtEventCount = (self[
|
|
741
|
-
self[
|
|
742
|
-
if damageDealtEventCount == self[
|
|
774
|
+
local damageDealtEventCount = (self[132] or 0) + 1
|
|
775
|
+
self[132] = damageDealtEventCount
|
|
776
|
+
if damageDealtEventCount == self[133] then
|
|
743
777
|
self:destroy()
|
|
744
778
|
end
|
|
745
779
|
end
|
|
746
780
|
end
|
|
747
781
|
function Buff.prototype.onDamageReceived(self, source, event)
|
|
748
782
|
if event.originalAmount ~= 0 then
|
|
749
|
-
local absorbedDamage = min(event.amount * (self[
|
|
783
|
+
local absorbedDamage = min(event.amount * (self[136] or 1), (self[137] or 0) - (self[138] or 0))
|
|
750
784
|
if absorbedDamage > 0 then
|
|
751
785
|
event.amount = event.amount - absorbedDamage
|
|
752
|
-
self[
|
|
753
|
-
local
|
|
754
|
-
if
|
|
755
|
-
|
|
786
|
+
self[138] = (self[138] or 0) + absorbedDamage
|
|
787
|
+
local ____self__139_48 = self[139]
|
|
788
|
+
if ____self__139_48 == nil then
|
|
789
|
+
____self__139_48 = true
|
|
756
790
|
end
|
|
757
|
-
if
|
|
791
|
+
if ____self__139_48 and self[138] >= (self[137] or 0) then
|
|
758
792
|
self:destroy()
|
|
759
793
|
end
|
|
760
794
|
end
|
|
761
|
-
local damageReceivedEventCount = (self[
|
|
762
|
-
self[
|
|
763
|
-
if damageReceivedEventCount == self[
|
|
795
|
+
local damageReceivedEventCount = (self[134] or 0) + 1
|
|
796
|
+
self[134] = damageReceivedEventCount
|
|
797
|
+
if damageReceivedEventCount == self[135] then
|
|
764
798
|
self:destroy()
|
|
765
799
|
end
|
|
766
800
|
end
|
|
@@ -787,13 +821,13 @@ __TS__SetDescriptor(
|
|
|
787
821
|
"remainingDamageOverDuration",
|
|
788
822
|
{
|
|
789
823
|
get = function(self)
|
|
790
|
-
return self[
|
|
824
|
+
return self[114] or 0
|
|
791
825
|
end,
|
|
792
826
|
set = function(self, remainingDamageOverDuration)
|
|
793
|
-
local remainingDamageOverDurationDelta = remainingDamageOverDuration - (self[
|
|
794
|
-
self[
|
|
795
|
-
local damageOverDuration = (self[
|
|
796
|
-
self[
|
|
827
|
+
local remainingDamageOverDurationDelta = remainingDamageOverDuration - (self[114] or 0)
|
|
828
|
+
self[114] = remainingDamageOverDuration ~= 0 and remainingDamageOverDuration or nil
|
|
829
|
+
local damageOverDuration = (self[111] or 0) + remainingDamageOverDurationDelta
|
|
830
|
+
self[111] = damageOverDuration ~= 0 and damageOverDuration or nil
|
|
797
831
|
end
|
|
798
832
|
},
|
|
799
833
|
true
|
|
@@ -803,13 +837,13 @@ __TS__SetDescriptor(
|
|
|
803
837
|
"damageOverDuration",
|
|
804
838
|
{
|
|
805
839
|
get = function(self)
|
|
806
|
-
return self[
|
|
840
|
+
return self[111] or 0
|
|
807
841
|
end,
|
|
808
842
|
set = function(self, damageOverDuration)
|
|
809
|
-
local damageOverDurationDelta = damageOverDuration - (self[
|
|
810
|
-
self[
|
|
811
|
-
local remainingDamageOverDuration = (self[
|
|
812
|
-
self[
|
|
843
|
+
local damageOverDurationDelta = damageOverDuration - (self[111] or 0)
|
|
844
|
+
self[111] = damageOverDuration ~= 0 and damageOverDuration or nil
|
|
845
|
+
local remainingDamageOverDuration = (self[114] or 0) + damageOverDurationDelta
|
|
846
|
+
self[114] = remainingDamageOverDuration ~= 0 and remainingDamageOverDuration or nil
|
|
813
847
|
end
|
|
814
848
|
},
|
|
815
849
|
true
|
|
@@ -819,10 +853,10 @@ __TS__SetDescriptor(
|
|
|
819
853
|
"damagePerInterval",
|
|
820
854
|
{
|
|
821
855
|
get = function(self)
|
|
822
|
-
return self[
|
|
856
|
+
return self[112] or 0
|
|
823
857
|
end,
|
|
824
858
|
set = function(self, damagePerInterval)
|
|
825
|
-
self[
|
|
859
|
+
self[112] = damagePerInterval ~= 0 and damagePerInterval or nil
|
|
826
860
|
end
|
|
827
861
|
},
|
|
828
862
|
true
|
|
@@ -832,25 +866,25 @@ __TS__SetDescriptor(
|
|
|
832
866
|
"damageInterval",
|
|
833
867
|
{
|
|
834
868
|
get = function(self)
|
|
835
|
-
return self[
|
|
869
|
+
return self[113] or 0
|
|
836
870
|
end,
|
|
837
871
|
set = function(self, damageInterval)
|
|
838
872
|
if damageInterval <= 0 then
|
|
839
|
-
self[
|
|
840
|
-
local timer = self[
|
|
873
|
+
self[113] = damageInterval ~= 0 and damageInterval or nil
|
|
874
|
+
local timer = self[115]
|
|
841
875
|
if timer ~= nil then
|
|
842
876
|
timer:destroy()
|
|
843
|
-
self[
|
|
877
|
+
self[115] = nil
|
|
844
878
|
end
|
|
845
879
|
return
|
|
846
880
|
end
|
|
847
|
-
self[
|
|
848
|
-
local
|
|
849
|
-
local elapsed =
|
|
850
|
-
local timer = self[
|
|
881
|
+
self[113] = damageInterval
|
|
882
|
+
local ____opt_49 = self._timer
|
|
883
|
+
local elapsed = ____opt_49 and ____opt_49.elapsed or 0
|
|
884
|
+
local timer = self[115]
|
|
851
885
|
if timer == nil then
|
|
852
886
|
timer = Timer:create()
|
|
853
|
-
self[
|
|
887
|
+
self[115] = timer
|
|
854
888
|
end
|
|
855
889
|
local initialDelay = damageInterval - (elapsed >= damageInterval and math.fmod(elapsed, damageInterval) or elapsed)
|
|
856
890
|
if initialDelay == damageInterval then
|
|
@@ -867,13 +901,13 @@ __TS__SetDescriptor(
|
|
|
867
901
|
"remainingHealingOverDuration",
|
|
868
902
|
{
|
|
869
903
|
get = function(self)
|
|
870
|
-
return self[
|
|
904
|
+
return self[119] or 0
|
|
871
905
|
end,
|
|
872
906
|
set = function(self, remainingHealingOverDuration)
|
|
873
|
-
local remainingHealingOverDurationDelta = remainingHealingOverDuration - (self[
|
|
874
|
-
self[
|
|
875
|
-
local healingOverDuration = (self[
|
|
876
|
-
self[
|
|
907
|
+
local remainingHealingOverDurationDelta = remainingHealingOverDuration - (self[119] or 0)
|
|
908
|
+
self[114] = remainingHealingOverDuration ~= 0 and remainingHealingOverDuration or nil
|
|
909
|
+
local healingOverDuration = (self[116] or 0) + remainingHealingOverDurationDelta
|
|
910
|
+
self[116] = healingOverDuration ~= 0 and healingOverDuration or nil
|
|
877
911
|
end
|
|
878
912
|
},
|
|
879
913
|
true
|
|
@@ -883,13 +917,13 @@ __TS__SetDescriptor(
|
|
|
883
917
|
"healingOverDuration",
|
|
884
918
|
{
|
|
885
919
|
get = function(self)
|
|
886
|
-
return self[
|
|
920
|
+
return self[116] or 0
|
|
887
921
|
end,
|
|
888
922
|
set = function(self, healingOverDuration)
|
|
889
|
-
local healingOverDurationDelta = healingOverDuration - (self[
|
|
890
|
-
self[
|
|
891
|
-
local remainingHealingOverDuration = (self[
|
|
892
|
-
self[
|
|
923
|
+
local healingOverDurationDelta = healingOverDuration - (self[116] or 0)
|
|
924
|
+
self[116] = healingOverDuration ~= 0 and healingOverDuration or nil
|
|
925
|
+
local remainingHealingOverDuration = (self[119] or 0) + healingOverDurationDelta
|
|
926
|
+
self[119] = remainingHealingOverDuration ~= 0 and remainingHealingOverDuration or nil
|
|
893
927
|
end
|
|
894
928
|
},
|
|
895
929
|
true
|
|
@@ -899,10 +933,10 @@ __TS__SetDescriptor(
|
|
|
899
933
|
"healingPerInterval",
|
|
900
934
|
{
|
|
901
935
|
get = function(self)
|
|
902
|
-
return self[
|
|
936
|
+
return self[117] or 0
|
|
903
937
|
end,
|
|
904
938
|
set = function(self, healingPerInterval)
|
|
905
|
-
self[
|
|
939
|
+
self[117] = healingPerInterval ~= 0 and healingPerInterval or nil
|
|
906
940
|
end
|
|
907
941
|
},
|
|
908
942
|
true
|
|
@@ -912,25 +946,25 @@ __TS__SetDescriptor(
|
|
|
912
946
|
"healingInterval",
|
|
913
947
|
{
|
|
914
948
|
get = function(self)
|
|
915
|
-
return self[
|
|
949
|
+
return self[118] or 0
|
|
916
950
|
end,
|
|
917
951
|
set = function(self, healingInterval)
|
|
918
952
|
if healingInterval <= 0 then
|
|
919
|
-
self[
|
|
920
|
-
local timer = self[
|
|
953
|
+
self[118] = healingInterval ~= 0 and healingInterval or nil
|
|
954
|
+
local timer = self[120]
|
|
921
955
|
if timer ~= nil then
|
|
922
956
|
timer:destroy()
|
|
923
|
-
self[
|
|
957
|
+
self[120] = nil
|
|
924
958
|
end
|
|
925
959
|
return
|
|
926
960
|
end
|
|
927
|
-
self[
|
|
928
|
-
local
|
|
929
|
-
local elapsed =
|
|
930
|
-
local timer = self[
|
|
961
|
+
self[118] = healingInterval
|
|
962
|
+
local ____opt_51 = self._timer
|
|
963
|
+
local elapsed = ____opt_51 and ____opt_51.elapsed or 0
|
|
964
|
+
local timer = self[120]
|
|
931
965
|
if timer == nil then
|
|
932
966
|
timer = Timer:create()
|
|
933
|
-
self[
|
|
967
|
+
self[120] = timer
|
|
934
968
|
end
|
|
935
969
|
local initialDelay = healingInterval - (elapsed >= healingInterval and math.fmod(elapsed, healingInterval) or elapsed)
|
|
936
970
|
if initialDelay == healingInterval then
|
|
@@ -947,10 +981,10 @@ __TS__SetDescriptor(
|
|
|
947
981
|
"damageOnExpiration",
|
|
948
982
|
{
|
|
949
983
|
get = function(self)
|
|
950
|
-
return self[
|
|
984
|
+
return self[121] or 0
|
|
951
985
|
end,
|
|
952
986
|
set = function(self, damageOnExpiration)
|
|
953
|
-
self[
|
|
987
|
+
self[121] = damageOnExpiration ~= 0 and damageOnExpiration or nil
|
|
954
988
|
end
|
|
955
989
|
},
|
|
956
990
|
true
|
|
@@ -960,10 +994,10 @@ __TS__SetDescriptor(
|
|
|
960
994
|
"healingOnExpiration",
|
|
961
995
|
{
|
|
962
996
|
get = function(self)
|
|
963
|
-
return self[
|
|
997
|
+
return self[122] or 0
|
|
964
998
|
end,
|
|
965
999
|
set = function(self, healingOnExpiration)
|
|
966
|
-
self[
|
|
1000
|
+
self[122] = healingOnExpiration ~= 0 and healingOnExpiration or nil
|
|
967
1001
|
end
|
|
968
1002
|
},
|
|
969
1003
|
true
|
|
@@ -994,6 +1028,19 @@ __TS__SetDescriptor(
|
|
|
994
1028
|
},
|
|
995
1029
|
true
|
|
996
1030
|
)
|
|
1031
|
+
__TS__SetDescriptor(
|
|
1032
|
+
Buff.prototype,
|
|
1033
|
+
"returnedMeleeDamageFactor",
|
|
1034
|
+
{
|
|
1035
|
+
get = function(self)
|
|
1036
|
+
return self:getUnitBonus(UnitBonusType.RETURNED_MELEE_DAMAGE_FACTOR)
|
|
1037
|
+
end,
|
|
1038
|
+
set = function(self, returnedMeleeDamageFactor)
|
|
1039
|
+
self:addOrUpdateOrRemoveUnitBonus(UnitBonusType.RETURNED_MELEE_DAMAGE_FACTOR, returnedMeleeDamageFactor)
|
|
1040
|
+
end
|
|
1041
|
+
},
|
|
1042
|
+
true
|
|
1043
|
+
)
|
|
997
1044
|
__TS__SetDescriptor(
|
|
998
1045
|
Buff.prototype,
|
|
999
1046
|
"armorIncrease",
|
|
@@ -1038,19 +1085,19 @@ __TS__SetDescriptor(
|
|
|
1038
1085
|
"turnsIntoGhost",
|
|
1039
1086
|
{
|
|
1040
1087
|
get = function(self)
|
|
1041
|
-
local
|
|
1042
|
-
if
|
|
1043
|
-
|
|
1088
|
+
local ____self__140_53 = self[140]
|
|
1089
|
+
if ____self__140_53 == nil then
|
|
1090
|
+
____self__140_53 = false
|
|
1044
1091
|
end
|
|
1045
|
-
return
|
|
1092
|
+
return ____self__140_53
|
|
1046
1093
|
end,
|
|
1047
1094
|
set = function(self, turnsIntoGhost)
|
|
1048
|
-
if not turnsIntoGhost and self[
|
|
1095
|
+
if not turnsIntoGhost and self[140] then
|
|
1049
1096
|
self.object:decrementGhostCounter()
|
|
1050
|
-
self[
|
|
1051
|
-
elseif turnsIntoGhost and not self[
|
|
1097
|
+
self[140] = nil
|
|
1098
|
+
elseif turnsIntoGhost and not self[140] then
|
|
1052
1099
|
self.object:incrementGhostCounter()
|
|
1053
|
-
self[
|
|
1100
|
+
self[140] = true
|
|
1054
1101
|
end
|
|
1055
1102
|
end
|
|
1056
1103
|
},
|
|
@@ -1061,25 +1108,25 @@ __TS__SetDescriptor(
|
|
|
1061
1108
|
"stuns",
|
|
1062
1109
|
{
|
|
1063
1110
|
get = function(self)
|
|
1064
|
-
local
|
|
1065
|
-
if
|
|
1066
|
-
|
|
1111
|
+
local ____self__141_54 = self[141]
|
|
1112
|
+
if ____self__141_54 == nil then
|
|
1113
|
+
____self__141_54 = false
|
|
1067
1114
|
end
|
|
1068
|
-
return
|
|
1115
|
+
return ____self__141_54
|
|
1069
1116
|
end,
|
|
1070
1117
|
set = function(self, stuns)
|
|
1071
|
-
if not stuns and self[
|
|
1072
|
-
if self[
|
|
1118
|
+
if not stuns and self[141] then
|
|
1119
|
+
if self[142] then
|
|
1073
1120
|
self.object:decrementForceStunCounter()
|
|
1074
1121
|
end
|
|
1075
1122
|
self.object:decrementStunCounter()
|
|
1076
|
-
self[
|
|
1077
|
-
elseif stuns and not self[
|
|
1078
|
-
if self[
|
|
1123
|
+
self[141] = nil
|
|
1124
|
+
elseif stuns and not self[141] then
|
|
1125
|
+
if self[142] then
|
|
1079
1126
|
self.object:incrementForceStunCounter()
|
|
1080
1127
|
end
|
|
1081
1128
|
self.object:incrementStunCounter()
|
|
1082
|
-
self[
|
|
1129
|
+
self[141] = true
|
|
1083
1130
|
end
|
|
1084
1131
|
end
|
|
1085
1132
|
},
|
|
@@ -1090,23 +1137,23 @@ __TS__SetDescriptor(
|
|
|
1090
1137
|
"ignoresStunImmunity",
|
|
1091
1138
|
{
|
|
1092
1139
|
get = function(self)
|
|
1093
|
-
local
|
|
1094
|
-
if
|
|
1095
|
-
|
|
1140
|
+
local ____self__142_55 = self[142]
|
|
1141
|
+
if ____self__142_55 == nil then
|
|
1142
|
+
____self__142_55 = false
|
|
1096
1143
|
end
|
|
1097
|
-
return
|
|
1144
|
+
return ____self__142_55
|
|
1098
1145
|
end,
|
|
1099
1146
|
set = function(self, ignoresStunImmunity)
|
|
1100
|
-
if not ignoresStunImmunity and self[
|
|
1101
|
-
if self[
|
|
1147
|
+
if not ignoresStunImmunity and self[142] then
|
|
1148
|
+
if self[141] then
|
|
1102
1149
|
self.object:decrementForceStunCounter()
|
|
1103
1150
|
end
|
|
1104
|
-
self[
|
|
1105
|
-
elseif ignoresStunImmunity and not self[
|
|
1106
|
-
if self[
|
|
1151
|
+
self[142] = nil
|
|
1152
|
+
elseif ignoresStunImmunity and not self[142] then
|
|
1153
|
+
if self[141] then
|
|
1107
1154
|
self.object:incrementForceStunCounter()
|
|
1108
1155
|
end
|
|
1109
|
-
self[
|
|
1156
|
+
self[142] = true
|
|
1110
1157
|
end
|
|
1111
1158
|
end
|
|
1112
1159
|
},
|
|
@@ -1117,19 +1164,19 @@ __TS__SetDescriptor(
|
|
|
1117
1164
|
"disablesAutoAttack",
|
|
1118
1165
|
{
|
|
1119
1166
|
get = function(self)
|
|
1120
|
-
local
|
|
1121
|
-
if
|
|
1122
|
-
|
|
1167
|
+
local ____self__143_56 = self[143]
|
|
1168
|
+
if ____self__143_56 == nil then
|
|
1169
|
+
____self__143_56 = false
|
|
1123
1170
|
end
|
|
1124
|
-
return
|
|
1171
|
+
return ____self__143_56
|
|
1125
1172
|
end,
|
|
1126
1173
|
set = function(self, disablesAutoAttack)
|
|
1127
|
-
if not disablesAutoAttack and self[
|
|
1174
|
+
if not disablesAutoAttack and self[143] then
|
|
1128
1175
|
self.object:decrementDisableAutoAttackCounter()
|
|
1129
|
-
self[
|
|
1130
|
-
elseif disablesAutoAttack and not self[
|
|
1176
|
+
self[143] = nil
|
|
1177
|
+
elseif disablesAutoAttack and not self[143] then
|
|
1131
1178
|
self.object:incrementDisableAutoAttackCounter()
|
|
1132
|
-
self[
|
|
1179
|
+
self[143] = true
|
|
1133
1180
|
end
|
|
1134
1181
|
end
|
|
1135
1182
|
},
|
|
@@ -1140,19 +1187,19 @@ __TS__SetDescriptor(
|
|
|
1140
1187
|
"providesInvulnerability",
|
|
1141
1188
|
{
|
|
1142
1189
|
get = function(self)
|
|
1143
|
-
local
|
|
1144
|
-
if
|
|
1145
|
-
|
|
1190
|
+
local ____self__144_57 = self[144]
|
|
1191
|
+
if ____self__144_57 == nil then
|
|
1192
|
+
____self__144_57 = false
|
|
1146
1193
|
end
|
|
1147
|
-
return
|
|
1194
|
+
return ____self__144_57
|
|
1148
1195
|
end,
|
|
1149
1196
|
set = function(self, providesInvulnerability)
|
|
1150
|
-
if not providesInvulnerability and self[
|
|
1197
|
+
if not providesInvulnerability and self[144] then
|
|
1151
1198
|
self.object:decrementInvulnerabilityCounter()
|
|
1152
|
-
self[
|
|
1153
|
-
elseif providesInvulnerability and not self[
|
|
1199
|
+
self[144] = nil
|
|
1200
|
+
elseif providesInvulnerability and not self[144] then
|
|
1154
1201
|
self.object:incrementInvulnerabilityCounter()
|
|
1155
|
-
self[
|
|
1202
|
+
self[144] = true
|
|
1156
1203
|
end
|
|
1157
1204
|
end
|
|
1158
1205
|
},
|
|
@@ -1163,17 +1210,17 @@ __TS__SetDescriptor(
|
|
|
1163
1210
|
"killsOnExpiration",
|
|
1164
1211
|
{
|
|
1165
1212
|
get = function(self)
|
|
1166
|
-
local
|
|
1167
|
-
if
|
|
1168
|
-
|
|
1213
|
+
local ____self__145_58 = self[145]
|
|
1214
|
+
if ____self__145_58 == nil then
|
|
1215
|
+
____self__145_58 = false
|
|
1169
1216
|
end
|
|
1170
|
-
return
|
|
1217
|
+
return ____self__145_58
|
|
1171
1218
|
end,
|
|
1172
1219
|
set = function(self, killsOnExpiration)
|
|
1173
|
-
if not killsOnExpiration and self[
|
|
1174
|
-
self[
|
|
1175
|
-
elseif killsOnExpiration and not self[
|
|
1176
|
-
self[
|
|
1220
|
+
if not killsOnExpiration and self[145] then
|
|
1221
|
+
self[145] = nil
|
|
1222
|
+
elseif killsOnExpiration and not self[145] then
|
|
1223
|
+
self[145] = true
|
|
1177
1224
|
end
|
|
1178
1225
|
end
|
|
1179
1226
|
},
|
|
@@ -1184,17 +1231,17 @@ __TS__SetDescriptor(
|
|
|
1184
1231
|
"explodesOnExpiration",
|
|
1185
1232
|
{
|
|
1186
1233
|
get = function(self)
|
|
1187
|
-
local
|
|
1188
|
-
if
|
|
1189
|
-
|
|
1234
|
+
local ____self__146_59 = self[146]
|
|
1235
|
+
if ____self__146_59 == nil then
|
|
1236
|
+
____self__146_59 = false
|
|
1190
1237
|
end
|
|
1191
|
-
return
|
|
1238
|
+
return ____self__146_59
|
|
1192
1239
|
end,
|
|
1193
1240
|
set = function(self, killsOnExpiration)
|
|
1194
|
-
if not killsOnExpiration and self[
|
|
1195
|
-
self[
|
|
1196
|
-
elseif killsOnExpiration and not self[
|
|
1197
|
-
self[
|
|
1241
|
+
if not killsOnExpiration and self[146] then
|
|
1242
|
+
self[146] = nil
|
|
1243
|
+
elseif killsOnExpiration and not self[146] then
|
|
1244
|
+
self[146] = true
|
|
1198
1245
|
end
|
|
1199
1246
|
end
|
|
1200
1247
|
},
|
|
@@ -1205,13 +1252,13 @@ __TS__SetDescriptor(
|
|
|
1205
1252
|
"maximumDamageDealtEventCount",
|
|
1206
1253
|
{
|
|
1207
1254
|
get = function(self)
|
|
1208
|
-
return self[
|
|
1255
|
+
return self[133] or 0
|
|
1209
1256
|
end,
|
|
1210
1257
|
set = function(self, maximumDamageDealtEventCount)
|
|
1211
1258
|
if maximumDamageDealtEventCount == 0 then
|
|
1212
|
-
self[
|
|
1259
|
+
self[133] = nil
|
|
1213
1260
|
else
|
|
1214
|
-
self[
|
|
1261
|
+
self[133] = maximumDamageDealtEventCount
|
|
1215
1262
|
end
|
|
1216
1263
|
end
|
|
1217
1264
|
},
|
|
@@ -1222,13 +1269,13 @@ __TS__SetDescriptor(
|
|
|
1222
1269
|
"maximumDamageReceivedEventCount",
|
|
1223
1270
|
{
|
|
1224
1271
|
get = function(self)
|
|
1225
|
-
return self[
|
|
1272
|
+
return self[135] or 0
|
|
1226
1273
|
end,
|
|
1227
1274
|
set = function(self, maximumDamageReceivedEventCount)
|
|
1228
1275
|
if maximumDamageReceivedEventCount == 0 then
|
|
1229
|
-
self[
|
|
1276
|
+
self[135] = nil
|
|
1230
1277
|
else
|
|
1231
|
-
self[
|
|
1278
|
+
self[135] = maximumDamageReceivedEventCount
|
|
1232
1279
|
end
|
|
1233
1280
|
end
|
|
1234
1281
|
},
|
|
@@ -1239,13 +1286,13 @@ __TS__SetDescriptor(
|
|
|
1239
1286
|
"maximumAutoAttackCount",
|
|
1240
1287
|
{
|
|
1241
1288
|
get = function(self)
|
|
1242
|
-
return self[
|
|
1289
|
+
return self[131] or 0
|
|
1243
1290
|
end,
|
|
1244
1291
|
set = function(self, maximumAutoAttackCount)
|
|
1245
1292
|
if maximumAutoAttackCount == 0 then
|
|
1246
|
-
self[
|
|
1293
|
+
self[131] = nil
|
|
1247
1294
|
else
|
|
1248
|
-
self[
|
|
1295
|
+
self[131] = maximumAutoAttackCount
|
|
1249
1296
|
end
|
|
1250
1297
|
end
|
|
1251
1298
|
},
|
|
@@ -1256,10 +1303,10 @@ __TS__SetDescriptor(
|
|
|
1256
1303
|
"durationIncreaseOnAutoAttack",
|
|
1257
1304
|
{
|
|
1258
1305
|
get = function(self)
|
|
1259
|
-
return self[
|
|
1306
|
+
return self[108] or 0
|
|
1260
1307
|
end,
|
|
1261
1308
|
set = function(self, durationIncreaseOnAutoAttack)
|
|
1262
|
-
self[
|
|
1309
|
+
self[108] = durationIncreaseOnAutoAttack
|
|
1263
1310
|
end
|
|
1264
1311
|
},
|
|
1265
1312
|
true
|
|
@@ -1343,13 +1390,13 @@ __TS__SetDescriptor(
|
|
|
1343
1390
|
"remainingDuration",
|
|
1344
1391
|
{
|
|
1345
1392
|
get = function(self)
|
|
1346
|
-
local
|
|
1347
|
-
return
|
|
1393
|
+
local ____opt_60 = self._timer
|
|
1394
|
+
return ____opt_60 and ____opt_60.remaining or 0
|
|
1348
1395
|
end,
|
|
1349
1396
|
set = function(self, remainingDuration)
|
|
1350
|
-
local
|
|
1351
|
-
local
|
|
1352
|
-
local remainingDurationDelta =
|
|
1397
|
+
local ____remainingDuration_64 = remainingDuration
|
|
1398
|
+
local ____opt_62 = self._timer
|
|
1399
|
+
local remainingDurationDelta = ____remainingDuration_64 - (____opt_62 and ____opt_62.remaining or 0)
|
|
1353
1400
|
if remainingDurationDelta ~= 0 then
|
|
1354
1401
|
self[103] = self[103] + remainingDurationDelta
|
|
1355
1402
|
if remainingDuration <= 0 then
|
|
@@ -1364,7 +1411,7 @@ __TS__SetDescriptor(
|
|
|
1364
1411
|
remainingDuration,
|
|
1365
1412
|
self._spellStealPriority,
|
|
1366
1413
|
self._learnLevelMinimum,
|
|
1367
|
-
self[
|
|
1414
|
+
self[147]
|
|
1368
1415
|
) then
|
|
1369
1416
|
local timer = self._timer
|
|
1370
1417
|
if timer == nil then
|
|
@@ -1384,13 +1431,13 @@ __TS__SetDescriptor(
|
|
|
1384
1431
|
"absorbedDamageFactor",
|
|
1385
1432
|
{
|
|
1386
1433
|
get = function(self)
|
|
1387
|
-
return self[
|
|
1434
|
+
return self[136] or 1
|
|
1388
1435
|
end,
|
|
1389
1436
|
set = function(self, absorbedDamageFactor)
|
|
1390
1437
|
if absorbedDamageFactor == 1 then
|
|
1391
|
-
self[
|
|
1438
|
+
self[136] = nil
|
|
1392
1439
|
else
|
|
1393
|
-
self[
|
|
1440
|
+
self[136] = absorbedDamageFactor
|
|
1394
1441
|
end
|
|
1395
1442
|
end
|
|
1396
1443
|
},
|
|
@@ -1401,13 +1448,13 @@ __TS__SetDescriptor(
|
|
|
1401
1448
|
"maximumDamageAbsorbed",
|
|
1402
1449
|
{
|
|
1403
1450
|
get = function(self)
|
|
1404
|
-
return self[
|
|
1451
|
+
return self[137] or 0
|
|
1405
1452
|
end,
|
|
1406
1453
|
set = function(self, maximumDamageAbsorbed)
|
|
1407
1454
|
if maximumDamageAbsorbed == 0 then
|
|
1408
|
-
self[
|
|
1455
|
+
self[137] = nil
|
|
1409
1456
|
else
|
|
1410
|
-
self[
|
|
1457
|
+
self[137] = maximumDamageAbsorbed
|
|
1411
1458
|
end
|
|
1412
1459
|
end
|
|
1413
1460
|
},
|
|
@@ -1417,7 +1464,7 @@ __TS__SetDescriptor(
|
|
|
1417
1464
|
Buff.prototype,
|
|
1418
1465
|
"damageAbsorbed",
|
|
1419
1466
|
{get = function(self)
|
|
1420
|
-
return self[
|
|
1467
|
+
return self[138] or 0
|
|
1421
1468
|
end},
|
|
1422
1469
|
true
|
|
1423
1470
|
)
|
|
@@ -1426,20 +1473,20 @@ __TS__SetDescriptor(
|
|
|
1426
1473
|
"destroysOnMaximumDamageAbsorbed",
|
|
1427
1474
|
{
|
|
1428
1475
|
get = function(self)
|
|
1429
|
-
local
|
|
1430
|
-
if
|
|
1431
|
-
|
|
1476
|
+
local ____self__139_65 = self[139]
|
|
1477
|
+
if ____self__139_65 == nil then
|
|
1478
|
+
____self__139_65 = true
|
|
1432
1479
|
end
|
|
1433
|
-
return
|
|
1480
|
+
return ____self__139_65
|
|
1434
1481
|
end,
|
|
1435
1482
|
set = function(self, destroysOnMaximumDamageAbsorbed)
|
|
1436
|
-
local
|
|
1483
|
+
local ____destroysOnMaximumDamageAbsorbed_66
|
|
1437
1484
|
if destroysOnMaximumDamageAbsorbed then
|
|
1438
|
-
|
|
1485
|
+
____destroysOnMaximumDamageAbsorbed_66 = nil
|
|
1439
1486
|
else
|
|
1440
|
-
|
|
1487
|
+
____destroysOnMaximumDamageAbsorbed_66 = false
|
|
1441
1488
|
end
|
|
1442
|
-
self[
|
|
1489
|
+
self[139] = ____destroysOnMaximumDamageAbsorbed_66
|
|
1443
1490
|
end
|
|
1444
1491
|
},
|
|
1445
1492
|
true
|
|
@@ -1449,10 +1496,10 @@ __TS__SetDescriptor(
|
|
|
1449
1496
|
"abilityCooldownFactor",
|
|
1450
1497
|
{
|
|
1451
1498
|
get = function(self)
|
|
1452
|
-
return self[
|
|
1499
|
+
return self[148] or 1
|
|
1453
1500
|
end,
|
|
1454
1501
|
set = function(self, abilityCooldownFactor)
|
|
1455
|
-
local previousAbilityCooldownModifier = self[
|
|
1502
|
+
local previousAbilityCooldownModifier = self[149]
|
|
1456
1503
|
if previousAbilityCooldownModifier then
|
|
1457
1504
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
1458
1505
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, previousAbilityCooldownModifier)
|
|
@@ -1464,8 +1511,8 @@ __TS__SetDescriptor(
|
|
|
1464
1511
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
1465
1512
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:applyModifier(ability, modifier)
|
|
1466
1513
|
end
|
|
1467
|
-
self[
|
|
1468
|
-
self[
|
|
1514
|
+
self[149] = modifier
|
|
1515
|
+
self[148] = abilityCooldownFactor
|
|
1469
1516
|
end
|
|
1470
1517
|
},
|
|
1471
1518
|
true
|
|
@@ -1473,35 +1520,40 @@ __TS__SetDescriptor(
|
|
|
1473
1520
|
Buff.createdEvent = buffCreatedEvent
|
|
1474
1521
|
Buff.beingDestroyedEvent = buffBeingDestroyedEvent;
|
|
1475
1522
|
(function(self)
|
|
1476
|
-
local function destroyBuffIfNeeded(buff)
|
|
1477
|
-
|
|
1478
|
-
|
|
1523
|
+
local function destroyBuffIfNeeded(buff, isDispel, source)
|
|
1524
|
+
local currentHandle = getUnitAbility(buff[101].handle, buff.typeId)
|
|
1525
|
+
if currentHandle ~= buff.handle and buff[100] == 1 then
|
|
1526
|
+
if isDispel and currentHandle == nil and buff.unit.isAlive and buff.resistanceType == 1 and (buff._timer == nil or buff.remainingDuration > 0) then
|
|
1527
|
+
buff:dispel(source)
|
|
1528
|
+
else
|
|
1529
|
+
buff:destroy()
|
|
1530
|
+
end
|
|
1479
1531
|
end
|
|
1480
1532
|
end
|
|
1481
|
-
____exports.checkBuff = function(unit, buffTypeId)
|
|
1533
|
+
____exports.checkBuff = function(unit, buffTypeId, isDispel, source)
|
|
1482
1534
|
local buffByTypeId = buffByTypeIdByUnit[unit]
|
|
1483
1535
|
if buffByTypeId ~= nil then
|
|
1484
1536
|
local buff = buffByTypeId[buffTypeId]
|
|
1485
1537
|
if buff ~= nil then
|
|
1486
|
-
destroyBuffIfNeeded(buff)
|
|
1538
|
+
destroyBuffIfNeeded(buff, isDispel, source)
|
|
1487
1539
|
end
|
|
1488
1540
|
end
|
|
1489
1541
|
end
|
|
1490
|
-
____exports.checkBuffs = function(unit)
|
|
1491
|
-
____exports.Buff:forAll(unit, destroyBuffIfNeeded)
|
|
1542
|
+
____exports.checkBuffs = function(unit, isDispel, source)
|
|
1543
|
+
____exports.Buff:forAll(unit, destroyBuffIfNeeded, isDispel, source)
|
|
1492
1544
|
end
|
|
1493
1545
|
Unit.abilityChannelingStartEvent:addListener(
|
|
1494
1546
|
0,
|
|
1495
1547
|
function(caster)
|
|
1496
|
-
____exports.checkBuffs(caster)
|
|
1497
|
-
Timer:run(____exports.checkBuffs, caster)
|
|
1548
|
+
____exports.checkBuffs(caster, true, caster)
|
|
1549
|
+
Timer:run(____exports.checkBuffs, caster, true, caster)
|
|
1498
1550
|
end
|
|
1499
1551
|
)
|
|
1500
1552
|
Unit.abilityUnitTargetChannelingStartEvent:addListener(
|
|
1501
1553
|
0,
|
|
1502
1554
|
function(caster, ability, target)
|
|
1503
|
-
____exports.checkBuffs(target)
|
|
1504
|
-
Timer:run(____exports.checkBuffs, target)
|
|
1555
|
+
____exports.checkBuffs(target, true, caster)
|
|
1556
|
+
Timer:run(____exports.checkBuffs, target, true, caster)
|
|
1505
1557
|
end
|
|
1506
1558
|
)
|
|
1507
1559
|
Unit.abilityPointTargetChannelingStartEvent:addListener(
|
|
@@ -1512,17 +1564,40 @@ Buff.beingDestroyedEvent = buffBeingDestroyedEvent;
|
|
|
1512
1564
|
y,
|
|
1513
1565
|
ability:getField(ABILITY_RLF_AREA_OF_EFFECT)
|
|
1514
1566
|
)
|
|
1515
|
-
forEach(units, ____exports.checkBuffs)
|
|
1516
|
-
Timer:run(
|
|
1567
|
+
forEach(units, ____exports.checkBuffs, true, caster)
|
|
1568
|
+
Timer:run(
|
|
1569
|
+
forEach,
|
|
1570
|
+
units,
|
|
1571
|
+
____exports.checkBuffs,
|
|
1572
|
+
true,
|
|
1573
|
+
caster
|
|
1574
|
+
)
|
|
1575
|
+
end
|
|
1576
|
+
)
|
|
1577
|
+
Unit.abilityNoTargetChannelingStartEvent:addListener(
|
|
1578
|
+
0,
|
|
1579
|
+
function(caster, ability)
|
|
1580
|
+
local radius = ability:getField(ABILITY_RLF_AREA_OF_EFFECT)
|
|
1581
|
+
if radius > 0 then
|
|
1582
|
+
local units = Unit:getInCollisionRange(caster.x, caster.y, radius)
|
|
1583
|
+
forEach(units, ____exports.checkBuffs, true, caster)
|
|
1584
|
+
Timer:run(
|
|
1585
|
+
forEach,
|
|
1586
|
+
units,
|
|
1587
|
+
____exports.checkBuffs,
|
|
1588
|
+
true,
|
|
1589
|
+
caster
|
|
1590
|
+
)
|
|
1591
|
+
end
|
|
1517
1592
|
end
|
|
1518
1593
|
)
|
|
1519
1594
|
Unit.onDamage:addListener(
|
|
1520
1595
|
0,
|
|
1521
1596
|
function(source, target)
|
|
1522
1597
|
if source ~= nil then
|
|
1523
|
-
____exports.checkBuffs
|
|
1598
|
+
Timer:run(____exports.checkBuffs, source, false)
|
|
1524
1599
|
end
|
|
1525
|
-
____exports.checkBuffs
|
|
1600
|
+
Timer:run(____exports.checkBuffs, target, false)
|
|
1526
1601
|
end
|
|
1527
1602
|
)
|
|
1528
1603
|
buffCreatedEvent:addListener(function(buff)
|