UNPKG

warscript

Version:

A typescript library for Warcraft III using Warpack.

52 lines (51 loc) 2.12 kB
/** @noSelfInFile */ import { LightningTypeId } from "./object-data/entry/lightning-type"; import { Handle, HandleDestructor } from "../core/types/handle"; import { Unit } from "../core/types/unit"; declare const enum LightningPropertyKey { CHECK_VISIBILITY = 100, SOURCE_UNIT = 101, TARGET_UNIT = 102, SOURCE_X = 103, SOURCE_Y = 104, SOURCE_Z = 105, TARGET_X = 106, TARGET_Y = 107, TARGET_Z = 108, DURATION = 109 } export type LightningConstructor<T extends Lightning> = typeof Lightning & (new (handle: jlightning, typeId: LightningTypeId) => T); export declare class Lightning extends Handle<jlightning> { readonly typeId: LightningTypeId; private [LightningPropertyKey.CHECK_VISIBILITY]?; private [LightningPropertyKey.SOURCE_UNIT]?; private [LightningPropertyKey.TARGET_UNIT]?; private [LightningPropertyKey.SOURCE_X]?; private [LightningPropertyKey.SOURCE_Y]?; private [LightningPropertyKey.SOURCE_Z]?; private [LightningPropertyKey.TARGET_X]?; private [LightningPropertyKey.TARGET_Y]?; private [LightningPropertyKey.TARGET_Z]?; private [LightningPropertyKey.DURATION]?; constructor(handle: jlightning, typeId: LightningTypeId); protected onDestroy(): HandleDestructor; static create<T extends Lightning>(this: LightningConstructor<T>, typeId: LightningTypeId, ...parameters: [ ...checkVisibility: [boolean] | [], ...sourceAndTarget: [sourceX: number, sourceY: number, targetX: number, targetY: number] | [ sourceX: number, sourceY: number, sourceZ: number, targetX: number, targetY: number, targetZ: number ] | [ source: Unit, ...target: [targetX: number, targetY: number, ...targetZ: [number] | []] | [Unit] ] | [ ...source: [sourceX: number, sourceY: number, ...sourceZ: [number] | []] | [Unit], target: Unit ] ]): T; static flash(...parameters: [...parameters: Parameters<(typeof Lightning)["create"]>, duration: number]): void; } export {};