Skip to content

Commit 2e59d89

Browse files
committed
v1.1.4.167
1 parent 2b802be commit 2e59d89

File tree

3 files changed

+158
-48
lines changed

3 files changed

+158
-48
lines changed

src/jass.tmLanguage.json

+2-2
Large diffs are not rendered by default.

static/UjAPI.j

+67-20
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ type bonetype extends attachmenttype
1111
type animtype extends mapdatatype
1212
type subanimtype extends animtype
1313
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
1718
type framehandle extends handle
19+
type commandbuttoneffect extends handle
1820
type originframetype extends handle
1921
type framepointtype extends handle
2022
type textaligntype extends handle
@@ -47,17 +49,19 @@ type unitweaponintegerfield extends agentdatafield
4749
type unitweaponrealfield extends agentdatafield
4850
type unitweaponbooleanfield extends agentdatafield
4951
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
5460
type armortype extends handle
5561
type heroattribute extends handle
5662
type defensetype extends handle
5763
type regentype extends handle
5864
type unitcategory extends handle
59-
type pathingflag extends handle
60-
type commandbuttoneffect extends handle
6165
type timetype extends handle
6266
type variabletype extends handle
6367
type renderstage extends handle
@@ -117,6 +121,8 @@ constant native ConvertPathingFlag takes integer i returns pathingflag
117121
constant native ConvertTimeType takes integer i returns timetype
118122
constant native ConvertVariableType takes integer i returns variabletype
119123
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
120126
constant native ConvertConnectionType takes integer i returns connectiontype
121127

122128
constant native GetJassArrayLimit takes nothing returns integer
@@ -2573,8 +2579,14 @@ native SetDoodadPitch takes doodad whichDoodad, real pitch returns nothing
25732579
native GetDoodadRoll takes doodad whichDoodad returns real
25742580
native SetDoodadRoll takes doodad whichDoodad, real roll returns nothing
25752581
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
25762584
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
25782590
native IsDoodadVisible takes doodad whichDoodad returns boolean
25792591
native ShowDoodad takes doodad whichDoodad, boolean isShow returns nothing
25802592
native SetDoodadAnimationWithRarityByIndex takes doodad whichDoodad, integer animIndex, raritycontrol rarity returns nothing
@@ -2789,6 +2801,20 @@ native GetTriggerBuffSourceUnit takes nothing returns unit
27892801
native GetTriggerBuffTarget takes nothing returns unit
27902802
//
27912803

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+
27922818
//============================================================================
27932819
// Sprite API
27942820
//
@@ -2821,6 +2847,7 @@ native GetSpriteScale takes sprite whichSprite returns real
28212847
native SetSpriteScale takes sprite whichSprite, real scale returns nothing
28222848
native GetSpriteTimeScale takes sprite whichSprite returns real
28232849
native SetSpriteTimeScale takes sprite whichSprite, real timescale returns nothing
2850+
native GetSpritePlayerColour takes sprite whichSprite returns playercolor
28242851
native SetSpritePlayerColour takes sprite whichSprite, playercolor color returns nothing
28252852
native GetSpriteColour takes sprite whichSprite returns integer
28262853
native SetSpriteColour takes sprite whichSprite, integer colour returns nothing
@@ -2866,7 +2893,7 @@ native SetSpriteAnimationOffsetPercent takes sprite whichSprite, real percent re
28662893
//
28672894
native GetSpecialEffectSprite takes effect whichEffect returns sprite
28682895
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
28702897
native GetSpecialEffectX takes effect whichEffect returns real
28712898
native GetSpecialEffectY takes effect whichEffect returns real
28722899
native GetSpecialEffectZ takes effect whichEffect returns real
@@ -2885,6 +2912,7 @@ native GetSpecialEffectScale takes effect whichEffect returns real
28852912
native SetSpecialEffectScale takes effect whichEffect, real scale returns nothing
28862913
native GetSpecialEffectTimeScale takes effect whichEffect returns real
28872914
native SetSpecialEffectTimeScale takes effect whichEffect, real timescale returns nothing
2915+
native GetSpecialEffectPlayerColour takes effect whichEffect returns playercolor
28882916
native SetSpecialEffectPlayerColour takes effect whichEffect, playercolor color returns nothing
28892917
native GetSpecialEffectColour takes effect whichEffect returns integer
28902918
native SetSpecialEffectColour takes effect whichEffect, integer colour returns nothing
@@ -2936,7 +2964,7 @@ native EnumSpecialEffectsInRange takes real x, real y, real radius, boolexpr fil
29362964
//
29372965
native GetTrackableSprite takes trackable whichTrackable returns sprite
29382966
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
29402968
native GetTrackableX takes trackable whichTrackable returns real
29412969
native GetTrackableY takes trackable whichTrackable returns real
29422970
native GetTrackableZ takes trackable whichTrackable returns real
@@ -2955,6 +2983,7 @@ native GetTrackableScale takes trackable whichTrackable returns real
29552983
native SetTrackableScale takes trackable whichTrackable, real scale returns nothing
29562984
native GetTrackableTimeScale takes trackable whichTrackable returns real
29572985
native SetTrackableTimeScale takes trackable whichTrackable, real timescale returns nothing
2986+
native GetTrackablePlayerColour takes trackable whichTrackable returns playercolor
29582987
native SetTrackablePlayerColour takes trackable whichTrackable, playercolor color returns nothing
29592988
native GetTrackableColour takes trackable whichTrackable returns integer
29602989
native SetTrackableColour takes trackable whichTrackable, integer colour returns nothing
@@ -3003,6 +3032,7 @@ native EnumTrackablesInRange takes real x, real y, real radius, boolexpr filter,
30033032
//============================================================================
30043033
// Widget API
30053034
//
3035+
native GetWidgetUnderCursor takes nothing returns widget // Async
30063036
native GetWidgetSprite takes widget whichWidget returns sprite
30073037
native GetWidgetTypeId takes widget whichWidget returns integer
30083038
native GetWidgetName takes widget whichWidget returns string
@@ -3020,6 +3050,8 @@ native SetWidgetX takes widget whichWidget, real x returns nothing
30203050
native SetWidgetY takes widget whichWidget, real y returns nothing
30213051
native GetWidgetScreenX takes widget whichWidget returns real
30223052
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
30233055
native GetWidgetVertexColour takes widget whichWidget returns integer
30243056
native SetWidgetVertexColour takes widget whichWidget, integer red, integer green, integer blue, integer alpha returns nothing
30253057
native GetWidgetTimeScale takes widget whichWidget returns real
@@ -3066,6 +3098,8 @@ native TriggerRegisterWidgetEvent takes trigger whichTrigger, widget whichWidget
30663098
// Destructable API
30673099
//
30683100

3101+
native GetDestructableUnderCursor takes nothing returns destructable // Async
3102+
30693103
// Field API
30703104
native GetDestructableStringField takes destructable whichDestructable, destructablestringfield whichField returns string
30713105
native SetDestructableStringField takes destructable whichDestructable, destructablestringfield whichField, string value returns boolean
@@ -3086,6 +3120,8 @@ native SetDestructableY takes destructable whichDestructable, real y returns not
30863120
native SetDestructableZ takes destructable whichDestructable, real z returns nothing
30873121
native GetDestructableScreenX takes destructable whichDestructable returns real
30883122
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
30893125
native GetDestructableVertexColour takes destructable whichDestructable returns integer
30903126
native SetDestructableVertexColour takes destructable whichDestructable, integer red, integer green, integer blue, integer alpha returns nothing
30913127
native GetDestructableTimeScale takes destructable whichDestructable returns real
@@ -3159,6 +3195,8 @@ native SetItemStringField takes item whichItem, itemstringfield whichField, stri
31593195
//
31603196

31613197
// Normal API
3198+
native GetItemUnderCursor takes nothing returns item // Async
3199+
native IsItemDroppable takes item whichItem returns boolean
31623200
native GetItemSprite takes item whichItem returns sprite
31633201
native GetItemScreenX takes item whichItem returns real
31643202
native GetItemScreenY takes item whichItem returns real
@@ -3177,6 +3215,8 @@ native SetItemCooldown takes item whichItem, real cooldown returns nothing
31773215
native StartItemCooldown takes unit whichUnit, item whichItem, real cooldown returns nothing
31783216
native GetItemRemainingCooldown takes item whichItem returns real
31793217
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
31803220
native GetItemVertexColour takes item whichItem returns integer
31813221
native SetItemVertexColour takes item whichItem, integer red, integer green, integer blue, integer alpha returns nothing
31823222
native GetItemTimeScale takes item whichItem returns real
@@ -3281,11 +3321,11 @@ native SetUnitWeaponStringField takes unit whichUnit, unitweaponstringfield whic
32813321
//
32823322

32833323
// Normal API
3324+
native GetUnitUnderCursor takes nothing returns unit // Async
32843325
native GetUnitSprite takes unit whichUnit returns sprite
32853326
native GetUnitScreenX takes unit whichUnit returns real
32863327
native GetUnitScreenY takes unit whichUnit returns real
32873328
native SetUnitTypeId takes unit whichUnit, integer newId returns nothing
3288-
native GetUnitUnderCursor takes nothing returns unit
32893329
native GetUnitSelectedCountByPlayer takes player whichPlayer returns integer
32903330
native GetUnitSelected takes player whichPlayer returns unit // Always returns Active unit, aka the "main" one whose UI is drawn.
32913331
native GetUnitInSelectionByIndex takes player whichPlayer, integer index returns unit
@@ -3341,14 +3381,16 @@ native GetUnitBuffLevel takes unit whichUnit, integer buffId returns integer
33413381
native UnitCancelTimedLife takes unit whichUnit returns nothing
33423382
native GetUnitRemainingTimedLife takes unit whichUnit returns real
33433383
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.
33443386
native IsUnitSelectable takes unit whichUnit returns boolean
33453387
native SetUnitSelectable takes unit whichUnit, boolean selectable returns nothing
33463388
native IsUnitTargetable takes unit whichUnit returns boolean
33473389
native SetUnitTargetable takes unit whichUnit, boolean targetable returns nothing
33483390
native IsUnitTruesightImmune takes unit whichUnit returns boolean
33493391
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.
33523394
native GetUnitZ takes unit whichUnit returns real
33533395
native GetUnitDamageReduction takes unit whichUnit returns real
33543396
native GetUnitMagicResistByType takes unit whichUnit, integer resistType returns real
@@ -3410,6 +3452,8 @@ native GetUnitBaseMoveSpeed takes unit whichUnit returns real
34103452
native SetUnitBaseMoveSpeed takes unit whichUnit, real baseMoveSpeed returns nothing
34113453
native GetUnitBonusMoveSpeedPercent takes unit whichUnit returns real
34123454
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
34133457
native GetUnitVertexColour takes unit whichUnit returns integer
34143458
native UnitAddItemToSlot takes unit whichUnit, item whichItem, integer itemSlot returns boolean
34153459
native ReviveUnit takes unit whichUnit, real x, real y returns boolean
@@ -3570,6 +3614,7 @@ native GetProjectileScale takes projectile whichProjectile returns real
35703614
native SetProjectileScale takes projectile whichProjectile, real scale returns nothing
35713615
native GetProjectileTimeScale takes projectile whichProjectile returns real
35723616
native SetProjectileTimeScale takes projectile whichProjectile, real timescale returns nothing
3617+
native GetProjectilePlayerColour takes projectile whichProjectile returns playercolor
35733618
native SetProjectilePlayerColour takes projectile whichProjectile, playercolor color returns nothing
35743619
native GetProjectileColour takes projectile whichProjectile returns integer
35753620
native SetProjectileColour takes projectile whichProjectile, integer colour returns nothing
@@ -3714,10 +3759,10 @@ native GetFrameModel takes framehandle whichFrame returns string
37143759
native SetFrameModel takes framehandle whichFrame, string model, integer cameraIndex returns nothing
37153760
native IsFrameEnabled takes framehandle whichFrame returns boolean
37163761
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
37213766
native GetFrameColourEx takes framehandle whichFrame, integer textureId returns integer
37223767
native SetFrameColourEx takes framehandle whichFrame, integer textureId, integer colour returns nothing
37233768
native GetFrameColour takes framehandle whichFrame returns integer
@@ -3726,7 +3771,7 @@ native GetFrameAlphaEx takes framehandle whichFrame, integer textureId returns i
37263771
native SetFrameAlphaEx takes framehandle whichFrame, integer textureId, integer alpha returns nothing
37273772
native GetFrameAlpha takes framehandle whichFrame returns integer
37283773
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
37303775
native SetFrameBackdropTexture takes framehandle whichFrame, integer textureId, string backgroundTextureFile, boolean allowTransparency, boolean blend, string borderTextureFile, integer borderFlags, boolean isControlBackdrop returns nothing
37313776
native SetFrameTextureEx takes framehandle whichFrame, integer textureId, string backgroundTextureFile, boolean blend, string borderTextureFile, integer borderFlags returns nothing
37323777
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
37353780
native GetFrameValue takes framehandle whichFrame returns real
37363781
native SetFrameValue takes framehandle whichFrame, real value returns nothing // fires event by default
37373782
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
37383784
native SetFrameMinMaxValues takes framehandle whichFrame, real minVal, real maxVal returns nothing
37393785
native GetFrameStepSize takes framehandle whichFrame returns real
37403786
native SetFrameStepSize takes framehandle whichFrame, real stepSize returns nothing
@@ -3821,6 +3867,7 @@ native GetFrameSpriteScale takes framehandle whichFrame returns real
38213867
native SetFrameSpriteScale takes framehandle whichFrame, real scale returns nothing
38223868
native GetFrameSpriteTimeScale takes framehandle whichFrame returns real
38233869
native SetFrameSpriteTimeScale takes framehandle whichFrame, real timescale returns nothing
3870+
native GetFrameSpritePlayerColour takes framehandle whichFrame returns playercolor
38243871
native SetFrameSpritePlayerColour takes framehandle whichFrame, playercolor color returns nothing
38253872
native GetFrameSpriteAlpha takes framehandle whichFrame returns integer
38263873
native SetFrameSpriteAlpha takes framehandle whichFrame, integer alpha returns boolean

0 commit comments

Comments
 (0)