-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from DevilVsLive2/main
Add missing unit events
- Loading branch information
Showing
14 changed files
with
499 additions
and
1,929 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetTriggerBuff, GetTriggerBuffSourceAbility, GetTriggerBuffSourceUnit, HAbility, HBuff } from "../../utils/common.js"; | ||
|
||
export class UnitEventBuffEnded extends TriggerUnitEvent<"buffEnded"> { | ||
readonly recievedBuff: HBuff; | ||
readonly sourceAbility: HAbility; | ||
readonly sourceUnit: Unit; | ||
constructor() { | ||
super("buffEnded"); | ||
this.recievedBuff = fromHandleHolderSoft(GetTriggerBuff()); | ||
this.sourceAbility = fromHandleHolderSoft(GetTriggerBuffSourceAbility()); | ||
this.sourceUnit = fromHandleHolderSoft(GetTriggerBuffSourceUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetTriggerBuff, GetTriggerBuffSourceAbility, GetTriggerBuffSourceUnit, HAbility, HBuff } from "../../utils/common.js"; | ||
|
||
export class UnitEventBuffReceived extends TriggerUnitEvent<"buffReceived"> { | ||
readonly recievedBuff: HBuff; | ||
readonly sourceAbility: HAbility; | ||
readonly sourceUnit: Unit; | ||
constructor() { | ||
super("buffReceived"); | ||
this.recievedBuff = fromHandleHolderSoft(GetTriggerBuff()); | ||
this.sourceAbility = fromHandleHolderSoft(GetTriggerBuffSourceAbility()); | ||
this.sourceUnit = fromHandleHolderSoft(GetTriggerBuffSourceUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetTriggerBuff, GetTriggerBuffSourceAbility, GetTriggerBuffSourceUnit, HAbility, HBuff } from "../../utils/common.js"; | ||
|
||
export class UnitEventBuffRefreshed extends TriggerUnitEvent<"buffRefreshed"> { | ||
readonly recievedBuff: HBuff; | ||
readonly sourceAbility: HAbility; | ||
readonly sourceUnit: Unit; | ||
constructor() { | ||
super("buffRefreshed"); | ||
this.recievedBuff = fromHandleHolderSoft(GetTriggerBuff()); | ||
this.sourceAbility = fromHandleHolderSoft(GetTriggerBuffSourceAbility()); | ||
this.sourceUnit = fromHandleHolderSoft(GetTriggerBuffSourceUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetTriggerProjectile, GetTriggerProjectileSource, HProjectile } from "../../utils/common.js"; | ||
import { Unit } from "../../handles/Unit.js"; | ||
|
||
export class UnitEventProjectileHit extends TriggerUnitEvent<"projectileHit"> { | ||
readonly source:Unit; | ||
readonly projectile:HProjectile; | ||
constructor() { | ||
super("projectileHit"); | ||
this.source = fromHandleHolderSoft(GetTriggerProjectileSource()); | ||
this.projectile = fromHandleHolderSoft(GetTriggerProjectile()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { Widget } from "../../handles/Widget.js"; | ||
import { GetTriggerProjectile, GetTriggerProjectileTarget, HProjectile } from "../../utils/common.js"; | ||
|
||
export class UnitEventProjectileLaunch extends TriggerUnitEvent<"projectileLaunch"> { | ||
readonly target:Widget; | ||
readonly projecitle:HProjectile; | ||
constructor() { | ||
super("projectileLaunch"); | ||
this.target = fromHandleHolderSoft(GetTriggerProjectileTarget()); | ||
this.projecitle = fromHandleHolderSoft(GetTriggerProjectile()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetSpellAbility, GetSpellAbilityId, GetSpellTargetDestructable, GetSpellTargetItem, GetSpellTargetUnit, GetSpellTargetX, GetSpellTargetY, HAbility } from "../../utils/common.js"; | ||
import { Destructable } from "../../handles/Destructable.js"; | ||
import { Item } from "../../handles/Item.js"; | ||
|
||
export class UnitEventSpellCast extends TriggerUnitEvent<"spellCast"> { | ||
readonly abilityId: number; | ||
readonly ability: HAbility; | ||
readonly targetX: number; | ||
readonly targetY: number; | ||
// there is no "GetSpellTarget()" for this event that would return widget | ||
readonly targetDestructable: Destructable; | ||
readonly targetItem: Item; | ||
readonly targetUnit: Unit; | ||
constructor() { | ||
super("spellCast"); | ||
this.abilityId = GetSpellAbilityId(); | ||
this.ability = fromHandleHolderSoft(GetSpellAbility()); | ||
this.targetX = GetSpellTargetX(); | ||
this.targetY = GetSpellTargetY(); | ||
this.targetDestructable = fromHandleHolderSoft(GetSpellTargetDestructable()); | ||
this.targetItem = fromHandleHolderSoft(GetSpellTargetItem()); | ||
this.targetUnit = fromHandleHolderSoft(GetSpellTargetUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetSpellAbility, GetSpellAbilityId, GetSpellTargetDestructable, GetSpellTargetItem, GetSpellTargetUnit, GetSpellTargetX, GetSpellTargetY, HAbility } from "../../utils/common.js"; | ||
import { Destructable } from "../../handles/Destructable.js"; | ||
import { Item } from "../../handles/Item.js"; | ||
|
||
export class UnitEventSpellChannel extends TriggerUnitEvent<"spellChannel"> { | ||
readonly abilityId: number; | ||
readonly ability: HAbility; | ||
readonly targetX: number; | ||
readonly targetY: number; | ||
// there is no "GetSpellTarget()" for this event that would return widget | ||
readonly targetDestructable: Destructable; | ||
readonly targetItem: Item; | ||
readonly targetUnit: Unit; | ||
constructor() { | ||
super("spellChannel"); | ||
this.abilityId = GetSpellAbilityId(); | ||
this.ability = fromHandleHolderSoft(GetSpellAbility()); | ||
this.targetX = GetSpellTargetX(); | ||
this.targetY = GetSpellTargetY(); | ||
this.targetDestructable = fromHandleHolderSoft(GetSpellTargetDestructable()); | ||
this.targetItem = fromHandleHolderSoft(GetSpellTargetItem()); | ||
this.targetUnit = fromHandleHolderSoft(GetSpellTargetUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetSpellAbility, GetSpellAbilityId, GetSpellTargetDestructable, GetSpellTargetItem, GetSpellTargetUnit, GetSpellTargetX, GetSpellTargetY, HAbility } from "../../utils/common.js"; | ||
import { Destructable } from "../../handles/Destructable.js"; | ||
import { Item } from "../../handles/Item.js"; | ||
|
||
export class UnitEventSpellEffect extends TriggerUnitEvent<"spellEffect"> { | ||
readonly abilityId: number; | ||
readonly ability: HAbility; | ||
readonly targetX: number; | ||
readonly targetY: number; | ||
// there is no "GetSpellTarget()" for this event that would return widget | ||
readonly targetDestructable: Destructable; | ||
readonly targetItem: Item; | ||
readonly targetUnit: Unit; | ||
constructor() { | ||
super("spellEffect"); | ||
this.abilityId = GetSpellAbilityId(); | ||
this.ability = fromHandleHolderSoft(GetSpellAbility()); | ||
this.targetX = GetSpellTargetX(); | ||
this.targetY = GetSpellTargetY(); | ||
this.targetDestructable = fromHandleHolderSoft(GetSpellTargetDestructable()); | ||
this.targetItem = fromHandleHolderSoft(GetSpellTargetItem()); | ||
this.targetUnit = fromHandleHolderSoft(GetSpellTargetUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetSpellAbility, GetSpellAbilityId, GetSpellTargetDestructable, GetSpellTargetItem, GetSpellTargetUnit, GetSpellTargetX, GetSpellTargetY, HAbility } from "../../utils/common.js"; | ||
import { Destructable } from "../../handles/Destructable.js"; | ||
import { Item } from "../../handles/Item.js"; | ||
|
||
export class UnitEventSpellEndcast extends TriggerUnitEvent<"spellEndcast"> { | ||
readonly abilityId: number; | ||
readonly ability: HAbility; | ||
readonly targetX: number; | ||
readonly targetY: number; | ||
// there is no "GetSpellTarget()" for this event that would return widget | ||
readonly targetDestructable: Destructable; | ||
readonly targetItem: Item; | ||
readonly targetUnit: Unit; | ||
constructor() { | ||
super("spellEndcast"); | ||
this.abilityId = GetSpellAbilityId(); | ||
this.ability = fromHandleHolderSoft(GetSpellAbility()); | ||
this.targetX = GetSpellTargetX(); | ||
this.targetY = GetSpellTargetY(); | ||
this.targetDestructable = fromHandleHolderSoft(GetSpellTargetDestructable()); | ||
this.targetItem = fromHandleHolderSoft(GetSpellTargetItem()); | ||
this.targetUnit = fromHandleHolderSoft(GetSpellTargetUnit()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Unit } from "../../handles/Unit.js"; | ||
import { TriggerUnitEvent } from "./TriggerUnitEvent.js"; | ||
import { fromHandleHolderSoft } from "../../utils/FromHandleHolder.js"; | ||
import { GetSpellAbility, GetSpellAbilityId, GetSpellTargetDestructable, GetSpellTargetItem, GetSpellTargetUnit, GetSpellTargetX, GetSpellTargetY, HAbility } from "../../utils/common.js"; | ||
import { Destructable } from "../../handles/Destructable.js"; | ||
import { Item } from "../../handles/Item.js"; | ||
|
||
export class UnitEventSpellFinish extends TriggerUnitEvent<"spellFinish"> { | ||
readonly abilityId: number; | ||
readonly ability: HAbility; | ||
readonly targetX: number; | ||
readonly targetY: number; | ||
// there is no "GetSpellTarget()" for this event that would return widget | ||
readonly targetDestructable: Destructable; | ||
readonly targetItem: Item; | ||
readonly targetUnit: Unit; | ||
constructor() { | ||
super("spellFinish"); | ||
this.abilityId = GetSpellAbilityId(); | ||
this.ability = fromHandleHolderSoft(GetSpellAbility()); | ||
this.targetX = GetSpellTargetX(); | ||
this.targetY = GetSpellTargetY(); | ||
this.targetDestructable = fromHandleHolderSoft(GetSpellTargetDestructable()); | ||
this.targetItem = fromHandleHolderSoft(GetSpellTargetItem()); | ||
this.targetUnit = fromHandleHolderSoft(GetSpellTargetUnit()); | ||
} | ||
} |
Oops, something went wrong.