This repository has been archived by the owner on May 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
dota-api.d.ts
5692 lines (5644 loc) · 178 KB
/
dota-api.d.ts
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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
type Quaternion = any;
type EntityID = number & { _entityIdBrand: any };
type ProjectileID = number & { _projectileIdBrand: any };
type ParticleID = number & { _particleIdBrand: any };
type EventListenerID = number & { _eventListenerBrand: any };
type CCustomGameEventListener = number & { _customGameEventListenerBrand: any };
type RealTimeCombatAnalyzerQuery = number & { _realTimeCombatAnalyzerQueryBrand: any };
interface table {
[key: string]: any;
}
// see: https://github.com/Microsoft/TypeScript/issues/15480
type PlayerID = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
| 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
declare abstract class CScriptHTTPResponse {
Body: string;
Request: CScriptHTTPResponse;
StatusCode: number;
}
/**
* Animating models
*/
declare abstract class CBaseAnimating extends CBaseModelEntity {
/**
* Returns the duration in seconds of the active sequence.
*/
ActiveSequenceDuration(): number;
/**
* Get the attachment id's angles as a p,y,r vector.
*/
GetAttachmentAngles(iAttachment: number): Vector;
/**
* Get the attachment id's origin vector.
*/
GetAttachmentOrigin(iAttachment: number): Vector;
/**
* Get the value of the given animGraph parameter
*/
GetGraphParameter(pszParam: string): any;
/**
* Get scale of entity's model.
*/
GetModelScale(): number;
/**
* Returns the name of the active sequence.
*/
GetSequence(): string;
/**
* Ask whether the main sequence is done playing.
*/
IsSequenceFinished(): boolean;
/**
* Sets the active sequence by name, resetting the current cycle.
*/
ResetSequence(pSequenceName: string): void;
/**
* Get the named attachment id.
*/
ScriptLookupAttachment(pAttachmentName: string): number;
/**
* Returns the duration in seconds of the given sequence name.
*/
SequenceDuration(pSequenceName: string): number;
/**
* Set the cycle of the animation.
*/
SetCycle( flCycle: number ): void;
/**
* Sets a bodygroup.
*/
SetBodygroup(iGroup: number, iValue: number): void;
/**
* Sets a bodygroup by name.
*/
SetBodygroupByName(pName: string, iValue: number): void;
/**
* Pass the vector value to the specified param in the graph
*/
SetGraphLookDirection(vValue: Vector): void;
/**
* Set the specific param value, type is inferred from the type in script
*/
SetGraphParameter(pszParam: string, svArg: any): void;
/**
* Set the specific param on or off
*/
SetGraphParameterBool(szName: string, bValue: boolean): void;
/**
* Pass the enum (int) value to the specified param
*/
SetGraphParameterEnum(szName: string, nValue: number): void;
/**
* Pass the float value to the specified param
*/
SetGraphParameterFloat(szName: string, flValue: number): void;
/**
* Pass the int value to the specified param
*/
SetGraphParameterInt(szName: string, nValue: number): void;
/**
* Pass the vector value to the specified param in the graph
*/
SetGraphParameterVector(szName: string, vValue: Vector): void;
/**
* Set scale of entity's model.
*/
SetModelScale(flScale: number): void;
/**
* Set the specified pose parameter to the specified value.
*/
SetPoseParameter(szName: string, fValue: number): number;
/**
* Sets the named procedural IK target.
*/
SetProceduralIKTarget(pChainName: string, pTargetName: string, vTargetPosition: Vector, qTargetRotation: QAngle): boolean;
/**
* Sets the named procedural IK targets weight: 0 = full animation, 1 = full IK.
*/
SetProceduralIKTargetWeight(pChainName: string, pTargetName: string, flWeight: number): boolean;
/**
* Sets the active sequence by name, keeping the current cycle.
*/
SetSequence(pSequenceName: string): void;
/**
* Set skin (int).
*/
SetSkin(iSkin: number): void;
/**
* Stop the current animation by setting playback rate to 0.0.
*/
StopAnimation(): void;
}
/**
* BaseCombatCharacter
*/
declare abstract class CBaseCombatCharacter extends CBaseFlex {
/**
* GetEquippedWeapons() : Returns an array of all the equipped weapons
*/
GetEquippedWeapons(): any;
/**
* Get the combat character faction.
*/
GetFaction(): number;
/**
* GetWeaponCount() : Gets the number of weapons currently equipped
*/
GetWeaponCount(): number;
/**
* Returns the shoot position eyes (or hand in VR).
*/
ShootPosition(nHand: number): Vector;
}
/**
* Root class of all server-side entities
*/
declare abstract class CBaseEntity extends CEntityInstance {
/**
* AddEffects( int ): Adds the render effect flag.
*/
AddEffects(nFlags: Effects): void;
/**
* Apply a Velocity Impulse
*/
ApplyAbsVelocityImpulse(vecImpulse: Vector): void;
/**
* Apply an Ang Velocity Impulse
*/
ApplyLocalAngularVelocityImpulse(angImpulse: Vector): void;
/**
* Get float value for an entity attribute.
*/
Attribute_GetFloatValue(pName: string, flDefault: number): number;
/**
* Get int value for an entity attribute.
*/
Attribute_GetIntValue(pName: string, nDefault: number): number;
/**
* Set float value for an entity attribute.
*/
Attribute_SetFloatValue(pName: string, flValue: number): void;
/**
* Set int value for an entity attribute.
*/
Attribute_SetIntValue(pName: string, nValue: number): void;
/**
* Delete an entity attribute.
*/
DeleteAttribute(pName: string): void;
/**
* Plays a sound from this entity.
*/
EmitSound(soundname: string): void;
/**
* Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol or flSoundTime is > 0.
*/
EmitSoundParams(soundname: string, nPitch: number, flVolume: number, flDelay: number): void;
/**
* Get the qangles that this entity is looking at.
*/
EyeAngles(): QAngle;
/**
* Get vector to eye position - absolute coords.
*/
EyePosition(): Vector;
FirstMoveChild(): CBaseEntity;
/**
* hEntity to follow, bool bBoneMerge
*/
FollowEntity(hEnt: CBaseEntity, bBoneMerge: boolean): void;
/**
* Returns a table containing the criteria that would be used for response queries on this entity. This is the same as the table that is passed to response rule script function callbacks.
*/
GatherCriteria(hResult: table): void;
/**
* Returns the absolute origins of this entity.
*/
GetAbsOrigin(): Vector;
GetAbsScale(): number;
GetAngles(): QAngle;
/**
* Get entity pitch, yaw, roll as a vector.
*/
GetAnglesAsVector(): Vector;
/**
* Get the local angular velocity - returns a vector of pitch,yaw,roll
*/
GetAngularVelocity(): Vector;
/**
* Get Base? velocity.
*/
GetBaseVelocity(): Vector;
/**
* Get a vector containing max bounds, centered on object.
*/
GetBoundingMaxs(): Vector;
/**
* Get a vector containing min bounds, centered on object.
*/
GetBoundingMins(): Vector;
/**
* Get a table containing the 'Mins' & 'Maxs' vector bounds, centered on object.
*/
GetBounds(): any;
/**
* Get vector to center of object - absolute coords
*/
GetCenter(): Vector;
/**
* Get the entities parented to this entity.
*/
GetChildren(): CBaseEntity[];
/**
* GetContext( name ): looks up a context and returns it if available. May return string, float, or null (if the context isn't found).
*/
GetContext(name: string): string | number | null | undefined;
/**
* Get the forward vector of the entity.
*/
GetForwardVector(): Vector;
/**
* Get the health of this entity.
*/
GetHealth(): number;
/**
* Get entity local pitch, yaw, roll as a QAngle
*/
GetLocalAngles(): QAngle;
/**
* Maybe local angvel
*/
GetLocalAngularVelocity(): QAngle;
/**
* Get entity local origin as a Vector
*/
GetLocalOrigin(): Vector;
GetLocalScale(): number;
/**
* Get Entity relative velocity.
*/
GetLocalVelocity(): Vector;
/**
* Get the mass of an entity. (returns 0 if it doesn't have a physics object)
*/
GetMass(): number;
/**
* Get the maximum health of this entity.
*/
GetMaxHealth(): number;
/**
* Returns the name of the model.
*/
GetModelName(): string;
/**
* If in hierarchy, retrieves the entity's parent.
*/
GetMoveParent(): CBaseEntity;
GetOrigin(): Vector;
/**
* Gets this entity's owner
*/
GetOwner(): CBaseEntity;
/**
* Get the owner entity, if there is one
*/
GetOwnerEntity(): CBaseEntity;
/**
* Get the right vector of the entity.
*/
GetRightVector(): Vector;
/**
* If in hierarchy, walks up the hierarchy to find the root parent.
*/
GetRootMoveParent(): CBaseEntity;
/**
* Returns float duration of the sound. Takes soundname and optional actormodelname.
*/
GetSoundDuration(soundname: string, actormodel: string): number;
/**
* Returns the spawn group handle of this entity.
*/
GetSpawnGroupHandle(): number;
/**
* Get the team number of this entity.
*/
GetTeam(): DOTATeam_t;
/**
* Get the team number of this entity.
*/
GetTeamNumber(): DOTATeam_t;
/**
* Get the up vector of the entity.
*/
GetUpVector(): Vector;
GetVelocity(): Vector;
/**
* See if an entity has a particular attribute.
*/
HasAttribute(pName: string): boolean;
/**
* Is this entity alive?
*/
IsAlive(): boolean;
/**
* Is this entity an CAI_BaseNPC?
*/
IsNPC(): this is CDOTA_BaseNPC;
/**
* Is this entity a player?
*/
IsPlayer(): this is CDOTAPlayer;
/**
* Detect if the entity has been deleted from C++.
*/
IsNull(): boolean;
/**
* Kill the entity. This kill is not credited to anyone.
*/
Kill(): void;
NextMovePeer(): CBaseEntity;
/**
* Takes duration, value for a temporary override.
*/
OverrideFriction(duration: number, friction: number): void;
/**
* Precache a sound for later playing.
*/
PrecacheScriptSound(soundname: string): void;
/**
* RemoveEffects( int ): Removes the render effect flag.
*/
RemoveEffects(nFlags: Effects): void;
/**
* Set entity pitch, yaw, roll by component.
*/
SetAbsAngles(fPitch: number, fYaw: number, fRoll: number): void;
/**
* Set the absolute origin of this entity.
*/
SetAbsOrigin(origin: Vector): void;
SetAbsScale(flScale: number): void;
/**
* Set entity pitch, yaw, roll by component.
*/
SetAngles(fPitch: number, fYaw: number, fRoll: number): void;
/**
* Set the local angular velocity - takes float pitch,yaw,roll velocities
*/
SetAngularVelocity(pitchVel: number, yawVel: number, rollVel: number): void;
/**
* Set the position of the constraint.
*/
SetConstraint(vPos: Vector): void;
/**
* SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a string. Will last for duration (set 0 to mean 'forever').
*/
SetContext(pName: string, pValue: string, duration: number): void;
/**
* SetContextNum( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a number (int or float). Will last for duration (set 0 to mean 'forever').
*/
SetContextNum(pName: string, fValue: number, duration: number): void;
/**
* Set a think function on this entity.
*/
SetContextThink(pszContextName: string, hThinkFunc: () => number | undefined, flInterval: number): void;
/**
* Set the name of an entity.
*/
SetEntityName(pName: string): void;
/**
* Set the orientation of the entity to have this forward vector.
*/
SetForwardVector(v: Vector): void;
/**
* Set PLAYER friction, ignored for objects.
*/
SetFriction(flFriction: number): void;
/**
* Set PLAYER gravity, ignored for objects.
*/
SetGravity(flGravity: number): void;
/**
* Set the health of this entity.
*/
SetHealth(nHealth: number): void;
/**
* Set entity local pitch, yaw, roll by component
*/
SetLocalAngles(fPitch: number, fYaw: number, fRoll: number): void;
/**
* Set entity local origin from a Vector
*/
SetLocalOrigin(origin: Vector): void;
SetLocalScale(flScale: number): void;
/**
* Set the mass of an entity. (does nothing if it doesn't have a physics object)
*/
SetMass(flMass: number): void;
/**
* Set the maximum health of this entity.
*/
SetMaxHealth(amt: number): void;
/**
* Set the origin of this entity.
*/
SetOrigin(v: Vector): void;
/**
* Sets this entity's owner
*/
SetOwner(pOwner: CBaseEntity): void;
/**
* Set the parent for this entity.
*/
SetParent(hParent: CBaseEntity, pAttachmentname: string): void;
/**
* Set the team of this entity.
*/
SetTeam(iTeamNum: DOTATeam_t): void;
SetVelocity(vecVelocity: Vector): void;
/**
* Stops a named sound playing from this entity.
*/
StopSound(soundname: string): void;
/**
* Apply damage to this entity. Use CreateDamageInfo() to create a damageinfo object.
*/
TakeDamage(hInfo: table): number;
/**
* Transform point from entity space to world space.
*/
TransformPointEntityToWorld(point: Vector): Vector;
/**
* Transform point from world space to entity space.
*/
TransformPointWorldToEntity(point: Vector): Vector;
/**
* Fires off this entity's OnTrigger responses.
*/
Trigger(): void;
/**
* Validates the private script scope and creates it if one doesn't exist.
*/
ValidatePrivateScriptScope(): void;
}
/**
* Animated characters who have vertex flex capability.
*/
declare abstract class CBaseFlex extends CBaseAnimating {
/**
* Returns the instance of the oldest active scene entity (if any).
*/
GetCurrentScene(): CSceneEntity;
/**
* Returns the instance of the scene entity at the specified index.
*/
GetSceneByIndex(index: number): CSceneEntity;
/**
* ( vcd file, delay ) - play specified vcd file
*/
ScriptPlayScene(pszScene: string, flDelay: number): number;
}
/**
* Base entity with model
*/
declare abstract class CBaseModelEntity extends CBaseEntity {
/**
* GetMaterialGroupHash(): Get the material group hash of this entity.
*/
GetMaterialGroupHash(): number;
/**
* GetMaterialGroupMask(): Get the mesh group mask of this entity.
*/
GetMaterialGroupMask(): number;
/**
* GetRenderAlpha(): Get the alpha modulation of this entity.
*/
GetRenderAlpha(): number;
/**
* GetRenderColor(): Get the render color of the entity.
*/
GetRenderColor(): Vector;
/**
* SetLightGroup( string ): Sets the light group of the entity.
*/
SetLightGroup(pLightGroup: string): void;
/**
* SetMaterialGroup( string ): Set the material group of this entity.
*/
SetMaterialGroup(pMaterialGroup: string): void;
/**
* SetMaterialGroupHash( uint32 ): Set the material group hash of this entity.
*/
SetMaterialGroupHash(nHash: number): void;
/**
* SetMaterialGroupMask( uint64 ): Set the mesh group mask of this entity.
*/
SetMaterialGroupMask(nMeshGroupMask: number): void;
/**
* Set the model of this entity.
*/
SetModel(pModelName: string): void;
/**
* SetRenderAlpha( int ): Set the alpha modulation of this entity.
*/
SetRenderAlpha(nAlpha: number): void;
/**
* SetRenderColor( r, g, b ): Sets the render color of the entity.
*/
SetRenderColor(r: number, g: number, b: number): void;
/**
* SetRenderMode( int ): Sets the render mode of the entity.
*/
SetRenderMode(nMode: number): void;
/**
* SetSingleMeshGroup( string ): Set a single mesh group for this entity.
*/
SetSingleMeshGroup(pMeshGroupName: string): void;
SetSize(mins: Vector, maxs: Vector): void;
}
/**
* The player entity.
*/
declare abstract class CBasePlayer extends CBaseCombatCharacter {
/**
* Returns whether this player's chaperone bounds are visible.
*/
AreChaperoneBoundsVisible(): boolean;
/**
* Returns the HMD anchor entity for this player if it exists.
*/
GetHMDAnchor(): any;
/**
* Returns the HMD Avatar entity for this player if it exists.
*/
GetHMDAvatar(): any;
/**
* Returns the Vector position of the point you ask for. Pass 0-3 to get the four points.
*/
GetPlayArea(nPoint: number): Vector;
/**
* Returns the player's user id.
*/
GetUserID(): number;
/**
* Returns the type of controller being used while in VR.
*/
GetVRControllerType(): any;
/**
* Returns true if the player is in noclip mode.
*/
IsNoclipping(): boolean;
/**
* Returns true if the use key is pressed.
*/
IsUsePressed(): boolean;
/**
* Returns true if the controller button is pressed.
*/
IsVRControllerButtonPressed(nButton: number): boolean;
/**
* Returns true if the SteamVR dashboard is showing for this player.
*/
IsVRDashboardShowing(): boolean;
/**
* Quit the game from script.
*/
Quit(): void;
}
/**
* Base Trigger for all the triggers
*/
declare abstract class CBaseTrigger extends CBaseEntity {
/**
* Disable's the trigger
*/
Disable(): void;
/**
* Enable the trigger
*/
Enable(): void;
/**
* Checks whether the passed entity is touching the trigger.
*/
IsTouching(hEnt: CBaseEntity): boolean;
}
/**
* Body Component Scriptdesc
*/
declare abstract class CBodyComponent {
/**
* Apply an impulse at a worldspace position to the physics
*/
AddImpulseAtPosition(arg1: Vector, arg2: Vector): void;
/**
* Add linear and angular velocity to the physics object
*/
AddVelocity(arg1: Vector, arg2: Vector): void;
/**
* Detach from its parent
*/
DetachFromParent(): void;
/**
* Returns the active sequence
*/
GetSequence(): any;
/**
* Is attached to parent
*/
IsAttachedToParent(): boolean;
/**
* Returns a sequence id given a name
*/
LookupSequence(arg1: string): any;
/**
* Returns the duration in seconds of the specified sequence
*/
SequenceDuration(arg1: string): number;
SetAngularVelocity(arg1: Vector): void;
/**
* Pass string for the animation to play on this model
*/
SetAnimation(arg1: string): void;
SetBodyGroup(arg1: string): void;
SetMaterialGroup(arg1: string): void;
SetVelocity(arg1: Vector): void;
}
type CustomGameEventHandler<TEvent> = (this: void, userID: number, event: TEvent & { PlayerID: PlayerID }) => void;
/**
* Custom game event manager
*/
interface CCustomGameEventManager {
/**
* ( string EventName, func CallbackFunction ) - Register a callback to be called when a particular custom event arrives. Returns a listener ID that can be used to unregister later.
*/
RegisterListener(eventName: string, handler: CustomGameEventHandler<table>): CCustomGameEventListener;
/**
* ( string EventName, func CallbackFunction ) - Register a callback to be called when a particular custom event arrives. Returns a listener ID that can be used to unregister later.
*/
RegisterListener<TEvent>(eventName: string, handler: CustomGameEventHandler<TEvent>): CCustomGameEventListener;
/**
* ( string EventName, table EventData )
*/
Send_ServerToAllClients(eventName: string, eventData: table): void;
/**
* ( Entity Player, string EventName, table EventData )
*/
Send_ServerToPlayer(player: CDOTAPlayer, eventName: string, eventData: table): void;
/**
* ( int TeamNumber, string EventName, table EventData )
*/
Send_ServerToTeam(team: DOTATeam_t, eventName: string, eventData: table): void;
/**
* ( int ListnerID ) - Unregister a specific listener
*/
UnregisterListener(listener: CCustomGameEventListener): void;
}
declare const CustomGameEventManager: CCustomGameEventManager;
/**
* Custom network table manager
*/
interface CCustomNetTableManager {
/**
* ( string TableName, string KeyName )
*/
GetTableValue(arg1: string, arg2: string): table;
/**
* ( string TableName, string KeyName, script_table Value )
*/
SetTableValue(arg1: string, arg2: string, arg3: table): boolean;
}
declare const CustomNetTables: CCustomNetTableManager;
/**
* An ability
*/
declare abstract class CDOTABaseAbility extends CBaseEntity {
/**
* Returns whether or not this ability can be upgraded further, takes into account ability points and level requirements.
*/
CanAbilityBeUpgraded(): boolean;
/**
* Causes this ability to be cast. Only works if it's possible: target in range, caster looks towards the target etc.
*/
CastAbility(): boolean;
ContinueCasting(): boolean;
/**
* Creates an area that grants vision to the team of the caster of this ability.
*/
CreateVisibilityNode(vLocation: Vector, fRadius: number, fDuration: number): void;
DecrementModifierRefCount(): void;
/**
* Stop the channeling of this ability.
*/
EndChannel(bInterrupted: boolean): void;
/**
* Clear the cooldown remaining on this ability.
*/
EndCooldown(): void;
/**
* Get the ability's AOE radius.
*/
GetAOERadius(): number;
/**
* Get the ability damage as stated in the ability's "AbilityDamage" kv
*/
GetAbilityDamage(): number;
/**
* Get the ability damage type as stated in the ability's "AbilityDamageType" kv.
*/
GetAbilityDamageType(): DAMAGE_TYPES;
/**
* Get the index (starting from 0) of the ability, from top to bottom in the heroes' ability slots in the hero files.
*/
GetAbilityIndex(): number;
/**
* Gets the key values definition for this ability.
*/
GetAbilityKeyValues(): table;
/**
* Returns the name of this ability.
*/
GetAbilityName(): string;
/**
* Get the ability target flags as stated in the ability's "AbilityTargetFlags" kv.
*/
GetAbilityTargetFlags(): DOTA_UNIT_TARGET_FLAGS;
/**
* Get the ability target teams as stated in the ability's "AbilityTargetTeam" kv.
*/
GetAbilityTargetTeam(): DOTA_UNIT_TARGET_TEAM;
/**
* Get the ability target types as stated in the ability's "AbilityTargetType" kv.
*/
GetAbilityTargetType(): DOTA_UNIT_TARGET_TYPE;
GetAbilityType(): number;
GetAnimationIgnoresModelScale(): boolean;
/**
* Get all associated primary abilities that are related to this ability.
*/
GetAssociatedPrimaryAbilities(): string;
/**
* Get all associated secondary abilities that are related to this ability.
*/
GetAssociatedSecondaryAbilities(): string;
/**
* Get whether or not this ability is set to auto cast: True means auto cast is on.
*/
GetAutoCastState(): boolean;
/**
* Get the backswing time of this ability.
*/
GetBackswingTime(): number;
/**
* Get the ability's behavior types. Also allows dynamic setting of the ability behavior types.
*/
GetBehavior(): number;
/**
* Get the ability's cast point. Also allows dynamic setting of the ability' cast point.
*/
GetCastPoint(): number;
/**
* Gets the cast range of the ability. Also allows dynamic setting of the ability's cast range.
*/
GetCastRange(vLocation: Vector, hTarget: CDOTA_BaseNPC): number;
/**
* Get the ability's caster.
*/
GetCaster(): CDOTA_BaseNPC;
/**
* Get the dota game time in the start of the channel
*/
GetChannelStartTime(): number;
/**
* Get how many seconds the channel can go on for.
*/
GetChannelTime(): number;
/**
* Get how much mana is drained every second while channeling. Can pass -1 for current level.
*/
GetChannelledManaCostPerSecond(iLevel: number): number;
GetCloneSource(): CDOTA_BaseNPC;
GetConceptRecipientType(): number;
/**
* Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
*/
GetCooldown(iLevel: number): number;
GetCooldownTime(): number;
/**
* Get how many seconds are left for the cooldown to ready the ability up again. Returns -1 if ability is ready.
*/
GetCooldownTimeRemaining(): number;
/**
* Get the vector of the current position of the caster's cursor.
*/
GetCursorPosition(): Vector;
/**
* Get the entity that the caster's cursor is highlighting.
*/
GetCursorTarget(): CDOTA_BaseNPC;
/**
* Get whether or not the caster's cursor is highlighting a target.
*/
GetCursorTargetingNothing(): boolean;
GetDuration(): number;
GetEffectiveCooldown(level: number): number;
/**
* Get how much gold is consumed for using this ability. Can pass -1 for current level.
*/
GetGoldCost(iLevel: number): number;
/**
* Get how much gold is needed to upgrade this ability to the next level. Can pass -1 for current level.
*/
GetGoldCostForUpgrade(iLevel: number): number;
/**
* Get the hero level required to upgrade this ability to the next level.
*/
GetHeroLevelRequiredToUpgrade(): number;
/**
* Get the name of the modifier that will be automatically applied upon learning the ability. Modifier is re-applied (refreshed) when leveling the ability up.
*/
GetIntrinsicModifierName(): string;
/**
* Get the current level of the ability.
*/
GetLevel(): number;
/**
* Gets a value from this ability's special value block for a specific level.
*/
GetLevelSpecialValueFor(valueName: string, nLevel: number): number;
/**
* Gets a value from this ability's special value block for a specific level.
*/
GetLevelSpecialValueNoOverride(valueName: string, nLevel: number): number;
/**
* Get the ability's mana cost. Also allows dynamic setting of the ability's mana costs.
*/
GetManaCost(iLevel: number): number;
/**
* Get the maximum level this ability can upgrade to.
*/
GetMaxLevel(): number;
GetModifierValue(): number;
GetModifierValueBonus(): number;
GetPlaybackRateOverride(): number;
/**
* Get the name of other abilities that share the cooldown with this ability.
*/
GetSharedCooldownName(): string;
/**
* Gets a value from this ability's special value block for its current level.
*/
GetSpecialValueFor(valueName: string): number;
GetStolenActivityModifier(): string;
/**
* Get whether or not this ability is toggled on. True means that the ability is toggled on.
*/
GetToggleState(): boolean;
/**
* [7.23]
*/
GetUpgradeRecommended(): boolean;
HeroXPChange(flXP: number): boolean;
IncrementModifierRefCount(): void;
/**
* Get whether the ability is activated and can be used.
*/
IsActivated(): boolean;
/**
* Returns whether this ability is an attribute bonus.
*/
IsAttributeBonus(): boolean;
/**
* Returns whether the ability is currently channeling.
*/
IsChanneling(): boolean;
/**
* Returns whether the ability is off cooldown and ready to be used.
*/
IsCooldownReady(): boolean;
IsCosmetic(hEntity: CBaseEntity): boolean;
/**
* Returns whether the ability can be cast.
*/
IsFullyCastable(): boolean;
/**
* Returns whether the ability is visible on the HUD.
*/
IsHidden(): boolean;
/**
* Returns whether this ability is a hidden secondary ability.
*/
IsHiddenSecondaryAbility(): boolean;
/**
* Returns whether the ability can be visible on the HUD when stolen by Rubick's Spell Steal.
*/
IsHiddenWhenStolen(): boolean;
/**
* Returns whether the ability is currently casting.
*/
IsInAbilityPhase(): boolean;
/**
* Returns whether the ability is an item.
*/
IsItem(): this is CDOTA_Item;
/**
* Returns if the caster has enough gold to cast this ability.
*/
IsOwnersGoldEnough(nIssuerPlayerID: PlayerID): boolean;
/**
* Returns if the caster has enough gold to upgrade this ability.
*/
IsOwnersGoldEnoughForUpgrade(): boolean;
/**
* Returns if the caster has enough mana to cast this ability.
*/
IsOwnersManaEnough(): boolean;
/**
* Returns if the ability is a passive ability.
*/
IsPassive(): boolean;
/**
* Returns if the ability can be refreshed by Refresher Orb/Shard.
*/
IsRefreshable(): boolean;
IsSharedWithTeammates(): boolean;
/**
* Returns if the ability can be stolen.
*/
IsStealable(): boolean;
/**
* Returns if the ability is a stolen ability.
*/
IsStolen(): boolean;
/**
* Returns if the ability is a toggleable ability.
*/
IsToggle(): boolean;
/**
* Returns if the ability was learned (has at least one level).
*/
IsTrained(): boolean;
/**
* Mark the ability button for this ability as needing a refresh.
*/
MarkAbilityButtonDirty(): void;
NumModifiersUsingAbility(): number;
/**
* Event fired when the ability is interrupted and is not cast.
*/
OnAbilityPhaseInterrupted(): void;
/**
* Event fired when starting to cast the ability.
*/
OnAbilityPhaseStart(): boolean;
/**
* Event fired when the ability is alt clicked. Returns the player that pinged it.