@@ -11,10 +11,12 @@ type bonetype extends attachmenttype
11
11
type animtype extends mapdatatype
12
12
type subanimtype extends animtype
13
13
type cursoranimtype extends mapdatatype
14
- type sprite extends agent
15
- type projectile extends agent
16
- type doodad extends agent
14
+ type war3image extends agent
15
+ type sprite extends war3image
16
+ type projectile extends war3image
17
+ type doodad extends war3image
17
18
type framehandle extends handle
19
+ type commandbuttoneffect extends handle
18
20
type originframetype extends handle
19
21
type framepointtype extends handle
20
22
type textaligntype extends handle
@@ -47,17 +49,19 @@ type unitweaponintegerfield extends agentdatafield
47
49
type unitweaponrealfield extends agentdatafield
48
50
type unitweaponbooleanfield extends agentdatafield
49
51
type unitweaponstringfield extends agentdatafield
50
- type movetype extends handle
51
- type pathingaitype extends handle
52
- type collisiontype extends handle
53
- type targetflag extends handle
52
+ type flagtype extends handle
53
+ type layerstyleflag extends flagtype
54
+ type controlstyleflag extends flagtype
55
+ type movetype extends flagtype
56
+ type pathingaitype extends flagtype
57
+ type collisiontype extends flagtype
58
+ type targetflag extends flagtype
59
+ type pathingflag extends flagtype
54
60
type armortype extends handle
55
61
type heroattribute extends handle
56
62
type defensetype extends handle
57
63
type regentype extends handle
58
64
type unitcategory extends handle
59
- type pathingflag extends handle
60
- type commandbuttoneffect extends handle
61
65
type timetype extends handle
62
66
type variabletype extends handle
63
67
type renderstage extends handle
@@ -117,6 +121,8 @@ constant native ConvertPathingFlag takes integer i returns pathingflag
117
121
constant native ConvertTimeType takes integer i returns timetype
118
122
constant native ConvertVariableType takes integer i returns variabletype
119
123
constant native ConvertRenderStage takes integer i returns renderstage
124
+ constant native ConvertLayerStyleFlag takes integer i returns layerstyleflag
125
+ constant native ConvertControlStyleFlag takes integer i returns controlstyleflag
120
126
constant native ConvertConnectionType takes integer i returns connectiontype
121
127
122
128
constant native GetJassArrayLimit takes nothing returns integer
@@ -2573,8 +2579,14 @@ native SetDoodadPitch takes doodad whichDoodad, real pitch returns nothing
2573
2579
native GetDoodadRoll takes doodad whichDoodad returns real
2574
2580
native SetDoodadRoll takes doodad whichDoodad, real roll returns nothing
2575
2581
native SetDoodadOrientation takes doodad whichDoodad, real yaw, real pitch, real roll returns nothing
2582
+ native GetDoodadPlayerColour takes doodad whichDoodad returns playercolor
2583
+ native SetDoodadPlayerColour takes doodad whichDoodad, playercolor color returns nothing
2576
2584
native GetDoodadModel takes doodad whichDoodad returns string
2577
- native SetDoodadModel takes doodad whichDoodad, string whichModel returns nothing
2585
+ native SetDoodadModel takes doodad whichDoodad, string modelFile returns nothing
2586
+ native SetDoodadModelEx takes doodad whichDoodad, string modelFile, integer playerId returns nothing
2587
+ native SetDoodadMaterialTexture takes doodad whichDoodad, string textureName, integer materialId, integer textureIndex returns nothing
2588
+ native SetDoodadTexture takes doodad whichDoodad, string textureName, integer textureIndex returns nothing
2589
+ native SetDoodadReplaceableTexture takes doodad whichDoodad, string textureName, integer textureIndex returns nothing
2578
2590
native IsDoodadVisible takes doodad whichDoodad returns boolean
2579
2591
native ShowDoodad takes doodad whichDoodad, boolean isShow returns nothing
2580
2592
native SetDoodadAnimationWithRarityByIndex takes doodad whichDoodad, integer animIndex, raritycontrol rarity returns nothing
@@ -2789,6 +2801,20 @@ native GetTriggerBuffSourceUnit takes nothing returns unit
2789
2801
native GetTriggerBuffTarget takes nothing returns unit
2790
2802
//
2791
2803
2804
+ // ============================================================================
2805
+ // War3 Image API
2806
+ //
2807
+ // This is API for the "lowest" in terms of hierarchy object type for any and all widgets. Sprites and doodads are exception, however this API can distinguish between them and handle accordingly.
2808
+ native GetWar3ImagePlayerColour takes war3image whichWar3Image returns playercolor // This gets glow/team colour.
2809
+ native SetWar3ImagePlayerColour takes war3image whichWar3Image, playercolor color returns nothing // This sets Glow and Team Colour. Mimics the SetUnitColor.
2810
+ native SetWar3ImageMaterialTexture takes war3image whichWar3Image, string textureName, integer materialId, integer textureIndex returns nothing
2811
+ native SetWar3ImageTexture takes war3image whichWar3Image, string textureName, integer textureIndex returns nothing
2812
+ native SetWar3ImageReplaceableTexture takes war3image whichWar3Image, string textureName, integer textureIndex returns nothing // 1 - TeamColour | 2 - TeamGlow | 11 - Cliff0/1 | 21 - "grabbed texture" for CCursorFrame | 31-37 trees.
2813
+ native GetWar3ImageModel takes war3image whichWar3Image returns string
2814
+ native SetWar3ImageModel takes war3image whichWar3Image, string modelName returns nothing
2815
+ native SetWar3ImageModelEx takes war3image whichWar3Image, string modelName, integer playerColour returns nothing // 0-15, -1 to ignore the colour.
2816
+ //
2817
+
2792
2818
// ============================================================================
2793
2819
// Sprite API
2794
2820
//
@@ -2821,6 +2847,7 @@ native GetSpriteScale takes sprite whichSprite returns real
2821
2847
native SetSpriteScale takes sprite whichSprite, real scale returns nothing
2822
2848
native GetSpriteTimeScale takes sprite whichSprite returns real
2823
2849
native SetSpriteTimeScale takes sprite whichSprite, real timescale returns nothing
2850
+ native GetSpritePlayerColour takes sprite whichSprite returns playercolor
2824
2851
native SetSpritePlayerColour takes sprite whichSprite, playercolor color returns nothing
2825
2852
native GetSpriteColour takes sprite whichSprite returns integer
2826
2853
native SetSpriteColour takes sprite whichSprite, integer colour returns nothing
@@ -2866,7 +2893,7 @@ native SetSpriteAnimationOffsetPercent takes sprite whichSprite, real percent re
2866
2893
//
2867
2894
native GetSpecialEffectSprite takes effect whichEffect returns sprite
2868
2895
native IsSpecialEffectVisible takes effect whichEffect returns boolean
2869
- native SetSpecialEffectVisibility takes effect whichEffect, boolean visibility returns nothing
2896
+ native SetSpecialEffectVisible takes effect whichEffect, boolean visibility returns nothing
2870
2897
native GetSpecialEffectX takes effect whichEffect returns real
2871
2898
native GetSpecialEffectY takes effect whichEffect returns real
2872
2899
native GetSpecialEffectZ takes effect whichEffect returns real
@@ -2885,6 +2912,7 @@ native GetSpecialEffectScale takes effect whichEffect returns real
2885
2912
native SetSpecialEffectScale takes effect whichEffect, real scale returns nothing
2886
2913
native GetSpecialEffectTimeScale takes effect whichEffect returns real
2887
2914
native SetSpecialEffectTimeScale takes effect whichEffect, real timescale returns nothing
2915
+ native GetSpecialEffectPlayerColour takes effect whichEffect returns playercolor
2888
2916
native SetSpecialEffectPlayerColour takes effect whichEffect, playercolor color returns nothing
2889
2917
native GetSpecialEffectColour takes effect whichEffect returns integer
2890
2918
native SetSpecialEffectColour takes effect whichEffect, integer colour returns nothing
@@ -2936,7 +2964,7 @@ native EnumSpecialEffectsInRange takes real x, real y, real radius, boolexpr fil
2936
2964
//
2937
2965
native GetTrackableSprite takes trackable whichTrackable returns sprite
2938
2966
native IsTrackableVisible takes trackable whichTrackable returns boolean
2939
- native SetTrackableVisibility takes trackable whichTrackable, boolean visibility returns nothing
2967
+ native SetTrackableVisible takes trackable whichTrackable, boolean visibility returns nothing
2940
2968
native GetTrackableX takes trackable whichTrackable returns real
2941
2969
native GetTrackableY takes trackable whichTrackable returns real
2942
2970
native GetTrackableZ takes trackable whichTrackable returns real
@@ -2955,6 +2983,7 @@ native GetTrackableScale takes trackable whichTrackable returns real
2955
2983
native SetTrackableScale takes trackable whichTrackable, real scale returns nothing
2956
2984
native GetTrackableTimeScale takes trackable whichTrackable returns real
2957
2985
native SetTrackableTimeScale takes trackable whichTrackable, real timescale returns nothing
2986
+ native GetTrackablePlayerColour takes trackable whichTrackable returns playercolor
2958
2987
native SetTrackablePlayerColour takes trackable whichTrackable, playercolor color returns nothing
2959
2988
native GetTrackableColour takes trackable whichTrackable returns integer
2960
2989
native SetTrackableColour takes trackable whichTrackable, integer colour returns nothing
@@ -3003,6 +3032,7 @@ native EnumTrackablesInRange takes real x, real y, real radius, boolexpr filter,
3003
3032
// ============================================================================
3004
3033
// Widget API
3005
3034
//
3035
+ native GetWidgetUnderCursor takes nothing returns widget // Async
3006
3036
native GetWidgetSprite takes widget whichWidget returns sprite
3007
3037
native GetWidgetTypeId takes widget whichWidget returns integer
3008
3038
native GetWidgetName takes widget whichWidget returns string
@@ -3020,6 +3050,8 @@ native SetWidgetX takes widget whichWidget, real x returns nothing
3020
3050
native SetWidgetY takes widget whichWidget, real y returns nothing
3021
3051
native GetWidgetScreenX takes widget whichWidget returns real
3022
3052
native GetWidgetScreenY takes widget whichWidget returns real
3053
+ native GetWidgetPlayerColour takes widget whichWidget returns playercolor
3054
+ native SetWidgetPlayerColour takes widget whichWidget, playercolor color returns nothing
3023
3055
native GetWidgetVertexColour takes widget whichWidget returns integer
3024
3056
native SetWidgetVertexColour takes widget whichWidget, integer red, integer green, integer blue, integer alpha returns nothing
3025
3057
native GetWidgetTimeScale takes widget whichWidget returns real
@@ -3066,6 +3098,8 @@ native TriggerRegisterWidgetEvent takes trigger whichTrigger, widget whichWidget
3066
3098
// Destructable API
3067
3099
//
3068
3100
3101
+ native GetDestructableUnderCursor takes nothing returns destructable // Async
3102
+
3069
3103
// Field API
3070
3104
native GetDestructableStringField takes destructable whichDestructable, destructablestringfield whichField returns string
3071
3105
native SetDestructableStringField takes destructable whichDestructable, destructablestringfield whichField, string value returns boolean
@@ -3086,6 +3120,8 @@ native SetDestructableY takes destructable whichDestructable, real y returns not
3086
3120
native SetDestructableZ takes destructable whichDestructable, real z returns nothing
3087
3121
native GetDestructableScreenX takes destructable whichDestructable returns real
3088
3122
native GetDestructableScreenY takes destructable whichDestructable returns real
3123
+ native GetDestructablePlayerColour takes destructable whichDestructable returns playercolor
3124
+ native SetDestructablePlayerColour takes destructable whichDestructable, playercolor color returns nothing
3089
3125
native GetDestructableVertexColour takes destructable whichDestructable returns integer
3090
3126
native SetDestructableVertexColour takes destructable whichDestructable, integer red, integer green, integer blue, integer alpha returns nothing
3091
3127
native GetDestructableTimeScale takes destructable whichDestructable returns real
@@ -3159,6 +3195,8 @@ native SetItemStringField takes item whichItem, itemstringfield whichField, stri
3159
3195
//
3160
3196
3161
3197
// Normal API
3198
+ native GetItemUnderCursor takes nothing returns item // Async
3199
+ native IsItemDroppable takes item whichItem returns boolean
3162
3200
native GetItemSprite takes item whichItem returns sprite
3163
3201
native GetItemScreenX takes item whichItem returns real
3164
3202
native GetItemScreenY takes item whichItem returns real
@@ -3177,6 +3215,8 @@ native SetItemCooldown takes item whichItem, real cooldown returns nothing
3177
3215
native StartItemCooldown takes unit whichUnit, item whichItem, real cooldown returns nothing
3178
3216
native GetItemRemainingCooldown takes item whichItem returns real
3179
3217
native SetItemRemainingCooldown takes item whichItem, real cooldown returns nothing
3218
+ native GetItemPlayerColour takes item whichItem returns playercolor
3219
+ native SetItemPlayerColour takes item whichItem, playercolor color returns nothing
3180
3220
native GetItemVertexColour takes item whichItem returns integer
3181
3221
native SetItemVertexColour takes item whichItem, integer red, integer green, integer blue, integer alpha returns nothing
3182
3222
native GetItemTimeScale takes item whichItem returns real
@@ -3281,11 +3321,11 @@ native SetUnitWeaponStringField takes unit whichUnit, unitweaponstringfield whic
3281
3321
//
3282
3322
3283
3323
// Normal API
3324
+ native GetUnitUnderCursor takes nothing returns unit // Async
3284
3325
native GetUnitSprite takes unit whichUnit returns sprite
3285
3326
native GetUnitScreenX takes unit whichUnit returns real
3286
3327
native GetUnitScreenY takes unit whichUnit returns real
3287
3328
native SetUnitTypeId takes unit whichUnit, integer newId returns nothing
3288
- native GetUnitUnderCursor takes nothing returns unit
3289
3329
native GetUnitSelectedCountByPlayer takes player whichPlayer returns integer
3290
3330
native GetUnitSelected takes player whichPlayer returns unit // Always returns Active unit, aka the "main" one whose UI is drawn.
3291
3331
native GetUnitInSelectionByIndex takes player whichPlayer, integer index returns unit
@@ -3341,14 +3381,16 @@ native GetUnitBuffLevel takes unit whichUnit, integer buffId returns integer
3341
3381
native UnitCancelTimedLife takes unit whichUnit returns nothing
3342
3382
native GetUnitRemainingTimedLife takes unit whichUnit returns real
3343
3383
native SetUnitRemainingTimedLife takes unit whichUnit, real duration returns nothing
3384
+ native IsUnitGhosted takes unit whichUnit returns boolean
3385
+ native SetUnitGhosted takes unit whichUnit, boolean state, real transitionTime returns nothing // This is similar to Invisibility, but uses Ghost (Agho) as base logic, just like windwalk. Attacking from this state does not cause the unit to exit Ghost state.
3344
3386
native IsUnitSelectable takes unit whichUnit returns boolean
3345
3387
native SetUnitSelectable takes unit whichUnit, boolean selectable returns nothing
3346
3388
native IsUnitTargetable takes unit whichUnit returns boolean
3347
3389
native SetUnitTargetable takes unit whichUnit, boolean targetable returns nothing
3348
3390
native IsUnitTruesightImmune takes unit whichUnit returns boolean
3349
3391
native SetUnitTruesightImmuneState takes unit whichUnit, boolean state returns nothing
3350
- native SetUnitVisibleByPlayer takes unit whichUnit, player whichPlayer, boolean flag returns nothing // experimental
3351
- native SetUnitDetectableByPlayer takes unit whichUnit, player whichPlayer, boolean flag returns nothing // experimental
3392
+ native SetUnitVisibleByPlayer takes unit whichUnit, player whichPlayer, boolean flag returns nothing // These are supposed to be used in EVENT_PLAYER_UNIT_DETECTED и EVENT_UNIT_DETECTED events.
3393
+ native SetUnitDetectableByPlayer takes unit whichUnit, player whichPlayer, boolean flag returns nothing // They are supposed to suppress the vision processing, but it's quite annoying to test/verify.
3352
3394
native GetUnitZ takes unit whichUnit returns real
3353
3395
native GetUnitDamageReduction takes unit whichUnit returns real
3354
3396
native GetUnitMagicResistByType takes unit whichUnit, integer resistType returns real
@@ -3410,6 +3452,8 @@ native GetUnitBaseMoveSpeed takes unit whichUnit returns real
3410
3452
native SetUnitBaseMoveSpeed takes unit whichUnit, real baseMoveSpeed returns nothing
3411
3453
native GetUnitBonusMoveSpeedPercent takes unit whichUnit returns real
3412
3454
native SetUnitBonusMoveSpeedPercent takes unit whichUnit, real bonusMoveSpeedPercent returns nothing
3455
+ native GetUnitPlayerColour takes unit whichUnit returns playercolor
3456
+ native SetUnitPlayerColour takes unit whichUnit, playercolor color returns nothing
3413
3457
native GetUnitVertexColour takes unit whichUnit returns integer
3414
3458
native UnitAddItemToSlot takes unit whichUnit, item whichItem, integer itemSlot returns boolean
3415
3459
native ReviveUnit takes unit whichUnit, real x, real y returns boolean
@@ -3570,6 +3614,7 @@ native GetProjectileScale takes projectile whichProjectile returns real
3570
3614
native SetProjectileScale takes projectile whichProjectile, real scale returns nothing
3571
3615
native GetProjectileTimeScale takes projectile whichProjectile returns real
3572
3616
native SetProjectileTimeScale takes projectile whichProjectile, real timescale returns nothing
3617
+ native GetProjectilePlayerColour takes projectile whichProjectile returns playercolor
3573
3618
native SetProjectilePlayerColour takes projectile whichProjectile, playercolor color returns nothing
3574
3619
native GetProjectileColour takes projectile whichProjectile returns integer
3575
3620
native SetProjectileColour takes projectile whichProjectile, integer colour returns nothing
@@ -3714,10 +3759,10 @@ native GetFrameModel takes framehandle whichFrame returns string
3714
3759
native SetFrameModel takes framehandle whichFrame, string model, integer cameraIndex returns nothing
3715
3760
native IsFrameEnabled takes framehandle whichFrame returns boolean
3716
3761
native SetFrameEnabled takes framehandle whichFrame, boolean enabled returns nothing
3717
- native IsFrameDraggable takes framehandle whichFrame returns boolean
3718
- native SetFrameDraggable takes framehandle whichFrame, boolean enabled returns nothing
3719
- native GetFrameTrackState takes framehandle whichFrame returns integer
3720
- native SetFrameTrackState takes framehandle whichFrame, integer trackState returns nothing // 0 - NONE | 1 - Track | 2 - Ignore Track
3762
+ native IsFrameLayerFlag takes framehandle whichFrame, layerstyleflag whichLayerStyle returns boolean
3763
+ native SetFrameLayerFlag takes framehandle whichFrame, layerstyleflag whichLayerStyle, boolean isSet returns nothing
3764
+ native IsFrameControlFlag takes framehandle whichFrame, controlstyleflag whichControlStyle returns boolean
3765
+ native SetFrameControlFlag takes framehandle whichFrame, controlstyleflag whichControlStyle, boolean isSet returns nothing
3721
3766
native GetFrameColourEx takes framehandle whichFrame, integer textureId returns integer
3722
3767
native SetFrameColourEx takes framehandle whichFrame, integer textureId, integer colour returns nothing
3723
3768
native GetFrameColour takes framehandle whichFrame returns integer
@@ -3726,7 +3771,7 @@ native GetFrameAlphaEx takes framehandle whichFrame, integer textureId returns i
3726
3771
native SetFrameAlphaEx takes framehandle whichFrame, integer textureId, integer alpha returns nothing
3727
3772
native GetFrameAlpha takes framehandle whichFrame returns integer
3728
3773
native SetFrameAlpha takes framehandle whichFrame, integer alpha returns nothing
3729
- native GetFrameTexture takes framehandle whichFrame, integer textureId returns string // 0 - Disabled | 1 - Enabled | 2 - Pushed | 3 = Current
3774
+ native GetFrameTexture takes framehandle whichFrame, integer textureId returns string // 0 - Current | 1 - Enabled | 2 - Pushed | 3 - Disabled | 4 - ? | 5 - Check Enabled | 6 - Check Disabled
3730
3775
native SetFrameBackdropTexture takes framehandle whichFrame, integer textureId, string backgroundTextureFile, boolean allowTransparency, boolean blend, string borderTextureFile, integer borderFlags, boolean isControlBackdrop returns nothing
3731
3776
native SetFrameTextureEx takes framehandle whichFrame, integer textureId, string backgroundTextureFile, boolean blend, string borderTextureFile, integer borderFlags returns nothing
3732
3777
native SetFrameTexture takes framehandle whichFrame, string textureFile, integer textureId, boolean blend returns nothing
@@ -3735,6 +3780,7 @@ native SetFrameMouseCaged takes framehandle whichFrame, boolean enable returns n
3735
3780
native GetFrameValue takes framehandle whichFrame returns real
3736
3781
native SetFrameValue takes framehandle whichFrame, real value returns nothing // fires event by default
3737
3782
native SetFrameValueEx takes framehandle whichFrame, real value, boolean isFireEvent returns nothing
3783
+ native GetFrameMinMaxValues takes framehandle whichFrame, integer valueId returns real // 0 = min | 1 = max
3738
3784
native SetFrameMinMaxValues takes framehandle whichFrame, real minVal, real maxVal returns nothing
3739
3785
native GetFrameStepSize takes framehandle whichFrame returns real
3740
3786
native SetFrameStepSize takes framehandle whichFrame, real stepSize returns nothing
@@ -3821,6 +3867,7 @@ native GetFrameSpriteScale takes framehandle whichFrame returns real
3821
3867
native SetFrameSpriteScale takes framehandle whichFrame, real scale returns nothing
3822
3868
native GetFrameSpriteTimeScale takes framehandle whichFrame returns real
3823
3869
native SetFrameSpriteTimeScale takes framehandle whichFrame, real timescale returns nothing
3870
+ native GetFrameSpritePlayerColour takes framehandle whichFrame returns playercolor
3824
3871
native SetFrameSpritePlayerColour takes framehandle whichFrame, playercolor color returns nothing
3825
3872
native GetFrameSpriteAlpha takes framehandle whichFrame returns integer
3826
3873
native SetFrameSpriteAlpha takes framehandle whichFrame, integer alpha returns boolean
0 commit comments