/
ability.j
362 lines (274 loc) · 12.2 KB
/
ability.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
/**
Set the ability tooltip (basic) of an ability at runtime.
@patch 1.29
*/
native BlzSetAbilityTooltip takes integer abilCode, string tooltip, integer level returns nothing
/**
Set the activated ability tooltip (for abilities such as defend which have an “active” state) of an ability at runtime.
@patch 1.29
*/
native BlzSetAbilityActivatedTooltip takes integer abilCode, string tooltip, integer level returns nothing
/**
Set the ability tooltip (extended) of an ability at runtime.
@patch 1.29
*/
native BlzSetAbilityExtendedTooltip takes integer abilCode, string extendedTooltip, integer level returns nothing
/**
Set the activated ability tooltip (Extended state for abilities such as defend which have an “active” state) of an ability at runtime.
@patch 1.29
*/
native BlzSetAbilityActivatedExtendedTooltip takes integer abilCode, string extendedTooltip, integer level returns nothing
/**
Set the research ability tooltip (For abilities that can be learned (all abilities have this, but only hero abilities show it on the object editor, you can still change it with these natives)) of an ability at runtime.
@patch 1.29
*/
native BlzSetAbilityResearchTooltip takes integer abilCode, string researchTooltip, integer level returns nothing
/**
Set the research ability tooltip (Extended state for abilities that can be learned (all abilities have this, but only hero abilities show it on the object editor, you can still change it with these natives)) of an ability at runtime.
@patch 1.29
*/
native BlzSetAbilityResearchExtendedTooltip takes integer abilCode, string researchExtendedTooltip, integer level returns nothing
/**
Get the ability tooltip of an ability.
Supports Unit/Item/Ability/Tech Codes
@async
@patch 1.29
*/
native BlzGetAbilityTooltip takes integer abilCode, integer level returns string
/**
Get the ability activated tooltip (for abilities that have an “activated” state) of an ability.
@async
@patch 1.29
*/
native BlzGetAbilityActivatedTooltip takes integer abilCode, integer level returns string
/**
Get the extended ability tooltip of an ability.
Supports Unit/Item/Ability/Tech Codes
@async
@patch 1.29
*/
native BlzGetAbilityExtendedTooltip takes integer abilCode, integer level returns string
/**
Get the extended ability activated tooltip (for abilities that have an “activated” state such as defend, Avatar, etc.) of an ability.
@async
@patch 1.29
*/
native BlzGetAbilityActivatedExtendedTooltip takes integer abilCode, integer level returns string
/**
Get the ability research tooltip (for abilities that can be researched/learned such as defend, hero abilities, etc) of an ability.
@async
@patch 1.29
*/
native BlzGetAbilityResearchTooltip takes integer abilCode, integer level returns string
/**
Get the extended ability research tooltip (for abilities that can be researched/learned such as defend, hero abilities, etc) of an ability.
@async
@patch 1.29
*/
native BlzGetAbilityResearchExtendedTooltip takes integer abilCode, integer level returns string
/**
Change(set) an ability’s icon at runtime.
@patch 1.29
*/
native BlzSetAbilityIcon takes integer abilCode, string iconPath returns nothing
/**
Get an ability’s icon at runtime, returns the icon path.
Supports Unit/Item/Ability/Tech Codes
@patch 1.29
*/
native BlzGetAbilityIcon takes integer abilCode returns string
/**
Change(set) an ability’s activated icon (this is for abilities that have an activated state such as defend, avatar, etc) at runtime.
@patch 1.29
*/
native BlzSetAbilityActivatedIcon takes integer abilCode, string iconPath returns nothing
/**
Get an ability’s activated icon (this is for abilities that have an activated state such as defend, avatar, etc) at runtime, returns icon path.
@patch 1.29
*/
native BlzGetAbilityActivatedIcon takes integer abilCode returns string
/**
Get the ability X coordinate (Cartesian System) of the ability icon in the default 4x3 grid.
@patch 1.29
*/
native BlzGetAbilityPosX takes integer abilCode returns integer
/**
Get the ability Y coordinate (Cartesian System) of the ability icon in the default 4x3 grid.
@patch 1.29
*/
native BlzGetAbilityPosY takes integer abilCode returns integer
/**
Set the ability X coordinate (Cartesian System) of the ability icon in the default 4x3 grid.
As of the 1.31 PTR while you can specify the position of abilities such as “Build” directly in the object editor, you cannot do it with this native.
@patch 1.29
*/
native BlzSetAbilityPosX takes integer abilCode, integer x returns nothing
/**
Set the ability Y coordinate (Cartesian System) of the ability icon in the default 4x3 grid.
@note As of the 1.31 PTR while you can specify the position of abilities such as “Build” directly in the object editor, you cannot do it with this native.
@patch 1.29
*/
native BlzSetAbilityPosY takes integer abilCode, integer y returns nothing
/**
Get the ability X coordinate (Cartesian System) of the activated ability icon in the default 4x3 grid.
@patch 1.29
*/
native BlzGetAbilityActivatedPosX takes integer abilCode returns integer
/**
Get the ability Y coordinate (Cartesian System) of the activated ability icon in the default 4x3 grid.
@patch 1.29
*/
native BlzGetAbilityActivatedPosY takes integer abilCode returns integer
/**
Change(Set) the ability X coordinate (Cartesian System) of the activated ability icon in the default 4x3 grid.
@patch 1.29
*/
native BlzSetAbilityActivatedPosX takes integer abilCode, integer x returns nothing
/**
Change(Set) the ability Y coordinate (Cartesian System) of the activated ability icon in the default 4x3 grid.
@patch 1.29
*/
native BlzSetAbilityActivatedPosY takes integer abilCode, integer y returns nothing
/**
Requires an ability ID and the ability level and returns the ability’s (at the level passed) mana cost.
@note Since 1.31: use Level 0 to read manacosts of Level 1.
@patch 1.29
*/
native BlzGetAbilityManaCost takes integer abilId, integer level returns integer
/**
Requires an ability ID and the ability level and returns the ability’s (at the level passed) cooldown. *Since 1.31: use Level 0 to read cooldown from Level 1.*
@patch 1.29
*/
native BlzGetAbilityCooldown takes integer abilId, integer level returns real
// Intanced Object Operations
// Ability
/**
@patch 1.31
*/
native BlzGetAbilityBooleanField takes ability whichAbility, abilitybooleanfield whichField returns boolean
/**
@patch 1.31
*/
native BlzGetAbilityIntegerField takes ability whichAbility, abilityintegerfield whichField returns integer
/**
@patch 1.31
*/
native BlzGetAbilityRealField takes ability whichAbility, abilityrealfield whichField returns real
/**
@patch 1.31
*/
native BlzGetAbilityStringField takes ability whichAbility, abilitystringfield whichField returns string
/**
@patch 1.31
@bug Should not be used (crash): Use `BlzGetAbilityIntegerLevelField`
*/
native BlzGetAbilityBooleanLevelField takes ability whichAbility, abilitybooleanlevelfield whichField, integer level returns boolean
/**
@patch 1.31
*/
native BlzGetAbilityIntegerLevelField takes ability whichAbility, abilityintegerlevelfield whichField, integer level returns integer
/**
@patch 1.31
*/
native BlzGetAbilityRealLevelField takes ability whichAbility, abilityreallevelfield whichField, integer level returns real
/**
@patch 1.31
*/
native BlzGetAbilityStringLevelField takes ability whichAbility, abilitystringlevelfield whichField, integer level returns string
/**
@patch 1.31
*/
native BlzGetAbilityBooleanLevelArrayField takes ability whichAbility, abilitybooleanlevelarrayfield whichField, integer level, integer index returns boolean
/**
@patch 1.31
*/
native BlzGetAbilityIntegerLevelArrayField takes ability whichAbility, abilityintegerlevelarrayfield whichField, integer level, integer index returns integer
/**
@patch 1.31
*/
native BlzGetAbilityRealLevelArrayField takes ability whichAbility, abilityreallevelarrayfield whichField, integer level, integer index returns real
/**
@patch 1.31
*/
native BlzGetAbilityStringLevelArrayField takes ability whichAbility, abilitystringlevelarrayfield whichField, integer level, integer index returns string
/**
@patch 1.31
*/
native BlzSetAbilityBooleanField takes ability whichAbility, abilitybooleanfield whichField, boolean value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityIntegerField takes ability whichAbility, abilityintegerfield whichField, integer value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityRealField takes ability whichAbility, abilityrealfield whichField, real value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityStringField takes ability whichAbility, abilitystringfield whichField, string value returns boolean
/**
@patch 1.31
@bug Should not be used (crash): Use `BlzSetAbilityIntegerLevelField`
*/
native BlzSetAbilityBooleanLevelField takes ability whichAbility, abilitybooleanlevelfield whichField, integer level, boolean value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityIntegerLevelField takes ability whichAbility, abilityintegerlevelfield whichField, integer level, integer value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityRealLevelField takes ability whichAbility, abilityreallevelfield whichField, integer level, real value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityStringLevelField takes ability whichAbility, abilitystringlevelfield whichField, integer level, string value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityBooleanLevelArrayField takes ability whichAbility, abilitybooleanlevelarrayfield whichField, integer level, integer index, boolean value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityIntegerLevelArrayField takes ability whichAbility, abilityintegerlevelarrayfield whichField, integer level, integer index, integer value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityRealLevelArrayField takes ability whichAbility, abilityreallevelarrayfield whichField, integer level, integer index, real value returns boolean
/**
@patch 1.31
*/
native BlzSetAbilityStringLevelArrayField takes ability whichAbility, abilitystringlevelarrayfield whichField, integer level, integer index, string value returns boolean
/**
@patch 1.31
*/
native BlzAddAbilityBooleanLevelArrayField takes ability whichAbility, abilitybooleanlevelarrayfield whichField, integer level, boolean value returns boolean
/**
@patch 1.31
*/
native BlzAddAbilityIntegerLevelArrayField takes ability whichAbility, abilityintegerlevelarrayfield whichField, integer level, integer value returns boolean
/**
@patch 1.31
*/
native BlzAddAbilityRealLevelArrayField takes ability whichAbility, abilityreallevelarrayfield whichField, integer level, real value returns boolean
/**
@patch 1.31
*/
native BlzAddAbilityStringLevelArrayField takes ability whichAbility, abilitystringlevelarrayfield whichField, integer level, string value returns boolean
/**
@patch 1.31
*/
native BlzRemoveAbilityBooleanLevelArrayField takes ability whichAbility, abilitybooleanlevelarrayfield whichField, integer level, boolean value returns boolean
/**
@patch 1.31
*/
native BlzRemoveAbilityIntegerLevelArrayField takes ability whichAbility, abilityintegerlevelarrayfield whichField, integer level, integer value returns boolean
/**
@patch 1.31
*/
native BlzRemoveAbilityRealLevelArrayField takes ability whichAbility, abilityreallevelarrayfield whichField, integer level, real value returns boolean
/**
@patch 1.31
*/
native BlzRemoveAbilityStringLevelArrayField takes ability whichAbility, abilitystringlevelarrayfield whichField, integer level, string value returns boolean