wuira 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +15 -12
  3. package/docs/source-converters.md +5 -5
  4. package/docs/spells.md +1 -1
  5. package/lib/datasources/NativeApi.d.ts +319 -0
  6. package/lib/datasources/NativeApi.lua +1114 -0
  7. package/lib/datasources/UseSource.d.ts +41 -43
  8. package/lib/datasources/index.d.ts +3 -25
  9. package/lib/datasources/index.lua +45 -74
  10. package/lib/helpers/Auras.d.ts +5 -0
  11. package/lib/helpers/Auras.lua +47 -0
  12. package/lib/helpers/Range.d.ts +2 -0
  13. package/lib/helpers/Range.lua +30 -0
  14. package/lib/helpers/index.d.ts +2 -0
  15. package/lib/helpers/index.lua +12 -0
  16. package/lib/index.d.ts +1 -0
  17. package/lib/index.lua +6 -0
  18. package/lib/platform/forever.d.ts +3 -0
  19. package/lib/rendering/progress.lua +5 -150
  20. package/lib/ui/UnitPortrait.d.ts +1 -2
  21. package/lib/ui/UnitPortrait.lua +11 -18
  22. package/package.json +8 -1
  23. package/lib/datasources/AuraTimer.d.ts +0 -21
  24. package/lib/datasources/AuraTimer.lua +0 -334
  25. package/lib/datasources/Auras.d.ts +0 -32
  26. package/lib/datasources/Auras.lua +0 -300
  27. package/lib/datasources/CastTimer.d.ts +0 -9
  28. package/lib/datasources/CastTimer.lua +0 -255
  29. package/lib/datasources/EditModeLayouts.d.ts +0 -33
  30. package/lib/datasources/EditModeLayouts.lua +0 -698
  31. package/lib/datasources/GroupMembers.d.ts +0 -24
  32. package/lib/datasources/GroupMembers.lua +0 -477
  33. package/lib/datasources/GroupRoster.d.ts +0 -28
  34. package/lib/datasources/GroupRoster.lua +0 -622
  35. package/lib/datasources/KnownSpells.d.ts +0 -33
  36. package/lib/datasources/KnownSpells.lua +0 -1077
  37. package/lib/datasources/ManaRegenTimer.d.ts +0 -29
  38. package/lib/datasources/ManaRegenTimer.lua +0 -683
  39. package/lib/datasources/Resources.d.ts +0 -81
  40. package/lib/datasources/Resources.lua +0 -907
  41. package/lib/datasources/SpellCooldown.d.ts +0 -12
  42. package/lib/datasources/SpellCooldown.lua +0 -240
  43. package/lib/datasources/SpellSource.d.ts +0 -14
  44. package/lib/datasources/SpellSource.lua +0 -236
  45. package/lib/datasources/SwingTimer.d.ts +0 -31
  46. package/lib/datasources/SwingTimer.lua +0 -650
  47. package/lib/datasources/TotemTimer.d.ts +0 -10
  48. package/lib/datasources/TotemTimer.lua +0 -275
  49. package/lib/datasources/UnitInfo.d.ts +0 -51
  50. package/lib/datasources/UnitInfo.lua +0 -801
  51. package/lib/datasources/UnitSource.d.ts +0 -38
  52. package/lib/datasources/UnitSource.lua +0 -613
@@ -0,0 +1,1114 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ -- Lua Library inline imports
3
+ local function __TS__Class(self)
4
+ local c = {prototype = {}}
5
+ c.prototype.__index = c.prototype
6
+ c.prototype.constructor = c
7
+ return c
8
+ end
9
+
10
+ local function __TS__ClassExtends(target, base)
11
+ target.____super = base
12
+ local staticMetatable = setmetatable({__index = base}, base)
13
+ setmetatable(target, staticMetatable)
14
+ local baseMetatable = getmetatable(base)
15
+ if baseMetatable then
16
+ if type(baseMetatable.__index) == "function" then
17
+ staticMetatable.__index = baseMetatable.__index
18
+ end
19
+ if type(baseMetatable.__newindex) == "function" then
20
+ staticMetatable.__newindex = baseMetatable.__newindex
21
+ end
22
+ end
23
+ setmetatable(target.prototype, base.prototype)
24
+ if type(base.prototype.__index) == "function" then
25
+ target.prototype.__index = base.prototype.__index
26
+ end
27
+ if type(base.prototype.__newindex) == "function" then
28
+ target.prototype.__newindex = base.prototype.__newindex
29
+ end
30
+ if type(base.prototype.__tostring) == "function" then
31
+ target.prototype.__tostring = base.prototype.__tostring
32
+ end
33
+ end
34
+
35
+ local function __TS__New(target, ...)
36
+ local instance = setmetatable({}, target.prototype)
37
+ instance:____constructor(...)
38
+ return instance
39
+ end
40
+ -- End of Lua Library inline imports
41
+ local ____exports = {}
42
+ local ____Source = require("datasources.Source")
43
+ local Source = ____Source.Source
44
+ local registerSource = ____Source.registerSource
45
+ local function missing(self, name)
46
+ error((name .. ": this client does not expose ") .. name)
47
+ end
48
+ --- `GetNumGroupMembers`. The value is the group size, including the player.
49
+ ____exports.GetNumGroupMembers = __TS__Class()
50
+ local GetNumGroupMembers = ____exports.GetNumGroupMembers
51
+ GetNumGroupMembers.name = "GetNumGroupMembers"
52
+ __TS__ClassExtends(GetNumGroupMembers, Source)
53
+ function GetNumGroupMembers.prototype.____constructor(self)
54
+ Source.prototype.____constructor(self, 0)
55
+ end
56
+ function GetNumGroupMembers.prototype.read(self)
57
+ local read = _G.GetNumGroupMembers
58
+ if read == nil then
59
+ missing(nil, "GetNumGroupMembers")
60
+ end
61
+ return read()
62
+ end;
63
+ (function(self)
64
+ registerSource(
65
+ nil,
66
+ ____exports.GetNumGroupMembers,
67
+ function() return __TS__New(____exports.GetNumGroupMembers) end
68
+ )
69
+ end)(GetNumGroupMembers)
70
+ --- `IsInRaid`.
71
+ ____exports.IsInRaid = __TS__Class()
72
+ local IsInRaid = ____exports.IsInRaid
73
+ IsInRaid.name = "IsInRaid"
74
+ __TS__ClassExtends(IsInRaid, Source)
75
+ function IsInRaid.prototype.____constructor(self)
76
+ Source.prototype.____constructor(self, false)
77
+ end
78
+ function IsInRaid.prototype.read(self)
79
+ local read = _G.IsInRaid
80
+ if read == nil then
81
+ missing(nil, "IsInRaid")
82
+ end
83
+ return read()
84
+ end;
85
+ (function(self)
86
+ registerSource(
87
+ nil,
88
+ ____exports.IsInRaid,
89
+ function() return __TS__New(____exports.IsInRaid) end
90
+ )
91
+ end)(IsInRaid)
92
+ --- `UnitGUID(unit)`.
93
+ ____exports.UnitGUID = __TS__Class()
94
+ local UnitGUID = ____exports.UnitGUID
95
+ UnitGUID.name = "UnitGUID"
96
+ __TS__ClassExtends(UnitGUID, Source)
97
+ function UnitGUID.prototype.____constructor(self, unit)
98
+ Source.prototype.____constructor(self, nil, unit)
99
+ end
100
+ function UnitGUID.prototype.read(self, props)
101
+ local read = _G.UnitGUID
102
+ if read == nil then
103
+ missing(nil, "UnitGUID")
104
+ end
105
+ return read(props[1])
106
+ end;
107
+ (function(self)
108
+ registerSource(
109
+ nil,
110
+ ____exports.UnitGUID,
111
+ function(____, props) return __TS__New(____exports.UnitGUID, props[1]) end
112
+ )
113
+ end)(UnitGUID)
114
+ --- `UnitFullName(unit)`. Both native returns are kept.
115
+ ____exports.UnitFullName = __TS__Class()
116
+ local UnitFullName = ____exports.UnitFullName
117
+ UnitFullName.name = "UnitFullName"
118
+ __TS__ClassExtends(UnitFullName, Source)
119
+ function UnitFullName.prototype.____constructor(self, unit)
120
+ Source.prototype.____constructor(self, {name = nil, realm = nil}, unit)
121
+ end
122
+ function UnitFullName.prototype.HasSecretFields(self, value)
123
+ return issecretvalue(value.name) or issecretvalue(value.realm)
124
+ end
125
+ function UnitFullName.prototype.read(self, props)
126
+ local read = _G.UnitFullName
127
+ if read == nil then
128
+ missing(nil, "UnitFullName")
129
+ end
130
+ local name, realm = read(props[1])
131
+ return {name = name, realm = realm}
132
+ end;
133
+ (function(self)
134
+ registerSource(
135
+ nil,
136
+ ____exports.UnitFullName,
137
+ function(____, props) return __TS__New(____exports.UnitFullName, props[1]) end
138
+ )
139
+ end)(UnitFullName)
140
+ --- `UnitExists(unit)`.
141
+ ____exports.UnitExists = __TS__Class()
142
+ local UnitExists = ____exports.UnitExists
143
+ UnitExists.name = "UnitExists"
144
+ __TS__ClassExtends(UnitExists, Source)
145
+ function UnitExists.prototype.____constructor(self, unit)
146
+ Source.prototype.____constructor(self, false, unit)
147
+ end
148
+ function UnitExists.prototype.read(self, props)
149
+ local read = _G.UnitExists
150
+ if read == nil then
151
+ missing(nil, "UnitExists")
152
+ end
153
+ return read(props[1])
154
+ end;
155
+ (function(self)
156
+ registerSource(
157
+ nil,
158
+ ____exports.UnitExists,
159
+ function(____, props) return __TS__New(____exports.UnitExists, props[1]) end
160
+ )
161
+ end)(UnitExists)
162
+ --- `GetRaidRosterInfo(index)`. One row.
163
+ ____exports.GetRaidRosterInfo = __TS__Class()
164
+ local GetRaidRosterInfo = ____exports.GetRaidRosterInfo
165
+ GetRaidRosterInfo.name = "GetRaidRosterInfo"
166
+ __TS__ClassExtends(GetRaidRosterInfo, Source)
167
+ function GetRaidRosterInfo.prototype.____constructor(self, index)
168
+ Source.prototype.____constructor(self, {
169
+ name = nil,
170
+ rank = nil,
171
+ subgroup = nil,
172
+ level = nil,
173
+ className = nil,
174
+ fileName = nil,
175
+ zone = nil,
176
+ online = nil,
177
+ isDead = nil,
178
+ role = nil,
179
+ isML = nil
180
+ }, index)
181
+ end
182
+ function GetRaidRosterInfo.prototype.HasSecretFields(self, value)
183
+ return issecretvalue(value.name) or issecretvalue(value.rank) or issecretvalue(value.subgroup) or issecretvalue(value.level) or issecretvalue(value.className) or issecretvalue(value.fileName) or issecretvalue(value.zone) or issecretvalue(value.online) or issecretvalue(value.isDead) or issecretvalue(value.role) or issecretvalue(value.isML)
184
+ end
185
+ function GetRaidRosterInfo.prototype.read(self, props)
186
+ local read = _G.GetRaidRosterInfo
187
+ if read == nil then
188
+ missing(nil, "GetRaidRosterInfo")
189
+ end
190
+ local name, rank, subgroup, level, className, fileName, zone, online, isDead, role, isML = read(props[1])
191
+ return {
192
+ name = name,
193
+ rank = rank,
194
+ subgroup = subgroup,
195
+ level = level,
196
+ className = className,
197
+ fileName = fileName,
198
+ zone = zone,
199
+ online = online,
200
+ isDead = isDead,
201
+ role = role,
202
+ isML = isML
203
+ }
204
+ end;
205
+ (function(self)
206
+ registerSource(
207
+ nil,
208
+ ____exports.GetRaidRosterInfo,
209
+ function(____, props) return __TS__New(____exports.GetRaidRosterInfo, props[1]) end
210
+ )
211
+ end)(GetRaidRosterInfo)
212
+ --- `C_UnitAuras.GetAuraDataByIndex(unit, index, filter)`. One aura, or undefined when the index is past the end.
213
+ ____exports.GetAuraDataByIndex = __TS__Class()
214
+ local GetAuraDataByIndex = ____exports.GetAuraDataByIndex
215
+ GetAuraDataByIndex.name = "GetAuraDataByIndex"
216
+ __TS__ClassExtends(GetAuraDataByIndex, Source)
217
+ function GetAuraDataByIndex.prototype.____constructor(self, unit, index, filter)
218
+ Source.prototype.____constructor(
219
+ self,
220
+ nil,
221
+ unit,
222
+ index,
223
+ filter
224
+ )
225
+ end
226
+ function GetAuraDataByIndex.prototype.HasSecretFields(self, value)
227
+ return value ~= nil and (issecretvalue(value.spellId) or issecretvalue(value.name) or issecretvalue(value.icon) or issecretvalue(value.sourceUnit))
228
+ end
229
+ function GetAuraDataByIndex.prototype.read(self, props)
230
+ local read = C_UnitAuras and C_UnitAuras.GetAuraDataByIndex
231
+ if read == nil then
232
+ missing(nil, "GetAuraDataByIndex")
233
+ end
234
+ return read(props[1], props[2], props[3])
235
+ end;
236
+ (function(self)
237
+ registerSource(
238
+ nil,
239
+ ____exports.GetAuraDataByIndex,
240
+ function(____, props) return __TS__New(____exports.GetAuraDataByIndex, props[1], props[2], props[3]) end
241
+ )
242
+ end)(GetAuraDataByIndex)
243
+ local function readNumber(self, name, unit)
244
+ local read = _G[name]
245
+ if read == nil then
246
+ missing(nil, name)
247
+ end
248
+ return read(unit) or 0
249
+ end
250
+ --- `UnitHealth(unit)`.
251
+ ____exports.UnitHealth = __TS__Class()
252
+ local UnitHealth = ____exports.UnitHealth
253
+ UnitHealth.name = "UnitHealth"
254
+ __TS__ClassExtends(UnitHealth, Source)
255
+ function UnitHealth.prototype.____constructor(self, unit)
256
+ Source.prototype.____constructor(self, 0, unit)
257
+ end
258
+ function UnitHealth.prototype.read(self, props)
259
+ return readNumber(nil, "UnitHealth", props[1])
260
+ end;
261
+ (function(self)
262
+ registerSource(
263
+ nil,
264
+ ____exports.UnitHealth,
265
+ function(____, props) return __TS__New(____exports.UnitHealth, props[1]) end
266
+ )
267
+ end)(UnitHealth)
268
+ --- `UnitHealthMax(unit)`.
269
+ ____exports.UnitHealthMax = __TS__Class()
270
+ local UnitHealthMax = ____exports.UnitHealthMax
271
+ UnitHealthMax.name = "UnitHealthMax"
272
+ __TS__ClassExtends(UnitHealthMax, Source)
273
+ function UnitHealthMax.prototype.____constructor(self, unit)
274
+ Source.prototype.____constructor(self, 0, unit)
275
+ end
276
+ function UnitHealthMax.prototype.read(self, props)
277
+ return readNumber(nil, "UnitHealthMax", props[1])
278
+ end;
279
+ (function(self)
280
+ registerSource(
281
+ nil,
282
+ ____exports.UnitHealthMax,
283
+ function(____, props) return __TS__New(____exports.UnitHealthMax, props[1]) end
284
+ )
285
+ end)(UnitHealthMax)
286
+ --- `UnitPower(unit, powerType)`.
287
+ ____exports.UnitPower = __TS__Class()
288
+ local UnitPower = ____exports.UnitPower
289
+ UnitPower.name = "UnitPower"
290
+ __TS__ClassExtends(UnitPower, Source)
291
+ function UnitPower.prototype.____constructor(self, unit, powerType)
292
+ Source.prototype.____constructor(self, 0, unit, powerType)
293
+ end
294
+ function UnitPower.prototype.read(self, props)
295
+ local read = _G.UnitPower
296
+ if read == nil then
297
+ missing(nil, "UnitPower")
298
+ end
299
+ return read(props[1], props[2])
300
+ end;
301
+ (function(self)
302
+ registerSource(
303
+ nil,
304
+ ____exports.UnitPower,
305
+ function(____, props) return __TS__New(____exports.UnitPower, props[1], props[2]) end
306
+ )
307
+ end)(UnitPower)
308
+ --- `UnitPowerMax(unit, powerType)`.
309
+ ____exports.UnitPowerMax = __TS__Class()
310
+ local UnitPowerMax = ____exports.UnitPowerMax
311
+ UnitPowerMax.name = "UnitPowerMax"
312
+ __TS__ClassExtends(UnitPowerMax, Source)
313
+ function UnitPowerMax.prototype.____constructor(self, unit, powerType)
314
+ Source.prototype.____constructor(self, 0, unit, powerType)
315
+ end
316
+ function UnitPowerMax.prototype.read(self, props)
317
+ local read = _G.UnitPowerMax
318
+ if read == nil then
319
+ missing(nil, "UnitPowerMax")
320
+ end
321
+ return read(props[1], props[2])
322
+ end;
323
+ (function(self)
324
+ registerSource(
325
+ nil,
326
+ ____exports.UnitPowerMax,
327
+ function(____, props) return __TS__New(____exports.UnitPowerMax, props[1], props[2]) end
328
+ )
329
+ end)(UnitPowerMax)
330
+ --- `UnitGetTotalAbsorbs(unit)`.
331
+ ____exports.UnitGetTotalAbsorbs = __TS__Class()
332
+ local UnitGetTotalAbsorbs = ____exports.UnitGetTotalAbsorbs
333
+ UnitGetTotalAbsorbs.name = "UnitGetTotalAbsorbs"
334
+ __TS__ClassExtends(UnitGetTotalAbsorbs, Source)
335
+ function UnitGetTotalAbsorbs.prototype.____constructor(self, unit)
336
+ Source.prototype.____constructor(self, 0, unit)
337
+ end
338
+ function UnitGetTotalAbsorbs.prototype.read(self, props)
339
+ return readNumber(nil, "UnitGetTotalAbsorbs", props[1])
340
+ end;
341
+ (function(self)
342
+ registerSource(
343
+ nil,
344
+ ____exports.UnitGetTotalAbsorbs,
345
+ function(____, props) return __TS__New(____exports.UnitGetTotalAbsorbs, props[1]) end
346
+ )
347
+ end)(UnitGetTotalAbsorbs)
348
+ --- `UnitGetIncomingHeals(unit)`.
349
+ ____exports.UnitGetIncomingHeals = __TS__Class()
350
+ local UnitGetIncomingHeals = ____exports.UnitGetIncomingHeals
351
+ UnitGetIncomingHeals.name = "UnitGetIncomingHeals"
352
+ __TS__ClassExtends(UnitGetIncomingHeals, Source)
353
+ function UnitGetIncomingHeals.prototype.____constructor(self, unit)
354
+ Source.prototype.____constructor(self, 0, unit)
355
+ end
356
+ function UnitGetIncomingHeals.prototype.read(self, props)
357
+ return readNumber(nil, "UnitGetIncomingHeals", props[1])
358
+ end;
359
+ (function(self)
360
+ registerSource(
361
+ nil,
362
+ ____exports.UnitGetIncomingHeals,
363
+ function(____, props) return __TS__New(____exports.UnitGetIncomingHeals, props[1]) end
364
+ )
365
+ end)(UnitGetIncomingHeals)
366
+ --- `UnitClass(unit)`.
367
+ ____exports.UnitClass = __TS__Class()
368
+ local UnitClass = ____exports.UnitClass
369
+ UnitClass.name = "UnitClass"
370
+ __TS__ClassExtends(UnitClass, Source)
371
+ function UnitClass.prototype.____constructor(self, unit)
372
+ Source.prototype.____constructor(self, {name = nil, classFile = nil, classId = nil}, unit)
373
+ end
374
+ function UnitClass.prototype.HasSecretFields(self, value)
375
+ return issecretvalue(value.name) or issecretvalue(value.classFile) or issecretvalue(value.classId)
376
+ end
377
+ function UnitClass.prototype.read(self, props)
378
+ local read = _G.UnitClass
379
+ if read == nil then
380
+ missing(nil, "UnitClass")
381
+ end
382
+ local name, classFile, classId = read(props[1])
383
+ return {name = name, classFile = classFile, classId = classId}
384
+ end;
385
+ (function(self)
386
+ registerSource(
387
+ nil,
388
+ ____exports.UnitClass,
389
+ function(____, props) return __TS__New(____exports.UnitClass, props[1]) end
390
+ )
391
+ end)(UnitClass)
392
+ --- `UnitIsPlayer(unit)`.
393
+ ____exports.UnitIsPlayer = __TS__Class()
394
+ local UnitIsPlayer = ____exports.UnitIsPlayer
395
+ UnitIsPlayer.name = "UnitIsPlayer"
396
+ __TS__ClassExtends(UnitIsPlayer, Source)
397
+ function UnitIsPlayer.prototype.____constructor(self, unit)
398
+ Source.prototype.____constructor(self, false, unit)
399
+ end
400
+ function UnitIsPlayer.prototype.read(self, props)
401
+ local read = _G.UnitIsPlayer
402
+ if read == nil then
403
+ missing(nil, "UnitIsPlayer")
404
+ end
405
+ return read(props[1])
406
+ end;
407
+ (function(self)
408
+ registerSource(
409
+ nil,
410
+ ____exports.UnitIsPlayer,
411
+ function(____, props) return __TS__New(____exports.UnitIsPlayer, props[1]) end
412
+ )
413
+ end)(UnitIsPlayer)
414
+ --- `UnitIsUnit(first, second)`.
415
+ ____exports.UnitIsUnit = __TS__Class()
416
+ local UnitIsUnit = ____exports.UnitIsUnit
417
+ UnitIsUnit.name = "UnitIsUnit"
418
+ __TS__ClassExtends(UnitIsUnit, Source)
419
+ function UnitIsUnit.prototype.____constructor(self, first, second)
420
+ Source.prototype.____constructor(self, false, first, second)
421
+ end
422
+ function UnitIsUnit.prototype.read(self, props)
423
+ local read = _G.UnitIsUnit
424
+ if read == nil then
425
+ missing(nil, "UnitIsUnit")
426
+ end
427
+ return read(props[1], props[2])
428
+ end;
429
+ (function(self)
430
+ registerSource(
431
+ nil,
432
+ ____exports.UnitIsUnit,
433
+ function(____, props) return __TS__New(____exports.UnitIsUnit, props[1], props[2]) end
434
+ )
435
+ end)(UnitIsUnit)
436
+ --- `C_Spell.GetSpellName(spellId)`.
437
+ ____exports.GetSpellName = __TS__Class()
438
+ local GetSpellName = ____exports.GetSpellName
439
+ GetSpellName.name = "GetSpellName"
440
+ __TS__ClassExtends(GetSpellName, Source)
441
+ function GetSpellName.prototype.____constructor(self, spellId)
442
+ Source.prototype.____constructor(self, nil, spellId)
443
+ end
444
+ function GetSpellName.prototype.read(self, props)
445
+ local read = C_Spell and C_Spell.GetSpellName
446
+ if read == nil then
447
+ missing(nil, "GetSpellName")
448
+ end
449
+ return read(props[1])
450
+ end;
451
+ (function(self)
452
+ registerSource(
453
+ nil,
454
+ ____exports.GetSpellName,
455
+ function(____, props) return __TS__New(____exports.GetSpellName, props[1]) end
456
+ )
457
+ end)(GetSpellName)
458
+ --- `C_Spell.GetSpellTexture(spellId)`.
459
+ ____exports.GetSpellTexture = __TS__Class()
460
+ local GetSpellTexture = ____exports.GetSpellTexture
461
+ GetSpellTexture.name = "GetSpellTexture"
462
+ __TS__ClassExtends(GetSpellTexture, Source)
463
+ function GetSpellTexture.prototype.____constructor(self, spellId)
464
+ Source.prototype.____constructor(self, nil, spellId)
465
+ end
466
+ function GetSpellTexture.prototype.read(self, props)
467
+ local read = C_Spell and C_Spell.GetSpellTexture
468
+ if read == nil then
469
+ missing(nil, "GetSpellTexture")
470
+ end
471
+ return read(props[1])
472
+ end;
473
+ (function(self)
474
+ registerSource(
475
+ nil,
476
+ ____exports.GetSpellTexture,
477
+ function(____, props) return __TS__New(____exports.GetSpellTexture, props[1]) end
478
+ )
479
+ end)(GetSpellTexture)
480
+ --- `C_Spell.GetSpellCooldownDuration(spellId, ignoreGCD)`.
481
+ ____exports.GetSpellCooldownDuration = __TS__Class()
482
+ local GetSpellCooldownDuration = ____exports.GetSpellCooldownDuration
483
+ GetSpellCooldownDuration.name = "GetSpellCooldownDuration"
484
+ __TS__ClassExtends(GetSpellCooldownDuration, Source)
485
+ function GetSpellCooldownDuration.prototype.____constructor(self, spellId, ignoreGCD)
486
+ Source.prototype.____constructor(self, nil, spellId, ignoreGCD)
487
+ end
488
+ function GetSpellCooldownDuration.prototype.read(self, props)
489
+ local read = C_Spell and C_Spell.GetSpellCooldownDuration
490
+ if read == nil then
491
+ missing(nil, "GetSpellCooldownDuration")
492
+ end
493
+ return read(props[1], props[2])
494
+ end;
495
+ (function(self)
496
+ registerSource(
497
+ nil,
498
+ ____exports.GetSpellCooldownDuration,
499
+ function(____, props) return __TS__New(____exports.GetSpellCooldownDuration, props[1], props[2] == true) end
500
+ )
501
+ end)(GetSpellCooldownDuration)
502
+ --- `C_Spell.IsSpellPassive(spellId)`.
503
+ ____exports.IsSpellPassive = __TS__Class()
504
+ local IsSpellPassive = ____exports.IsSpellPassive
505
+ IsSpellPassive.name = "IsSpellPassive"
506
+ __TS__ClassExtends(IsSpellPassive, Source)
507
+ function IsSpellPassive.prototype.____constructor(self, spellId)
508
+ Source.prototype.____constructor(self, nil, spellId)
509
+ end
510
+ function IsSpellPassive.prototype.read(self, props)
511
+ local read = C_Spell and C_Spell.IsSpellPassive
512
+ if read == nil then
513
+ missing(nil, "IsSpellPassive")
514
+ end
515
+ return read(props[1])
516
+ end;
517
+ (function(self)
518
+ registerSource(
519
+ nil,
520
+ ____exports.IsSpellPassive,
521
+ function(____, props) return __TS__New(____exports.IsSpellPassive, props[1]) end
522
+ )
523
+ end)(IsSpellPassive)
524
+ --- `C_UnitAuras.GetAuraDataBySpellName(unit, name, filter)`.
525
+ ____exports.GetAuraDataBySpellName = __TS__Class()
526
+ local GetAuraDataBySpellName = ____exports.GetAuraDataBySpellName
527
+ GetAuraDataBySpellName.name = "GetAuraDataBySpellName"
528
+ __TS__ClassExtends(GetAuraDataBySpellName, Source)
529
+ function GetAuraDataBySpellName.prototype.____constructor(self, unit, name, filter)
530
+ Source.prototype.____constructor(
531
+ self,
532
+ nil,
533
+ unit,
534
+ name,
535
+ filter
536
+ )
537
+ end
538
+ function GetAuraDataBySpellName.prototype.read(self, props)
539
+ local read = C_UnitAuras and C_UnitAuras.GetAuraDataBySpellName
540
+ if read == nil then
541
+ missing(nil, "GetAuraDataBySpellName")
542
+ end
543
+ return read(props[1], props[2], props[3])
544
+ end;
545
+ (function(self)
546
+ registerSource(
547
+ nil,
548
+ ____exports.GetAuraDataBySpellName,
549
+ function(____, props) return __TS__New(____exports.GetAuraDataBySpellName, props[1], props[2], props[3]) end
550
+ )
551
+ end)(GetAuraDataBySpellName)
552
+ --- `GetTotemInfo(slot)`.
553
+ ____exports.GetTotemInfo = __TS__Class()
554
+ local GetTotemInfo = ____exports.GetTotemInfo
555
+ GetTotemInfo.name = "GetTotemInfo"
556
+ __TS__ClassExtends(GetTotemInfo, Source)
557
+ function GetTotemInfo.prototype.____constructor(self, slot)
558
+ Source.prototype.____constructor(self, {
559
+ haveTotem = nil,
560
+ name = nil,
561
+ startTime = nil,
562
+ duration = nil,
563
+ icon = nil,
564
+ modRate = nil,
565
+ spellId = nil
566
+ }, slot)
567
+ end
568
+ function GetTotemInfo.prototype.read(self, props)
569
+ local read = _G.GetTotemInfo
570
+ if read == nil then
571
+ missing(nil, "GetTotemInfo")
572
+ end
573
+ local haveTotem, name, startTime, duration, icon, modRate, spellId = read(props[1])
574
+ return {
575
+ haveTotem = haveTotem,
576
+ name = name,
577
+ startTime = startTime,
578
+ duration = duration,
579
+ icon = icon,
580
+ modRate = modRate,
581
+ spellId = spellId
582
+ }
583
+ end;
584
+ (function(self)
585
+ registerSource(
586
+ nil,
587
+ ____exports.GetTotemInfo,
588
+ function(____, props) return __TS__New(____exports.GetTotemInfo, props[1]) end
589
+ )
590
+ end)(GetTotemInfo)
591
+ --- `GetNumTotemSlots`.
592
+ ____exports.GetNumTotemSlots = __TS__Class()
593
+ local GetNumTotemSlots = ____exports.GetNumTotemSlots
594
+ GetNumTotemSlots.name = "GetNumTotemSlots"
595
+ __TS__ClassExtends(GetNumTotemSlots, Source)
596
+ function GetNumTotemSlots.prototype.____constructor(self)
597
+ Source.prototype.____constructor(self, 0)
598
+ end
599
+ function GetNumTotemSlots.prototype.read(self)
600
+ local read = _G.GetNumTotemSlots
601
+ if read == nil then
602
+ missing(nil, "GetNumTotemSlots")
603
+ end
604
+ return read()
605
+ end;
606
+ (function(self)
607
+ registerSource(
608
+ nil,
609
+ ____exports.GetNumTotemSlots,
610
+ function() return __TS__New(____exports.GetNumTotemSlots) end
611
+ )
612
+ end)(GetNumTotemSlots)
613
+ --- `C_EditMode.GetLayouts`.
614
+ ____exports.GetLayouts = __TS__Class()
615
+ local GetLayouts = ____exports.GetLayouts
616
+ GetLayouts.name = "GetLayouts"
617
+ __TS__ClassExtends(GetLayouts, Source)
618
+ function GetLayouts.prototype.____constructor(self)
619
+ Source.prototype.____constructor(self, nil)
620
+ end
621
+ function GetLayouts.prototype.read(self)
622
+ local read = C_EditMode and C_EditMode.GetLayouts
623
+ if read == nil then
624
+ missing(nil, "GetLayouts")
625
+ end
626
+ return read()
627
+ end;
628
+ (function(self)
629
+ registerSource(
630
+ nil,
631
+ ____exports.GetLayouts,
632
+ function() return __TS__New(____exports.GetLayouts) end
633
+ )
634
+ end)(GetLayouts)
635
+ --- `C_SpecializationInfo.GetNumSpecializationsForClassID(classId)`.
636
+ ____exports.GetNumSpecializationsForClassID = __TS__Class()
637
+ local GetNumSpecializationsForClassID = ____exports.GetNumSpecializationsForClassID
638
+ GetNumSpecializationsForClassID.name = "GetNumSpecializationsForClassID"
639
+ __TS__ClassExtends(GetNumSpecializationsForClassID, Source)
640
+ function GetNumSpecializationsForClassID.prototype.____constructor(self, classId)
641
+ Source.prototype.____constructor(self, 0, classId)
642
+ end
643
+ function GetNumSpecializationsForClassID.prototype.read(self, props)
644
+ local read = C_SpecializationInfo and C_SpecializationInfo.GetNumSpecializationsForClassID
645
+ if read == nil then
646
+ missing(nil, "GetNumSpecializationsForClassID")
647
+ end
648
+ return read(props[1])
649
+ end;
650
+ (function(self)
651
+ registerSource(
652
+ nil,
653
+ ____exports.GetNumSpecializationsForClassID,
654
+ function(____, props) return __TS__New(____exports.GetNumSpecializationsForClassID, props[1]) end
655
+ )
656
+ end)(GetNumSpecializationsForClassID)
657
+ --- `C_SpecializationInfo.GetSpecializationInfo`. One row.
658
+ ____exports.GetSpecializationInfo = __TS__Class()
659
+ local GetSpecializationInfo = ____exports.GetSpecializationInfo
660
+ GetSpecializationInfo.name = "GetSpecializationInfo"
661
+ __TS__ClassExtends(GetSpecializationInfo, Source)
662
+ function GetSpecializationInfo.prototype.____constructor(self, index, inspect, pet, unit, sex, group, classId)
663
+ Source.prototype.____constructor(
664
+ self,
665
+ {
666
+ id = nil,
667
+ name = nil,
668
+ description = nil,
669
+ icon = nil,
670
+ role = nil,
671
+ primaryStat = nil,
672
+ pointsSpent = nil
673
+ },
674
+ index,
675
+ inspect,
676
+ pet,
677
+ unit,
678
+ sex,
679
+ group,
680
+ classId
681
+ )
682
+ end
683
+ function GetSpecializationInfo.prototype.read(self, props)
684
+ local read = C_SpecializationInfo and C_SpecializationInfo.GetSpecializationInfo
685
+ if read == nil then
686
+ missing(nil, "GetSpecializationInfo")
687
+ end
688
+ local id, name, description, icon, role, primaryStat, pointsSpent = read(
689
+ props[1],
690
+ props[2],
691
+ props[3],
692
+ props[4],
693
+ props[5],
694
+ props[6],
695
+ props[7]
696
+ )
697
+ return {
698
+ id = id,
699
+ name = name,
700
+ description = description,
701
+ icon = icon,
702
+ role = role,
703
+ primaryStat = primaryStat,
704
+ pointsSpent = pointsSpent
705
+ }
706
+ end;
707
+ (function(self)
708
+ registerSource(
709
+ nil,
710
+ ____exports.GetSpecializationInfo,
711
+ function(____, props) return __TS__New(
712
+ ____exports.GetSpecializationInfo,
713
+ props[1],
714
+ props[2] == true,
715
+ props[3] == true,
716
+ props[4],
717
+ props[5],
718
+ props[6],
719
+ props[7]
720
+ ) end
721
+ )
722
+ end)(GetSpecializationInfo)
723
+ --- `C_SpellBook.GetNumSpellBookSkillLines`.
724
+ ____exports.GetNumSpellBookSkillLines = __TS__Class()
725
+ local GetNumSpellBookSkillLines = ____exports.GetNumSpellBookSkillLines
726
+ GetNumSpellBookSkillLines.name = "GetNumSpellBookSkillLines"
727
+ __TS__ClassExtends(GetNumSpellBookSkillLines, Source)
728
+ function GetNumSpellBookSkillLines.prototype.____constructor(self)
729
+ Source.prototype.____constructor(self, 0)
730
+ end
731
+ function GetNumSpellBookSkillLines.prototype.read(self)
732
+ local read = C_SpellBook and C_SpellBook.GetNumSpellBookSkillLines
733
+ if read == nil then
734
+ missing(nil, "GetNumSpellBookSkillLines")
735
+ end
736
+ return read()
737
+ end;
738
+ (function(self)
739
+ registerSource(
740
+ nil,
741
+ ____exports.GetNumSpellBookSkillLines,
742
+ function() return __TS__New(____exports.GetNumSpellBookSkillLines) end
743
+ )
744
+ end)(GetNumSpellBookSkillLines)
745
+ --- `C_SpellBook.GetSpellBookItemInfo(slot, bank)`.
746
+ ____exports.GetSpellBookItemInfo = __TS__Class()
747
+ local GetSpellBookItemInfo = ____exports.GetSpellBookItemInfo
748
+ GetSpellBookItemInfo.name = "GetSpellBookItemInfo"
749
+ __TS__ClassExtends(GetSpellBookItemInfo, Source)
750
+ function GetSpellBookItemInfo.prototype.____constructor(self, slot, bank)
751
+ Source.prototype.____constructor(self, nil, slot, bank)
752
+ end
753
+ function GetSpellBookItemInfo.prototype.read(self, props)
754
+ local read = C_SpellBook and C_SpellBook.GetSpellBookItemInfo
755
+ if read == nil then
756
+ missing(nil, "GetSpellBookItemInfo")
757
+ end
758
+ return read(props[1], props[2])
759
+ end;
760
+ (function(self)
761
+ registerSource(
762
+ nil,
763
+ ____exports.GetSpellBookItemInfo,
764
+ function(____, props) return __TS__New(____exports.GetSpellBookItemInfo, props[1], props[2]) end
765
+ )
766
+ end)(GetSpellBookItemInfo)
767
+ local function duration(self, value)
768
+ return value
769
+ end
770
+ --- `UnitHealthPercent(unit, predicted, curve)`.
771
+ ____exports.UnitHealthPercent = __TS__Class()
772
+ local UnitHealthPercent = ____exports.UnitHealthPercent
773
+ UnitHealthPercent.name = "UnitHealthPercent"
774
+ __TS__ClassExtends(UnitHealthPercent, Source)
775
+ function UnitHealthPercent.prototype.____constructor(self, unit, predicted, curve)
776
+ Source.prototype.____constructor(
777
+ self,
778
+ 0,
779
+ unit,
780
+ predicted,
781
+ curve
782
+ )
783
+ end
784
+ function UnitHealthPercent.prototype.read(self, props)
785
+ local read = _G.UnitHealthPercent
786
+ if read == nil then
787
+ missing(nil, "UnitHealthPercent")
788
+ end
789
+ return read(props[1], props[2], props[3])
790
+ end;
791
+ (function(self)
792
+ registerSource(
793
+ nil,
794
+ ____exports.UnitHealthPercent,
795
+ function(____, props) return __TS__New(____exports.UnitHealthPercent, props[1], props[2] == true, props[3]) end
796
+ )
797
+ end)(UnitHealthPercent)
798
+ --- `UnitPowerPercent(unit, powerType, predicted, curve)`.
799
+ ____exports.UnitPowerPercent = __TS__Class()
800
+ local UnitPowerPercent = ____exports.UnitPowerPercent
801
+ UnitPowerPercent.name = "UnitPowerPercent"
802
+ __TS__ClassExtends(UnitPowerPercent, Source)
803
+ function UnitPowerPercent.prototype.____constructor(self, unit, powerType, predicted, curve)
804
+ Source.prototype.____constructor(
805
+ self,
806
+ 0,
807
+ unit,
808
+ powerType,
809
+ predicted,
810
+ curve
811
+ )
812
+ end
813
+ function UnitPowerPercent.prototype.read(self, props)
814
+ local read = _G.UnitPowerPercent
815
+ if read == nil then
816
+ missing(nil, "UnitPowerPercent")
817
+ end
818
+ return read(props[1], props[2], props[3], props[4])
819
+ end;
820
+ (function(self)
821
+ registerSource(
822
+ nil,
823
+ ____exports.UnitPowerPercent,
824
+ function(____, props) return __TS__New(
825
+ ____exports.UnitPowerPercent,
826
+ props[1],
827
+ props[2],
828
+ props[3] == true,
829
+ props[4]
830
+ ) end
831
+ )
832
+ end)(UnitPowerPercent)
833
+ --- `UnitCastingDuration(unit)`.
834
+ ____exports.UnitCastingDuration = __TS__Class()
835
+ local UnitCastingDuration = ____exports.UnitCastingDuration
836
+ UnitCastingDuration.name = "UnitCastingDuration"
837
+ __TS__ClassExtends(UnitCastingDuration, Source)
838
+ function UnitCastingDuration.prototype.____constructor(self, unit)
839
+ Source.prototype.____constructor(self, nil, unit)
840
+ end
841
+ function UnitCastingDuration.prototype.read(self, props)
842
+ local read = _G.UnitCastingDuration
843
+ if read == nil then
844
+ missing(nil, "UnitCastingDuration")
845
+ end
846
+ return duration(
847
+ nil,
848
+ read(props[1])
849
+ )
850
+ end;
851
+ (function(self)
852
+ registerSource(
853
+ nil,
854
+ ____exports.UnitCastingDuration,
855
+ function(____, props) return __TS__New(____exports.UnitCastingDuration, props[1]) end
856
+ )
857
+ end)(UnitCastingDuration)
858
+ --- `UnitChannelDuration(unit)`.
859
+ ____exports.UnitChannelDuration = __TS__Class()
860
+ local UnitChannelDuration = ____exports.UnitChannelDuration
861
+ UnitChannelDuration.name = "UnitChannelDuration"
862
+ __TS__ClassExtends(UnitChannelDuration, Source)
863
+ function UnitChannelDuration.prototype.____constructor(self, unit)
864
+ Source.prototype.____constructor(self, nil, unit)
865
+ end
866
+ function UnitChannelDuration.prototype.read(self, props)
867
+ local read = _G.UnitChannelDuration
868
+ if read == nil then
869
+ missing(nil, "UnitChannelDuration")
870
+ end
871
+ return duration(
872
+ nil,
873
+ read(props[1])
874
+ )
875
+ end;
876
+ (function(self)
877
+ registerSource(
878
+ nil,
879
+ ____exports.UnitChannelDuration,
880
+ function(____, props) return __TS__New(____exports.UnitChannelDuration, props[1]) end
881
+ )
882
+ end)(UnitChannelDuration)
883
+ local emptyCast = {
884
+ name = nil,
885
+ text = nil,
886
+ texture = nil,
887
+ startTimeMS = nil,
888
+ endTimeMS = nil,
889
+ isTradeSkill = nil,
890
+ castID = nil,
891
+ notInterruptible = nil,
892
+ spellId = nil
893
+ }
894
+ --- `UnitCastingInfo(unit)`.
895
+ ____exports.UnitCastingInfo = __TS__Class()
896
+ local UnitCastingInfo = ____exports.UnitCastingInfo
897
+ UnitCastingInfo.name = "UnitCastingInfo"
898
+ __TS__ClassExtends(UnitCastingInfo, Source)
899
+ function UnitCastingInfo.prototype.____constructor(self, unit)
900
+ Source.prototype.____constructor(self, emptyCast, unit)
901
+ end
902
+ function UnitCastingInfo.prototype.HasSecretFields(self, value)
903
+ return issecretvalue(value.name) or issecretvalue(value.text) or issecretvalue(value.texture) or issecretvalue(value.startTimeMS) or issecretvalue(value.endTimeMS) or issecretvalue(value.spellId)
904
+ end
905
+ function UnitCastingInfo.prototype.read(self, props)
906
+ local read = _G.UnitCastingInfo
907
+ if read == nil then
908
+ missing(nil, "UnitCastingInfo")
909
+ end
910
+ local name, text, texture, startTimeMS, endTimeMS, isTradeSkill, castID, notInterruptible, spellId = read(props[1])
911
+ return {
912
+ name = name,
913
+ text = text,
914
+ texture = texture,
915
+ startTimeMS = startTimeMS,
916
+ endTimeMS = endTimeMS,
917
+ isTradeSkill = isTradeSkill,
918
+ castID = castID,
919
+ notInterruptible = notInterruptible,
920
+ spellId = spellId
921
+ }
922
+ end;
923
+ (function(self)
924
+ registerSource(
925
+ nil,
926
+ ____exports.UnitCastingInfo,
927
+ function(____, props) return __TS__New(____exports.UnitCastingInfo, props[1]) end
928
+ )
929
+ end)(UnitCastingInfo)
930
+ local emptyChannel = {
931
+ name = nil,
932
+ text = nil,
933
+ texture = nil,
934
+ startTimeMS = nil,
935
+ endTimeMS = nil,
936
+ isTradeSkill = nil,
937
+ notInterruptible = nil,
938
+ spellId = nil
939
+ }
940
+ --- `UnitChannelInfo(unit)`.
941
+ ____exports.UnitChannelInfo = __TS__Class()
942
+ local UnitChannelInfo = ____exports.UnitChannelInfo
943
+ UnitChannelInfo.name = "UnitChannelInfo"
944
+ __TS__ClassExtends(UnitChannelInfo, Source)
945
+ function UnitChannelInfo.prototype.____constructor(self, unit)
946
+ Source.prototype.____constructor(self, emptyChannel, unit)
947
+ end
948
+ function UnitChannelInfo.prototype.HasSecretFields(self, value)
949
+ return issecretvalue(value.name) or issecretvalue(value.text) or issecretvalue(value.texture) or issecretvalue(value.startTimeMS) or issecretvalue(value.endTimeMS) or issecretvalue(value.spellId)
950
+ end
951
+ function UnitChannelInfo.prototype.read(self, props)
952
+ local read = _G.UnitChannelInfo
953
+ if read == nil then
954
+ missing(nil, "UnitChannelInfo")
955
+ end
956
+ local name, text, texture, startTimeMS, endTimeMS, isTradeSkill, notInterruptible, spellId = read(props[1])
957
+ return {
958
+ name = name,
959
+ text = text,
960
+ texture = texture,
961
+ startTimeMS = startTimeMS,
962
+ endTimeMS = endTimeMS,
963
+ isTradeSkill = isTradeSkill,
964
+ notInterruptible = notInterruptible,
965
+ spellId = spellId
966
+ }
967
+ end;
968
+ (function(self)
969
+ registerSource(
970
+ nil,
971
+ ____exports.UnitChannelInfo,
972
+ function(____, props) return __TS__New(____exports.UnitChannelInfo, props[1]) end
973
+ )
974
+ end)(UnitChannelInfo)
975
+ --- `GetTotemDuration(slot)`.
976
+ ____exports.GetTotemDuration = __TS__Class()
977
+ local GetTotemDuration = ____exports.GetTotemDuration
978
+ GetTotemDuration.name = "GetTotemDuration"
979
+ __TS__ClassExtends(GetTotemDuration, Source)
980
+ function GetTotemDuration.prototype.____constructor(self, slot)
981
+ Source.prototype.____constructor(self, nil, slot)
982
+ end
983
+ function GetTotemDuration.prototype.read(self, props)
984
+ local read = _G.GetTotemDuration
985
+ if read == nil then
986
+ missing(nil, "GetTotemDuration")
987
+ end
988
+ return duration(
989
+ nil,
990
+ read(props[1])
991
+ )
992
+ end;
993
+ (function(self)
994
+ registerSource(
995
+ nil,
996
+ ____exports.GetTotemDuration,
997
+ function(____, props) return __TS__New(____exports.GetTotemDuration, props[1]) end
998
+ )
999
+ end)(GetTotemDuration)
1000
+ --- `GetNumSpellTabs`.
1001
+ ____exports.GetNumSpellTabs = __TS__Class()
1002
+ local GetNumSpellTabs = ____exports.GetNumSpellTabs
1003
+ GetNumSpellTabs.name = "GetNumSpellTabs"
1004
+ __TS__ClassExtends(GetNumSpellTabs, Source)
1005
+ function GetNumSpellTabs.prototype.____constructor(self)
1006
+ Source.prototype.____constructor(self, 0)
1007
+ end
1008
+ function GetNumSpellTabs.prototype.read(self)
1009
+ local read = _G.GetNumSpellTabs
1010
+ if read == nil then
1011
+ missing(nil, "GetNumSpellTabs")
1012
+ end
1013
+ return read()
1014
+ end;
1015
+ (function(self)
1016
+ registerSource(
1017
+ nil,
1018
+ ____exports.GetNumSpellTabs,
1019
+ function() return __TS__New(____exports.GetNumSpellTabs) end
1020
+ )
1021
+ end)(GetNumSpellTabs)
1022
+ --- `GetSpellTabInfo(tab)`.
1023
+ ____exports.GetSpellTabInfo = __TS__Class()
1024
+ local GetSpellTabInfo = ____exports.GetSpellTabInfo
1025
+ GetSpellTabInfo.name = "GetSpellTabInfo"
1026
+ __TS__ClassExtends(GetSpellTabInfo, Source)
1027
+ function GetSpellTabInfo.prototype.____constructor(self, tab)
1028
+ Source.prototype.____constructor(self, {name = nil, texture = nil, offset = nil, numSlots = nil}, tab)
1029
+ end
1030
+ function GetSpellTabInfo.prototype.read(self, props)
1031
+ local read = _G.GetSpellTabInfo
1032
+ if read == nil then
1033
+ missing(nil, "GetSpellTabInfo")
1034
+ end
1035
+ local name, texture, offset, numSlots = read(props[1])
1036
+ return {name = name, texture = texture, offset = offset, numSlots = numSlots}
1037
+ end;
1038
+ (function(self)
1039
+ registerSource(
1040
+ nil,
1041
+ ____exports.GetSpellTabInfo,
1042
+ function(____, props) return __TS__New(____exports.GetSpellTabInfo, props[1]) end
1043
+ )
1044
+ end)(GetSpellTabInfo)
1045
+ --- `C_UnitAuras.GetAuraDuration(unit, spellId)`.
1046
+ ____exports.GetAuraDuration = __TS__Class()
1047
+ local GetAuraDuration = ____exports.GetAuraDuration
1048
+ GetAuraDuration.name = "GetAuraDuration"
1049
+ __TS__ClassExtends(GetAuraDuration, Source)
1050
+ function GetAuraDuration.prototype.____constructor(self, unit, spellId)
1051
+ Source.prototype.____constructor(self, nil, unit, spellId)
1052
+ end
1053
+ function GetAuraDuration.prototype.read(self, props)
1054
+ local read = C_UnitAuras and C_UnitAuras.GetAuraDuration
1055
+ if read == nil then
1056
+ missing(nil, "GetAuraDuration")
1057
+ end
1058
+ return duration(
1059
+ nil,
1060
+ read(props[1], props[2])
1061
+ )
1062
+ end;
1063
+ (function(self)
1064
+ registerSource(
1065
+ nil,
1066
+ ____exports.GetAuraDuration,
1067
+ function(____, props) return __TS__New(____exports.GetAuraDuration, props[1], props[2]) end
1068
+ )
1069
+ end)(GetAuraDuration)
1070
+ --- `C_Spell.GetSpellPowerCost(spellId)`.
1071
+ ____exports.GetSpellPowerCost = __TS__Class()
1072
+ local GetSpellPowerCost = ____exports.GetSpellPowerCost
1073
+ GetSpellPowerCost.name = "GetSpellPowerCost"
1074
+ __TS__ClassExtends(GetSpellPowerCost, Source)
1075
+ function GetSpellPowerCost.prototype.____constructor(self, spellId)
1076
+ Source.prototype.____constructor(self, nil, spellId)
1077
+ end
1078
+ function GetSpellPowerCost.prototype.read(self, props)
1079
+ local read = C_Spell and C_Spell.GetSpellPowerCost
1080
+ if read == nil then
1081
+ missing(nil, "GetSpellPowerCost")
1082
+ end
1083
+ return read(props[1])
1084
+ end;
1085
+ (function(self)
1086
+ registerSource(
1087
+ nil,
1088
+ ____exports.GetSpellPowerCost,
1089
+ function(____, props) return __TS__New(____exports.GetSpellPowerCost, props[1]) end
1090
+ )
1091
+ end)(GetSpellPowerCost)
1092
+ --- `C_SpellBook.GetSpellBookSkillLineInfo(line)`.
1093
+ ____exports.GetSpellBookSkillLineInfo = __TS__Class()
1094
+ local GetSpellBookSkillLineInfo = ____exports.GetSpellBookSkillLineInfo
1095
+ GetSpellBookSkillLineInfo.name = "GetSpellBookSkillLineInfo"
1096
+ __TS__ClassExtends(GetSpellBookSkillLineInfo, Source)
1097
+ function GetSpellBookSkillLineInfo.prototype.____constructor(self, line)
1098
+ Source.prototype.____constructor(self, nil, line)
1099
+ end
1100
+ function GetSpellBookSkillLineInfo.prototype.read(self, props)
1101
+ local read = C_SpellBook and C_SpellBook.GetSpellBookSkillLineInfo
1102
+ if read == nil then
1103
+ missing(nil, "GetSpellBookSkillLineInfo")
1104
+ end
1105
+ return read(props[1])
1106
+ end;
1107
+ (function(self)
1108
+ registerSource(
1109
+ nil,
1110
+ ____exports.GetSpellBookSkillLineInfo,
1111
+ function(____, props) return __TS__New(____exports.GetSpellBookSkillLineInfo, props[1]) end
1112
+ )
1113
+ end)(GetSpellBookSkillLineInfo)
1114
+ return ____exports