-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.j
7784 lines (6995 loc) · 581 KB
/
common.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
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
//============================================================================
// Native types. All native functions take extended handle types when
// possible to help prevent passing bad values to native functions
//
type agent extends handle // all reference counted objects
type event extends agent // a reference to an event registration
type player extends agent // a single player reference
type widget extends agent // an interactive game object with life
type unit extends widget // a single unit reference
type destructable extends widget
type item extends widget
type ability extends agent
type buff extends ability
type force extends agent
type group extends agent
type trigger extends agent
type triggercondition extends agent
type triggeraction extends handle
type timer extends agent
type location extends agent
type region extends agent
type rect extends agent
type boolexpr extends agent
type sound extends agent
type conditionfunc extends boolexpr
type filterfunc extends boolexpr
type unitpool extends handle
type itempool extends handle
type race extends handle
type alliancetype extends handle
type racepreference extends handle
type gamestate extends handle
type igamestate extends gamestate
type fgamestate extends gamestate
type playerstate extends handle
type playerscore extends handle
type playergameresult extends handle
type unitstate extends handle
type aidifficulty extends handle
type eventid extends handle
type gameevent extends eventid
type playerevent extends eventid
type playerunitevent extends eventid
type unitevent extends eventid
type limitop extends eventid
type widgetevent extends eventid
type dialogevent extends eventid
type unittype extends handle
type gamespeed extends handle
type gamedifficulty extends handle
type gametype extends handle
type mapflag extends handle
type mapvisibility extends handle
type mapsetting extends handle
type mapdensity extends handle
type mapcontrol extends handle
type minimapicon extends handle
type playerslotstate extends handle
type volumegroup extends handle
type camerafield extends handle
type camerasetup extends handle
type playercolor extends handle
type placement extends handle
type startlocprio extends handle
type raritycontrol extends handle
type blendmode extends handle
type texmapflags extends handle
type effect extends agent
type effecttype extends handle
type weathereffect extends handle
type terraindeformation extends handle
type fogstate extends handle
type fogmodifier extends agent
type dialog extends agent
type button extends agent
type quest extends agent
type questitem extends agent
type defeatcondition extends agent
type timerdialog extends agent
type leaderboard extends agent
type multiboard extends agent
type multiboarditem extends agent
type trackable extends agent
type gamecache extends agent
type version extends handle
type itemtype extends handle
type texttag extends handle
type attacktype extends handle
type damagetype extends handle
type weapontype extends handle
type soundtype extends handle
type lightning extends handle
type pathingtype extends handle
type mousebuttontype extends handle
type animtype extends handle
type subanimtype extends handle
type image extends handle
type ubersplat extends handle
type hashtable extends agent
type framehandle extends handle
type originframetype extends handle
type framepointtype extends handle
type textaligntype extends handle
type frameeventtype extends handle
type oskeytype extends handle
type abilityintegerfield extends handle
type abilityrealfield extends handle
type abilitybooleanfield extends handle
type abilitystringfield extends handle
type abilityintegerlevelfield extends handle
type abilityreallevelfield extends handle
type abilitybooleanlevelfield extends handle
type abilitystringlevelfield extends handle
type abilityintegerlevelarrayfield extends handle
type abilityreallevelarrayfield extends handle
type abilitybooleanlevelarrayfield extends handle
type abilitystringlevelarrayfield extends handle
type unitintegerfield extends handle
type unitrealfield extends handle
type unitbooleanfield extends handle
type unitstringfield extends handle
type unitweaponintegerfield extends handle
type unitweaponrealfield extends handle
type unitweaponbooleanfield extends handle
type unitweaponstringfield extends handle
type itemintegerfield extends handle
type itemrealfield extends handle
type itembooleanfield extends handle
type itemstringfield extends handle
type movetype extends handle
type targetflag extends handle
type armortype extends handle
type heroattribute extends handle
type defensetype extends handle
type regentype extends handle
type unitcategory extends handle
type pathingflag extends handle
type commandbuttoneffect extends handle
constant native ConvertRace takes integer i returns race
constant native ConvertAllianceType takes integer i returns alliancetype
constant native ConvertRacePref takes integer i returns racepreference
constant native ConvertIGameState takes integer i returns igamestate
constant native ConvertFGameState takes integer i returns fgamestate
constant native ConvertPlayerState takes integer i returns playerstate
constant native ConvertPlayerScore takes integer i returns playerscore
constant native ConvertPlayerGameResult takes integer i returns playergameresult
constant native ConvertUnitState takes integer i returns unitstate
constant native ConvertAIDifficulty takes integer i returns aidifficulty
constant native ConvertGameEvent takes integer i returns gameevent
constant native ConvertPlayerEvent takes integer i returns playerevent
constant native ConvertPlayerUnitEvent takes integer i returns playerunitevent
constant native ConvertWidgetEvent takes integer i returns widgetevent
constant native ConvertDialogEvent takes integer i returns dialogevent
constant native ConvertUnitEvent takes integer i returns unitevent
constant native ConvertLimitOp takes integer i returns limitop
constant native ConvertUnitType takes integer i returns unittype
constant native ConvertGameSpeed takes integer i returns gamespeed
constant native ConvertPlacement takes integer i returns placement
constant native ConvertStartLocPrio takes integer i returns startlocprio
constant native ConvertGameDifficulty takes integer i returns gamedifficulty
constant native ConvertGameType takes integer i returns gametype
constant native ConvertMapFlag takes integer i returns mapflag
constant native ConvertMapVisibility takes integer i returns mapvisibility
constant native ConvertMapSetting takes integer i returns mapsetting
constant native ConvertMapDensity takes integer i returns mapdensity
constant native ConvertMapControl takes integer i returns mapcontrol
constant native ConvertPlayerColor takes integer i returns playercolor
constant native ConvertPlayerSlotState takes integer i returns playerslotstate
constant native ConvertVolumeGroup takes integer i returns volumegroup
constant native ConvertCameraField takes integer i returns camerafield
constant native ConvertBlendMode takes integer i returns blendmode
constant native ConvertRarityControl takes integer i returns raritycontrol
constant native ConvertTexMapFlags takes integer i returns texmapflags
constant native ConvertFogState takes integer i returns fogstate
constant native ConvertEffectType takes integer i returns effecttype
constant native ConvertVersion takes integer i returns version
constant native ConvertItemType takes integer i returns itemtype
constant native ConvertAttackType takes integer i returns attacktype
constant native ConvertDamageType takes integer i returns damagetype
constant native ConvertWeaponType takes integer i returns weapontype
constant native ConvertSoundType takes integer i returns soundtype
constant native ConvertPathingType takes integer i returns pathingtype
constant native ConvertMouseButtonType takes integer i returns mousebuttontype
constant native ConvertAnimType takes integer i returns animtype
constant native ConvertSubAnimType takes integer i returns subanimtype
constant native ConvertOriginFrameType takes integer i returns originframetype
constant native ConvertFramePointType takes integer i returns framepointtype
constant native ConvertTextAlignType takes integer i returns textaligntype
constant native ConvertFrameEventType takes integer i returns frameeventtype
constant native ConvertOsKeyType takes integer i returns oskeytype
constant native ConvertAbilityIntegerField takes integer i returns abilityintegerfield
constant native ConvertAbilityRealField takes integer i returns abilityrealfield
constant native ConvertAbilityBooleanField takes integer i returns abilitybooleanfield
constant native ConvertAbilityStringField takes integer i returns abilitystringfield
constant native ConvertAbilityIntegerLevelField takes integer i returns abilityintegerlevelfield
constant native ConvertAbilityRealLevelField takes integer i returns abilityreallevelfield
constant native ConvertAbilityBooleanLevelField takes integer i returns abilitybooleanlevelfield
constant native ConvertAbilityStringLevelField takes integer i returns abilitystringlevelfield
constant native ConvertAbilityIntegerLevelArrayField takes integer i returns abilityintegerlevelarrayfield
constant native ConvertAbilityRealLevelArrayField takes integer i returns abilityreallevelarrayfield
constant native ConvertAbilityBooleanLevelArrayField takes integer i returns abilitybooleanlevelarrayfield
constant native ConvertAbilityStringLevelArrayField takes integer i returns abilitystringlevelarrayfield
constant native ConvertUnitIntegerField takes integer i returns unitintegerfield
constant native ConvertUnitRealField takes integer i returns unitrealfield
constant native ConvertUnitBooleanField takes integer i returns unitbooleanfield
constant native ConvertUnitStringField takes integer i returns unitstringfield
constant native ConvertUnitWeaponIntegerField takes integer i returns unitweaponintegerfield
constant native ConvertUnitWeaponRealField takes integer i returns unitweaponrealfield
constant native ConvertUnitWeaponBooleanField takes integer i returns unitweaponbooleanfield
constant native ConvertUnitWeaponStringField takes integer i returns unitweaponstringfield
constant native ConvertItemIntegerField takes integer i returns itemintegerfield
constant native ConvertItemRealField takes integer i returns itemrealfield
constant native ConvertItemBooleanField takes integer i returns itembooleanfield
constant native ConvertItemStringField takes integer i returns itemstringfield
constant native ConvertMoveType takes integer i returns movetype
constant native ConvertTargetFlag takes integer i returns targetflag
constant native ConvertArmorType takes integer i returns armortype
constant native ConvertHeroAttribute takes integer i returns heroattribute
constant native ConvertDefenseType takes integer i returns defensetype
constant native ConvertRegenType takes integer i returns regentype
constant native ConvertUnitCategory takes integer i returns unitcategory
constant native ConvertPathingFlag takes integer i returns pathingflag
constant native OrderId takes string orderIdString returns integer
constant native OrderId2String takes integer orderId returns string
constant native UnitId takes string unitIdString returns integer
constant native UnitId2String takes integer unitId returns string
// Not currently working correctly...
constant native AbilityId takes string abilityIdString returns integer
constant native AbilityId2String takes integer abilityId returns string
// Looks up the "name" field for any object (unit, item, ability)
constant native GetObjectName takes integer objectId returns string
constant native GetBJMaxPlayers takes nothing returns integer
constant native GetBJPlayerNeutralVictim takes nothing returns integer
constant native GetBJPlayerNeutralExtra takes nothing returns integer
constant native GetBJMaxPlayerSlots takes nothing returns integer
constant native GetPlayerNeutralPassive takes nothing returns integer
constant native GetPlayerNeutralAggressive takes nothing returns integer
globals
//===================================================
// Game Constants
//===================================================
// pfff
constant boolean FALSE = false
constant boolean TRUE = true
constant integer JASS_MAX_ARRAY_SIZE = 32768
constant integer PLAYER_NEUTRAL_PASSIVE = GetPlayerNeutralPassive()
constant integer PLAYER_NEUTRAL_AGGRESSIVE = GetPlayerNeutralAggressive()
constant playercolor PLAYER_COLOR_RED = ConvertPlayerColor(0)
constant playercolor PLAYER_COLOR_BLUE = ConvertPlayerColor(1)
constant playercolor PLAYER_COLOR_CYAN = ConvertPlayerColor(2)
constant playercolor PLAYER_COLOR_PURPLE = ConvertPlayerColor(3)
constant playercolor PLAYER_COLOR_YELLOW = ConvertPlayerColor(4)
constant playercolor PLAYER_COLOR_ORANGE = ConvertPlayerColor(5)
constant playercolor PLAYER_COLOR_GREEN = ConvertPlayerColor(6)
constant playercolor PLAYER_COLOR_PINK = ConvertPlayerColor(7)
constant playercolor PLAYER_COLOR_LIGHT_GRAY = ConvertPlayerColor(8)
constant playercolor PLAYER_COLOR_LIGHT_BLUE = ConvertPlayerColor(9)
constant playercolor PLAYER_COLOR_AQUA = ConvertPlayerColor(10)
constant playercolor PLAYER_COLOR_BROWN = ConvertPlayerColor(11)
constant playercolor PLAYER_COLOR_MAROON = ConvertPlayerColor(12)
constant playercolor PLAYER_COLOR_NAVY = ConvertPlayerColor(13)
constant playercolor PLAYER_COLOR_TURQUOISE = ConvertPlayerColor(14)
constant playercolor PLAYER_COLOR_VIOLET = ConvertPlayerColor(15)
constant playercolor PLAYER_COLOR_WHEAT = ConvertPlayerColor(16)
constant playercolor PLAYER_COLOR_PEACH = ConvertPlayerColor(17)
constant playercolor PLAYER_COLOR_MINT = ConvertPlayerColor(18)
constant playercolor PLAYER_COLOR_LAVENDER = ConvertPlayerColor(19)
constant playercolor PLAYER_COLOR_COAL = ConvertPlayerColor(20)
constant playercolor PLAYER_COLOR_SNOW = ConvertPlayerColor(21)
constant playercolor PLAYER_COLOR_EMERALD = ConvertPlayerColor(22)
constant playercolor PLAYER_COLOR_PEANUT = ConvertPlayerColor(23)
constant race RACE_HUMAN = ConvertRace(1)
constant race RACE_ORC = ConvertRace(2)
constant race RACE_UNDEAD = ConvertRace(3)
constant race RACE_NIGHTELF = ConvertRace(4)
constant race RACE_DEMON = ConvertRace(5)
constant race RACE_OTHER = ConvertRace(7)
constant playergameresult PLAYER_GAME_RESULT_VICTORY = ConvertPlayerGameResult(0)
constant playergameresult PLAYER_GAME_RESULT_DEFEAT = ConvertPlayerGameResult(1)
constant playergameresult PLAYER_GAME_RESULT_TIE = ConvertPlayerGameResult(2)
constant playergameresult PLAYER_GAME_RESULT_NEUTRAL = ConvertPlayerGameResult(3)
constant alliancetype ALLIANCE_PASSIVE = ConvertAllianceType(0)
constant alliancetype ALLIANCE_HELP_REQUEST = ConvertAllianceType(1)
constant alliancetype ALLIANCE_HELP_RESPONSE = ConvertAllianceType(2)
constant alliancetype ALLIANCE_SHARED_XP = ConvertAllianceType(3)
constant alliancetype ALLIANCE_SHARED_SPELLS = ConvertAllianceType(4)
constant alliancetype ALLIANCE_SHARED_VISION = ConvertAllianceType(5)
constant alliancetype ALLIANCE_SHARED_CONTROL = ConvertAllianceType(6)
constant alliancetype ALLIANCE_SHARED_ADVANCED_CONTROL= ConvertAllianceType(7)
constant alliancetype ALLIANCE_RESCUABLE = ConvertAllianceType(8)
constant alliancetype ALLIANCE_SHARED_VISION_FORCED = ConvertAllianceType(9)
constant version VERSION_REIGN_OF_CHAOS = ConvertVersion(0)
constant version VERSION_FROZEN_THRONE = ConvertVersion(1)
constant attacktype ATTACK_TYPE_NORMAL = ConvertAttackType(0)
constant attacktype ATTACK_TYPE_MELEE = ConvertAttackType(1)
constant attacktype ATTACK_TYPE_PIERCE = ConvertAttackType(2)
constant attacktype ATTACK_TYPE_SIEGE = ConvertAttackType(3)
constant attacktype ATTACK_TYPE_MAGIC = ConvertAttackType(4)
constant attacktype ATTACK_TYPE_CHAOS = ConvertAttackType(5)
constant attacktype ATTACK_TYPE_HERO = ConvertAttackType(6)
constant damagetype DAMAGE_TYPE_UNKNOWN = ConvertDamageType(0)
constant damagetype DAMAGE_TYPE_NORMAL = ConvertDamageType(4)
constant damagetype DAMAGE_TYPE_ENHANCED = ConvertDamageType(5)
constant damagetype DAMAGE_TYPE_FIRE = ConvertDamageType(8)
constant damagetype DAMAGE_TYPE_COLD = ConvertDamageType(9)
constant damagetype DAMAGE_TYPE_LIGHTNING = ConvertDamageType(10)
constant damagetype DAMAGE_TYPE_POISON = ConvertDamageType(11)
constant damagetype DAMAGE_TYPE_DISEASE = ConvertDamageType(12)
constant damagetype DAMAGE_TYPE_DIVINE = ConvertDamageType(13)
constant damagetype DAMAGE_TYPE_MAGIC = ConvertDamageType(14)
constant damagetype DAMAGE_TYPE_SONIC = ConvertDamageType(15)
constant damagetype DAMAGE_TYPE_ACID = ConvertDamageType(16)
constant damagetype DAMAGE_TYPE_FORCE = ConvertDamageType(17)
constant damagetype DAMAGE_TYPE_DEATH = ConvertDamageType(18)
constant damagetype DAMAGE_TYPE_MIND = ConvertDamageType(19)
constant damagetype DAMAGE_TYPE_PLANT = ConvertDamageType(20)
constant damagetype DAMAGE_TYPE_DEFENSIVE = ConvertDamageType(21)
constant damagetype DAMAGE_TYPE_DEMOLITION = ConvertDamageType(22)
constant damagetype DAMAGE_TYPE_SLOW_POISON = ConvertDamageType(23)
constant damagetype DAMAGE_TYPE_SPIRIT_LINK = ConvertDamageType(24)
constant damagetype DAMAGE_TYPE_SHADOW_STRIKE = ConvertDamageType(25)
constant damagetype DAMAGE_TYPE_UNIVERSAL = ConvertDamageType(26)
constant weapontype WEAPON_TYPE_WHOKNOWS = ConvertWeaponType(0)
constant weapontype WEAPON_TYPE_METAL_LIGHT_CHOP = ConvertWeaponType(1)
constant weapontype WEAPON_TYPE_METAL_MEDIUM_CHOP = ConvertWeaponType(2)
constant weapontype WEAPON_TYPE_METAL_HEAVY_CHOP = ConvertWeaponType(3)
constant weapontype WEAPON_TYPE_METAL_LIGHT_SLICE = ConvertWeaponType(4)
constant weapontype WEAPON_TYPE_METAL_MEDIUM_SLICE = ConvertWeaponType(5)
constant weapontype WEAPON_TYPE_METAL_HEAVY_SLICE = ConvertWeaponType(6)
constant weapontype WEAPON_TYPE_METAL_MEDIUM_BASH = ConvertWeaponType(7)
constant weapontype WEAPON_TYPE_METAL_HEAVY_BASH = ConvertWeaponType(8)
constant weapontype WEAPON_TYPE_METAL_MEDIUM_STAB = ConvertWeaponType(9)
constant weapontype WEAPON_TYPE_METAL_HEAVY_STAB = ConvertWeaponType(10)
constant weapontype WEAPON_TYPE_WOOD_LIGHT_SLICE = ConvertWeaponType(11)
constant weapontype WEAPON_TYPE_WOOD_MEDIUM_SLICE = ConvertWeaponType(12)
constant weapontype WEAPON_TYPE_WOOD_HEAVY_SLICE = ConvertWeaponType(13)
constant weapontype WEAPON_TYPE_WOOD_LIGHT_BASH = ConvertWeaponType(14)
constant weapontype WEAPON_TYPE_WOOD_MEDIUM_BASH = ConvertWeaponType(15)
constant weapontype WEAPON_TYPE_WOOD_HEAVY_BASH = ConvertWeaponType(16)
constant weapontype WEAPON_TYPE_WOOD_LIGHT_STAB = ConvertWeaponType(17)
constant weapontype WEAPON_TYPE_WOOD_MEDIUM_STAB = ConvertWeaponType(18)
constant weapontype WEAPON_TYPE_CLAW_LIGHT_SLICE = ConvertWeaponType(19)
constant weapontype WEAPON_TYPE_CLAW_MEDIUM_SLICE = ConvertWeaponType(20)
constant weapontype WEAPON_TYPE_CLAW_HEAVY_SLICE = ConvertWeaponType(21)
constant weapontype WEAPON_TYPE_AXE_MEDIUM_CHOP = ConvertWeaponType(22)
constant weapontype WEAPON_TYPE_ROCK_HEAVY_BASH = ConvertWeaponType(23)
constant pathingtype PATHING_TYPE_ANY = ConvertPathingType(0)
constant pathingtype PATHING_TYPE_WALKABILITY = ConvertPathingType(1)
constant pathingtype PATHING_TYPE_FLYABILITY = ConvertPathingType(2)
constant pathingtype PATHING_TYPE_BUILDABILITY = ConvertPathingType(3)
constant pathingtype PATHING_TYPE_PEONHARVESTPATHING = ConvertPathingType(4)
constant pathingtype PATHING_TYPE_BLIGHTPATHING = ConvertPathingType(5)
constant pathingtype PATHING_TYPE_FLOATABILITY = ConvertPathingType(6)
constant pathingtype PATHING_TYPE_AMPHIBIOUSPATHING = ConvertPathingType(7)
constant mousebuttontype MOUSE_BUTTON_TYPE_LEFT = ConvertMouseButtonType(1)
constant mousebuttontype MOUSE_BUTTON_TYPE_MIDDLE = ConvertMouseButtonType(2)
constant mousebuttontype MOUSE_BUTTON_TYPE_RIGHT = ConvertMouseButtonType(3)
constant animtype ANIM_TYPE_BIRTH = ConvertAnimType(0)
constant animtype ANIM_TYPE_DEATH = ConvertAnimType(1)
constant animtype ANIM_TYPE_DECAY = ConvertAnimType(2)
constant animtype ANIM_TYPE_DISSIPATE = ConvertAnimType(3)
constant animtype ANIM_TYPE_STAND = ConvertAnimType(4)
constant animtype ANIM_TYPE_WALK = ConvertAnimType(5)
constant animtype ANIM_TYPE_ATTACK = ConvertAnimType(6)
constant animtype ANIM_TYPE_MORPH = ConvertAnimType(7)
constant animtype ANIM_TYPE_SLEEP = ConvertAnimType(8)
constant animtype ANIM_TYPE_SPELL = ConvertAnimType(9)
constant animtype ANIM_TYPE_PORTRAIT = ConvertAnimType(10)
constant subanimtype SUBANIM_TYPE_ROOTED = ConvertSubAnimType(11)
constant subanimtype SUBANIM_TYPE_ALTERNATE_EX = ConvertSubAnimType(12)
constant subanimtype SUBANIM_TYPE_LOOPING = ConvertSubAnimType(13)
constant subanimtype SUBANIM_TYPE_SLAM = ConvertSubAnimType(14)
constant subanimtype SUBANIM_TYPE_THROW = ConvertSubAnimType(15)
constant subanimtype SUBANIM_TYPE_SPIKED = ConvertSubAnimType(16)
constant subanimtype SUBANIM_TYPE_FAST = ConvertSubAnimType(17)
constant subanimtype SUBANIM_TYPE_SPIN = ConvertSubAnimType(18)
constant subanimtype SUBANIM_TYPE_READY = ConvertSubAnimType(19)
constant subanimtype SUBANIM_TYPE_CHANNEL = ConvertSubAnimType(20)
constant subanimtype SUBANIM_TYPE_DEFEND = ConvertSubAnimType(21)
constant subanimtype SUBANIM_TYPE_VICTORY = ConvertSubAnimType(22)
constant subanimtype SUBANIM_TYPE_TURN = ConvertSubAnimType(23)
constant subanimtype SUBANIM_TYPE_LEFT = ConvertSubAnimType(24)
constant subanimtype SUBANIM_TYPE_RIGHT = ConvertSubAnimType(25)
constant subanimtype SUBANIM_TYPE_FIRE = ConvertSubAnimType(26)
constant subanimtype SUBANIM_TYPE_FLESH = ConvertSubAnimType(27)
constant subanimtype SUBANIM_TYPE_HIT = ConvertSubAnimType(28)
constant subanimtype SUBANIM_TYPE_WOUNDED = ConvertSubAnimType(29)
constant subanimtype SUBANIM_TYPE_LIGHT = ConvertSubAnimType(30)
constant subanimtype SUBANIM_TYPE_MODERATE = ConvertSubAnimType(31)
constant subanimtype SUBANIM_TYPE_SEVERE = ConvertSubAnimType(32)
constant subanimtype SUBANIM_TYPE_CRITICAL = ConvertSubAnimType(33)
constant subanimtype SUBANIM_TYPE_COMPLETE = ConvertSubAnimType(34)
constant subanimtype SUBANIM_TYPE_GOLD = ConvertSubAnimType(35)
constant subanimtype SUBANIM_TYPE_LUMBER = ConvertSubAnimType(36)
constant subanimtype SUBANIM_TYPE_WORK = ConvertSubAnimType(37)
constant subanimtype SUBANIM_TYPE_TALK = ConvertSubAnimType(38)
constant subanimtype SUBANIM_TYPE_FIRST = ConvertSubAnimType(39)
constant subanimtype SUBANIM_TYPE_SECOND = ConvertSubAnimType(40)
constant subanimtype SUBANIM_TYPE_THIRD = ConvertSubAnimType(41)
constant subanimtype SUBANIM_TYPE_FOURTH = ConvertSubAnimType(42)
constant subanimtype SUBANIM_TYPE_FIFTH = ConvertSubAnimType(43)
constant subanimtype SUBANIM_TYPE_ONE = ConvertSubAnimType(44)
constant subanimtype SUBANIM_TYPE_TWO = ConvertSubAnimType(45)
constant subanimtype SUBANIM_TYPE_THREE = ConvertSubAnimType(46)
constant subanimtype SUBANIM_TYPE_FOUR = ConvertSubAnimType(47)
constant subanimtype SUBANIM_TYPE_FIVE = ConvertSubAnimType(48)
constant subanimtype SUBANIM_TYPE_SMALL = ConvertSubAnimType(49)
constant subanimtype SUBANIM_TYPE_MEDIUM = ConvertSubAnimType(50)
constant subanimtype SUBANIM_TYPE_LARGE = ConvertSubAnimType(51)
constant subanimtype SUBANIM_TYPE_UPGRADE = ConvertSubAnimType(52)
constant subanimtype SUBANIM_TYPE_DRAIN = ConvertSubAnimType(53)
constant subanimtype SUBANIM_TYPE_FILL = ConvertSubAnimType(54)
constant subanimtype SUBANIM_TYPE_CHAINLIGHTNING = ConvertSubAnimType(55)
constant subanimtype SUBANIM_TYPE_EATTREE = ConvertSubAnimType(56)
constant subanimtype SUBANIM_TYPE_PUKE = ConvertSubAnimType(57)
constant subanimtype SUBANIM_TYPE_FLAIL = ConvertSubAnimType(58)
constant subanimtype SUBANIM_TYPE_OFF = ConvertSubAnimType(59)
constant subanimtype SUBANIM_TYPE_SWIM = ConvertSubAnimType(60)
constant subanimtype SUBANIM_TYPE_ENTANGLE = ConvertSubAnimType(61)
constant subanimtype SUBANIM_TYPE_BERSERK = ConvertSubAnimType(62)
//===================================================
// Map Setup Constants
//===================================================
constant racepreference RACE_PREF_HUMAN = ConvertRacePref(1)
constant racepreference RACE_PREF_ORC = ConvertRacePref(2)
constant racepreference RACE_PREF_NIGHTELF = ConvertRacePref(4)
constant racepreference RACE_PREF_UNDEAD = ConvertRacePref(8)
constant racepreference RACE_PREF_DEMON = ConvertRacePref(16)
constant racepreference RACE_PREF_RANDOM = ConvertRacePref(32)
constant racepreference RACE_PREF_USER_SELECTABLE = ConvertRacePref(64)
constant mapcontrol MAP_CONTROL_USER = ConvertMapControl(0)
constant mapcontrol MAP_CONTROL_COMPUTER = ConvertMapControl(1)
constant mapcontrol MAP_CONTROL_RESCUABLE = ConvertMapControl(2)
constant mapcontrol MAP_CONTROL_NEUTRAL = ConvertMapControl(3)
constant mapcontrol MAP_CONTROL_CREEP = ConvertMapControl(4)
constant mapcontrol MAP_CONTROL_NONE = ConvertMapControl(5)
constant gametype GAME_TYPE_MELEE = ConvertGameType(1)
constant gametype GAME_TYPE_FFA = ConvertGameType(2)
constant gametype GAME_TYPE_USE_MAP_SETTINGS = ConvertGameType(4)
constant gametype GAME_TYPE_BLIZ = ConvertGameType(8)
constant gametype GAME_TYPE_ONE_ON_ONE = ConvertGameType(16)
constant gametype GAME_TYPE_TWO_TEAM_PLAY = ConvertGameType(32)
constant gametype GAME_TYPE_THREE_TEAM_PLAY = ConvertGameType(64)
constant gametype GAME_TYPE_FOUR_TEAM_PLAY = ConvertGameType(128)
constant mapflag MAP_FOG_HIDE_TERRAIN = ConvertMapFlag(1)
constant mapflag MAP_FOG_MAP_EXPLORED = ConvertMapFlag(2)
constant mapflag MAP_FOG_ALWAYS_VISIBLE = ConvertMapFlag(4)
constant mapflag MAP_USE_HANDICAPS = ConvertMapFlag(8)
constant mapflag MAP_OBSERVERS = ConvertMapFlag(16)
constant mapflag MAP_OBSERVERS_ON_DEATH = ConvertMapFlag(32)
constant mapflag MAP_FIXED_COLORS = ConvertMapFlag(128)
constant mapflag MAP_LOCK_RESOURCE_TRADING = ConvertMapFlag(256)
constant mapflag MAP_RESOURCE_TRADING_ALLIES_ONLY = ConvertMapFlag(512)
constant mapflag MAP_LOCK_ALLIANCE_CHANGES = ConvertMapFlag(1024)
constant mapflag MAP_ALLIANCE_CHANGES_HIDDEN = ConvertMapFlag(2048)
constant mapflag MAP_CHEATS = ConvertMapFlag(4096)
constant mapflag MAP_CHEATS_HIDDEN = ConvertMapFlag(8192)
constant mapflag MAP_LOCK_SPEED = ConvertMapFlag(8192*2)
constant mapflag MAP_LOCK_RANDOM_SEED = ConvertMapFlag(8192*4)
constant mapflag MAP_SHARED_ADVANCED_CONTROL = ConvertMapFlag(8192*8)
constant mapflag MAP_RANDOM_HERO = ConvertMapFlag(8192*16)
constant mapflag MAP_RANDOM_RACES = ConvertMapFlag(8192*32)
constant mapflag MAP_RELOADED = ConvertMapFlag(8192*64)
constant placement MAP_PLACEMENT_RANDOM = ConvertPlacement(0) // random among all slots
constant placement MAP_PLACEMENT_FIXED = ConvertPlacement(1) // player 0 in start loc 0...
constant placement MAP_PLACEMENT_USE_MAP_SETTINGS = ConvertPlacement(2) // whatever was specified by the script
constant placement MAP_PLACEMENT_TEAMS_TOGETHER = ConvertPlacement(3) // random with allies next to each other
constant startlocprio MAP_LOC_PRIO_LOW = ConvertStartLocPrio(0)
constant startlocprio MAP_LOC_PRIO_HIGH = ConvertStartLocPrio(1)
constant startlocprio MAP_LOC_PRIO_NOT = ConvertStartLocPrio(2)
constant mapdensity MAP_DENSITY_NONE = ConvertMapDensity(0)
constant mapdensity MAP_DENSITY_LIGHT = ConvertMapDensity(1)
constant mapdensity MAP_DENSITY_MEDIUM = ConvertMapDensity(2)
constant mapdensity MAP_DENSITY_HEAVY = ConvertMapDensity(3)
constant gamedifficulty MAP_DIFFICULTY_EASY = ConvertGameDifficulty(0)
constant gamedifficulty MAP_DIFFICULTY_NORMAL = ConvertGameDifficulty(1)
constant gamedifficulty MAP_DIFFICULTY_HARD = ConvertGameDifficulty(2)
constant gamedifficulty MAP_DIFFICULTY_INSANE = ConvertGameDifficulty(3)
constant gamespeed MAP_SPEED_SLOWEST = ConvertGameSpeed(0)
constant gamespeed MAP_SPEED_SLOW = ConvertGameSpeed(1)
constant gamespeed MAP_SPEED_NORMAL = ConvertGameSpeed(2)
constant gamespeed MAP_SPEED_FAST = ConvertGameSpeed(3)
constant gamespeed MAP_SPEED_FASTEST = ConvertGameSpeed(4)
constant playerslotstate PLAYER_SLOT_STATE_EMPTY = ConvertPlayerSlotState(0)
constant playerslotstate PLAYER_SLOT_STATE_PLAYING = ConvertPlayerSlotState(1)
constant playerslotstate PLAYER_SLOT_STATE_LEFT = ConvertPlayerSlotState(2)
//===================================================
// Sound Constants
//===================================================
constant volumegroup SOUND_VOLUMEGROUP_UNITMOVEMENT = ConvertVolumeGroup(0)
constant volumegroup SOUND_VOLUMEGROUP_UNITSOUNDS = ConvertVolumeGroup(1)
constant volumegroup SOUND_VOLUMEGROUP_COMBAT = ConvertVolumeGroup(2)
constant volumegroup SOUND_VOLUMEGROUP_SPELLS = ConvertVolumeGroup(3)
constant volumegroup SOUND_VOLUMEGROUP_UI = ConvertVolumeGroup(4)
constant volumegroup SOUND_VOLUMEGROUP_MUSIC = ConvertVolumeGroup(5)
constant volumegroup SOUND_VOLUMEGROUP_AMBIENTSOUNDS = ConvertVolumeGroup(6)
constant volumegroup SOUND_VOLUMEGROUP_FIRE = ConvertVolumeGroup(7)
//Cinematic Sound Constants
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_GENERAL = ConvertVolumeGroup(8)
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_AMBIENT = ConvertVolumeGroup(9)
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_MUSIC = ConvertVolumeGroup(10)
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_DIALOGUE = ConvertVolumeGroup(11)
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_SOUND_EFFECTS_1 = ConvertVolumeGroup(12)
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_SOUND_EFFECTS_2 = ConvertVolumeGroup(13)
constant volumegroup SOUND_VOLUMEGROUP_CINEMATIC_SOUND_EFFECTS_3 = ConvertVolumeGroup(14)
//===================================================
// Game, Player, and Unit States
//
// For use with TriggerRegister<X>StateEvent
//
//===================================================
constant igamestate GAME_STATE_DIVINE_INTERVENTION = ConvertIGameState(0)
constant igamestate GAME_STATE_DISCONNECTED = ConvertIGameState(1)
constant fgamestate GAME_STATE_TIME_OF_DAY = ConvertFGameState(2)
constant playerstate PLAYER_STATE_GAME_RESULT = ConvertPlayerState(0)
// current resource levels
//
constant playerstate PLAYER_STATE_RESOURCE_GOLD = ConvertPlayerState(1)
constant playerstate PLAYER_STATE_RESOURCE_LUMBER = ConvertPlayerState(2)
constant playerstate PLAYER_STATE_RESOURCE_HERO_TOKENS = ConvertPlayerState(3)
constant playerstate PLAYER_STATE_RESOURCE_FOOD_CAP = ConvertPlayerState(4)
constant playerstate PLAYER_STATE_RESOURCE_FOOD_USED = ConvertPlayerState(5)
constant playerstate PLAYER_STATE_FOOD_CAP_CEILING = ConvertPlayerState(6)
constant playerstate PLAYER_STATE_GIVES_BOUNTY = ConvertPlayerState(7)
constant playerstate PLAYER_STATE_ALLIED_VICTORY = ConvertPlayerState(8)
constant playerstate PLAYER_STATE_PLACED = ConvertPlayerState(9)
constant playerstate PLAYER_STATE_OBSERVER_ON_DEATH = ConvertPlayerState(10)
constant playerstate PLAYER_STATE_OBSERVER = ConvertPlayerState(11)
constant playerstate PLAYER_STATE_UNFOLLOWABLE = ConvertPlayerState(12)
// taxation rate for each resource
//
constant playerstate PLAYER_STATE_GOLD_UPKEEP_RATE = ConvertPlayerState(13)
constant playerstate PLAYER_STATE_LUMBER_UPKEEP_RATE = ConvertPlayerState(14)
// cumulative resources collected by the player during the mission
//
constant playerstate PLAYER_STATE_GOLD_GATHERED = ConvertPlayerState(15)
constant playerstate PLAYER_STATE_LUMBER_GATHERED = ConvertPlayerState(16)
constant playerstate PLAYER_STATE_NO_CREEP_SLEEP = ConvertPlayerState(25)
constant unitstate UNIT_STATE_LIFE = ConvertUnitState(0)
constant unitstate UNIT_STATE_MAX_LIFE = ConvertUnitState(1)
constant unitstate UNIT_STATE_MANA = ConvertUnitState(2)
constant unitstate UNIT_STATE_MAX_MANA = ConvertUnitState(3)
constant aidifficulty AI_DIFFICULTY_NEWBIE = ConvertAIDifficulty(0)
constant aidifficulty AI_DIFFICULTY_NORMAL = ConvertAIDifficulty(1)
constant aidifficulty AI_DIFFICULTY_INSANE = ConvertAIDifficulty(2)
// player score values
constant playerscore PLAYER_SCORE_UNITS_TRAINED = ConvertPlayerScore(0)
constant playerscore PLAYER_SCORE_UNITS_KILLED = ConvertPlayerScore(1)
constant playerscore PLAYER_SCORE_STRUCT_BUILT = ConvertPlayerScore(2)
constant playerscore PLAYER_SCORE_STRUCT_RAZED = ConvertPlayerScore(3)
constant playerscore PLAYER_SCORE_TECH_PERCENT = ConvertPlayerScore(4)
constant playerscore PLAYER_SCORE_FOOD_MAXPROD = ConvertPlayerScore(5)
constant playerscore PLAYER_SCORE_FOOD_MAXUSED = ConvertPlayerScore(6)
constant playerscore PLAYER_SCORE_HEROES_KILLED = ConvertPlayerScore(7)
constant playerscore PLAYER_SCORE_ITEMS_GAINED = ConvertPlayerScore(8)
constant playerscore PLAYER_SCORE_MERCS_HIRED = ConvertPlayerScore(9)
constant playerscore PLAYER_SCORE_GOLD_MINED_TOTAL = ConvertPlayerScore(10)
constant playerscore PLAYER_SCORE_GOLD_MINED_UPKEEP = ConvertPlayerScore(11)
constant playerscore PLAYER_SCORE_GOLD_LOST_UPKEEP = ConvertPlayerScore(12)
constant playerscore PLAYER_SCORE_GOLD_LOST_TAX = ConvertPlayerScore(13)
constant playerscore PLAYER_SCORE_GOLD_GIVEN = ConvertPlayerScore(14)
constant playerscore PLAYER_SCORE_GOLD_RECEIVED = ConvertPlayerScore(15)
constant playerscore PLAYER_SCORE_LUMBER_TOTAL = ConvertPlayerScore(16)
constant playerscore PLAYER_SCORE_LUMBER_LOST_UPKEEP = ConvertPlayerScore(17)
constant playerscore PLAYER_SCORE_LUMBER_LOST_TAX = ConvertPlayerScore(18)
constant playerscore PLAYER_SCORE_LUMBER_GIVEN = ConvertPlayerScore(19)
constant playerscore PLAYER_SCORE_LUMBER_RECEIVED = ConvertPlayerScore(20)
constant playerscore PLAYER_SCORE_UNIT_TOTAL = ConvertPlayerScore(21)
constant playerscore PLAYER_SCORE_HERO_TOTAL = ConvertPlayerScore(22)
constant playerscore PLAYER_SCORE_RESOURCE_TOTAL = ConvertPlayerScore(23)
constant playerscore PLAYER_SCORE_TOTAL = ConvertPlayerScore(24)
//===================================================
// Game, Player and Unit Events
//
// When an event causes a trigger to fire these
// values allow the action code to determine which
// event was dispatched and therefore which set of
// native functions should be used to get information
// about the event.
//
// Do NOT change the order or value of these constants
// without insuring that the JASS_GAME_EVENTS_WAR3 enum
// is changed to match.
//
//===================================================
//===================================================
// For use with TriggerRegisterGameEvent
//===================================================
constant gameevent EVENT_GAME_VICTORY = ConvertGameEvent(0)
constant gameevent EVENT_GAME_END_LEVEL = ConvertGameEvent(1)
constant gameevent EVENT_GAME_VARIABLE_LIMIT = ConvertGameEvent(2)
constant gameevent EVENT_GAME_STATE_LIMIT = ConvertGameEvent(3)
constant gameevent EVENT_GAME_TIMER_EXPIRED = ConvertGameEvent(4)
constant gameevent EVENT_GAME_ENTER_REGION = ConvertGameEvent(5)
constant gameevent EVENT_GAME_LEAVE_REGION = ConvertGameEvent(6)
constant gameevent EVENT_GAME_TRACKABLE_HIT = ConvertGameEvent(7)
constant gameevent EVENT_GAME_TRACKABLE_TRACK = ConvertGameEvent(8)
constant gameevent EVENT_GAME_SHOW_SKILL = ConvertGameEvent(9)
constant gameevent EVENT_GAME_BUILD_SUBMENU = ConvertGameEvent(10)
//===================================================
// For use with TriggerRegisterPlayerEvent
//===================================================
constant playerevent EVENT_PLAYER_STATE_LIMIT = ConvertPlayerEvent(11)
constant playerevent EVENT_PLAYER_ALLIANCE_CHANGED = ConvertPlayerEvent(12)
constant playerevent EVENT_PLAYER_DEFEAT = ConvertPlayerEvent(13)
constant playerevent EVENT_PLAYER_VICTORY = ConvertPlayerEvent(14)
constant playerevent EVENT_PLAYER_LEAVE = ConvertPlayerEvent(15)
constant playerevent EVENT_PLAYER_CHAT = ConvertPlayerEvent(16)
constant playerevent EVENT_PLAYER_END_CINEMATIC = ConvertPlayerEvent(17)
//===================================================
// For use with TriggerRegisterPlayerUnitEvent
//===================================================
constant playerunitevent EVENT_PLAYER_UNIT_ATTACKED = ConvertPlayerUnitEvent(18)
constant playerunitevent EVENT_PLAYER_UNIT_RESCUED = ConvertPlayerUnitEvent(19)
constant playerunitevent EVENT_PLAYER_UNIT_DEATH = ConvertPlayerUnitEvent(20)
constant playerunitevent EVENT_PLAYER_UNIT_DECAY = ConvertPlayerUnitEvent(21)
constant playerunitevent EVENT_PLAYER_UNIT_DETECTED = ConvertPlayerUnitEvent(22)
constant playerunitevent EVENT_PLAYER_UNIT_HIDDEN = ConvertPlayerUnitEvent(23)
constant playerunitevent EVENT_PLAYER_UNIT_SELECTED = ConvertPlayerUnitEvent(24)
constant playerunitevent EVENT_PLAYER_UNIT_DESELECTED = ConvertPlayerUnitEvent(25)
constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_START = ConvertPlayerUnitEvent(26)
constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL = ConvertPlayerUnitEvent(27)
constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_FINISH = ConvertPlayerUnitEvent(28)
constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_START = ConvertPlayerUnitEvent(29)
constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_CANCEL = ConvertPlayerUnitEvent(30)
constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_FINISH = ConvertPlayerUnitEvent(31)
constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_START = ConvertPlayerUnitEvent(32)
constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_CANCEL = ConvertPlayerUnitEvent(33)
constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_FINISH = ConvertPlayerUnitEvent(34)
constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_START = ConvertPlayerUnitEvent(35)
constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_CANCEL = ConvertPlayerUnitEvent(36)
constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_FINISH = ConvertPlayerUnitEvent(37)
constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER = ConvertPlayerUnitEvent(38)
constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER = ConvertPlayerUnitEvent(39)
constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER = ConvertPlayerUnitEvent(40)
constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER = ConvertPlayerUnitEvent(40) // for compat
constant playerunitevent EVENT_PLAYER_HERO_LEVEL = ConvertPlayerUnitEvent(41)
constant playerunitevent EVENT_PLAYER_HERO_SKILL = ConvertPlayerUnitEvent(42)
constant playerunitevent EVENT_PLAYER_HERO_REVIVABLE = ConvertPlayerUnitEvent(43)
constant playerunitevent EVENT_PLAYER_HERO_REVIVE_START = ConvertPlayerUnitEvent(44)
constant playerunitevent EVENT_PLAYER_HERO_REVIVE_CANCEL = ConvertPlayerUnitEvent(45)
constant playerunitevent EVENT_PLAYER_HERO_REVIVE_FINISH = ConvertPlayerUnitEvent(46)
constant playerunitevent EVENT_PLAYER_UNIT_SUMMON = ConvertPlayerUnitEvent(47)
constant playerunitevent EVENT_PLAYER_UNIT_DROP_ITEM = ConvertPlayerUnitEvent(48)
constant playerunitevent EVENT_PLAYER_UNIT_PICKUP_ITEM = ConvertPlayerUnitEvent(49)
constant playerunitevent EVENT_PLAYER_UNIT_USE_ITEM = ConvertPlayerUnitEvent(50)
constant playerunitevent EVENT_PLAYER_UNIT_LOADED = ConvertPlayerUnitEvent(51)
constant playerunitevent EVENT_PLAYER_UNIT_DAMAGED = ConvertPlayerUnitEvent(308)
constant playerunitevent EVENT_PLAYER_UNIT_DAMAGING = ConvertPlayerUnitEvent(315)
//===================================================
// For use with TriggerRegisterUnitEvent
//===================================================
constant unitevent EVENT_UNIT_DAMAGED = ConvertUnitEvent(52)
constant unitevent EVENT_UNIT_DAMAGING = ConvertUnitEvent(314)
constant unitevent EVENT_UNIT_DEATH = ConvertUnitEvent(53)
constant unitevent EVENT_UNIT_DECAY = ConvertUnitEvent(54)
constant unitevent EVENT_UNIT_DETECTED = ConvertUnitEvent(55)
constant unitevent EVENT_UNIT_HIDDEN = ConvertUnitEvent(56)
constant unitevent EVENT_UNIT_SELECTED = ConvertUnitEvent(57)
constant unitevent EVENT_UNIT_DESELECTED = ConvertUnitEvent(58)
constant unitevent EVENT_UNIT_STATE_LIMIT = ConvertUnitEvent(59)
// Events which may have a filter for the "other unit"
//
constant unitevent EVENT_UNIT_ACQUIRED_TARGET = ConvertUnitEvent(60)
constant unitevent EVENT_UNIT_TARGET_IN_RANGE = ConvertUnitEvent(61)
constant unitevent EVENT_UNIT_ATTACKED = ConvertUnitEvent(62)
constant unitevent EVENT_UNIT_RESCUED = ConvertUnitEvent(63)
constant unitevent EVENT_UNIT_CONSTRUCT_CANCEL = ConvertUnitEvent(64)
constant unitevent EVENT_UNIT_CONSTRUCT_FINISH = ConvertUnitEvent(65)
constant unitevent EVENT_UNIT_UPGRADE_START = ConvertUnitEvent(66)
constant unitevent EVENT_UNIT_UPGRADE_CANCEL = ConvertUnitEvent(67)
constant unitevent EVENT_UNIT_UPGRADE_FINISH = ConvertUnitEvent(68)
// Events which involve the specified unit performing
// training of other units
//
constant unitevent EVENT_UNIT_TRAIN_START = ConvertUnitEvent(69)
constant unitevent EVENT_UNIT_TRAIN_CANCEL = ConvertUnitEvent(70)
constant unitevent EVENT_UNIT_TRAIN_FINISH = ConvertUnitEvent(71)
constant unitevent EVENT_UNIT_RESEARCH_START = ConvertUnitEvent(72)
constant unitevent EVENT_UNIT_RESEARCH_CANCEL = ConvertUnitEvent(73)
constant unitevent EVENT_UNIT_RESEARCH_FINISH = ConvertUnitEvent(74)
constant unitevent EVENT_UNIT_ISSUED_ORDER = ConvertUnitEvent(75)
constant unitevent EVENT_UNIT_ISSUED_POINT_ORDER = ConvertUnitEvent(76)
constant unitevent EVENT_UNIT_ISSUED_TARGET_ORDER = ConvertUnitEvent(77)
constant unitevent EVENT_UNIT_HERO_LEVEL = ConvertUnitEvent(78)
constant unitevent EVENT_UNIT_HERO_SKILL = ConvertUnitEvent(79)
constant unitevent EVENT_UNIT_HERO_REVIVABLE = ConvertUnitEvent(80)
constant unitevent EVENT_UNIT_HERO_REVIVE_START = ConvertUnitEvent(81)
constant unitevent EVENT_UNIT_HERO_REVIVE_CANCEL = ConvertUnitEvent(82)
constant unitevent EVENT_UNIT_HERO_REVIVE_FINISH = ConvertUnitEvent(83)
constant unitevent EVENT_UNIT_SUMMON = ConvertUnitEvent(84)
constant unitevent EVENT_UNIT_DROP_ITEM = ConvertUnitEvent(85)
constant unitevent EVENT_UNIT_PICKUP_ITEM = ConvertUnitEvent(86)
constant unitevent EVENT_UNIT_USE_ITEM = ConvertUnitEvent(87)
constant unitevent EVENT_UNIT_LOADED = ConvertUnitEvent(88)
constant widgetevent EVENT_WIDGET_DEATH = ConvertWidgetEvent(89)
constant dialogevent EVENT_DIALOG_BUTTON_CLICK = ConvertDialogEvent(90)
constant dialogevent EVENT_DIALOG_CLICK = ConvertDialogEvent(91)
//===================================================
// Frozen Throne Expansion Events
// Need to be added here to preserve compat
//===================================================
//===================================================
// For use with TriggerRegisterGameEvent
//===================================================
constant gameevent EVENT_GAME_LOADED = ConvertGameEvent(256)
constant gameevent EVENT_GAME_TOURNAMENT_FINISH_SOON = ConvertGameEvent(257)
constant gameevent EVENT_GAME_TOURNAMENT_FINISH_NOW = ConvertGameEvent(258)
constant gameevent EVENT_GAME_SAVE = ConvertGameEvent(259)
constant gameevent EVENT_GAME_CUSTOM_UI_FRAME = ConvertGameEvent(310)
//===================================================
// For use with TriggerRegisterPlayerEvent
//===================================================
constant playerevent EVENT_PLAYER_ARROW_LEFT_DOWN = ConvertPlayerEvent(261)
constant playerevent EVENT_PLAYER_ARROW_LEFT_UP = ConvertPlayerEvent(262)
constant playerevent EVENT_PLAYER_ARROW_RIGHT_DOWN = ConvertPlayerEvent(263)
constant playerevent EVENT_PLAYER_ARROW_RIGHT_UP = ConvertPlayerEvent(264)
constant playerevent EVENT_PLAYER_ARROW_DOWN_DOWN = ConvertPlayerEvent(265)
constant playerevent EVENT_PLAYER_ARROW_DOWN_UP = ConvertPlayerEvent(266)
constant playerevent EVENT_PLAYER_ARROW_UP_DOWN = ConvertPlayerEvent(267)
constant playerevent EVENT_PLAYER_ARROW_UP_UP = ConvertPlayerEvent(268)
constant playerevent EVENT_PLAYER_MOUSE_DOWN = ConvertPlayerEvent(305)
constant playerevent EVENT_PLAYER_MOUSE_UP = ConvertPlayerEvent(306)
constant playerevent EVENT_PLAYER_MOUSE_MOVE = ConvertPlayerEvent(307)
constant playerevent EVENT_PLAYER_SYNC_DATA = ConvertPlayerEvent(309)
constant playerevent EVENT_PLAYER_KEY = ConvertPlayerEvent(311)
constant playerevent EVENT_PLAYER_KEY_DOWN = ConvertPlayerEvent(312)
constant playerevent EVENT_PLAYER_KEY_UP = ConvertPlayerEvent(313)
//===================================================
// For use with TriggerRegisterPlayerUnitEvent
//===================================================
constant playerunitevent EVENT_PLAYER_UNIT_SELL = ConvertPlayerUnitEvent(269)
constant playerunitevent EVENT_PLAYER_UNIT_CHANGE_OWNER = ConvertPlayerUnitEvent(270)
constant playerunitevent EVENT_PLAYER_UNIT_SELL_ITEM = ConvertPlayerUnitEvent(271)
constant playerunitevent EVENT_PLAYER_UNIT_SPELL_CHANNEL = ConvertPlayerUnitEvent(272)
constant playerunitevent EVENT_PLAYER_UNIT_SPELL_CAST = ConvertPlayerUnitEvent(273)
constant playerunitevent EVENT_PLAYER_UNIT_SPELL_EFFECT = ConvertPlayerUnitEvent(274)
constant playerunitevent EVENT_PLAYER_UNIT_SPELL_FINISH = ConvertPlayerUnitEvent(275)
constant playerunitevent EVENT_PLAYER_UNIT_SPELL_ENDCAST = ConvertPlayerUnitEvent(276)
constant playerunitevent EVENT_PLAYER_UNIT_PAWN_ITEM = ConvertPlayerUnitEvent(277)
constant playerunitevent EVENT_PLAYER_UNIT_STACK_ITEM = ConvertPlayerUnitEvent(319)
//===================================================
// For use with TriggerRegisterUnitEvent
//===================================================
constant unitevent EVENT_UNIT_SELL = ConvertUnitEvent(286)
constant unitevent EVENT_UNIT_CHANGE_OWNER = ConvertUnitEvent(287)
constant unitevent EVENT_UNIT_SELL_ITEM = ConvertUnitEvent(288)
constant unitevent EVENT_UNIT_SPELL_CHANNEL = ConvertUnitEvent(289)
constant unitevent EVENT_UNIT_SPELL_CAST = ConvertUnitEvent(290)
constant unitevent EVENT_UNIT_SPELL_EFFECT = ConvertUnitEvent(291)
constant unitevent EVENT_UNIT_SPELL_FINISH = ConvertUnitEvent(292)
constant unitevent EVENT_UNIT_SPELL_ENDCAST = ConvertUnitEvent(293)
constant unitevent EVENT_UNIT_PAWN_ITEM = ConvertUnitEvent(294)
constant unitevent EVENT_UNIT_STACK_ITEM = ConvertUnitEvent(318)
//===================================================
// Limit Event API constants
// variable, player state, game state, and unit state events
// ( do NOT change the order of these... )
//===================================================
constant limitop LESS_THAN = ConvertLimitOp(0)
constant limitop LESS_THAN_OR_EQUAL = ConvertLimitOp(1)
constant limitop EQUAL = ConvertLimitOp(2)
constant limitop GREATER_THAN_OR_EQUAL = ConvertLimitOp(3)
constant limitop GREATER_THAN = ConvertLimitOp(4)
constant limitop NOT_EQUAL = ConvertLimitOp(5)
//===================================================
// Unit Type Constants for use with IsUnitType()
//===================================================
constant unittype UNIT_TYPE_HERO = ConvertUnitType(0)
constant unittype UNIT_TYPE_DEAD = ConvertUnitType(1)
constant unittype UNIT_TYPE_STRUCTURE = ConvertUnitType(2)
constant unittype UNIT_TYPE_FLYING = ConvertUnitType(3)
constant unittype UNIT_TYPE_GROUND = ConvertUnitType(4)
constant unittype UNIT_TYPE_ATTACKS_FLYING = ConvertUnitType(5)
constant unittype UNIT_TYPE_ATTACKS_GROUND = ConvertUnitType(6)
constant unittype UNIT_TYPE_MELEE_ATTACKER = ConvertUnitType(7)
constant unittype UNIT_TYPE_RANGED_ATTACKER = ConvertUnitType(8)
constant unittype UNIT_TYPE_GIANT = ConvertUnitType(9)
constant unittype UNIT_TYPE_SUMMONED = ConvertUnitType(10)
constant unittype UNIT_TYPE_STUNNED = ConvertUnitType(11)
constant unittype UNIT_TYPE_PLAGUED = ConvertUnitType(12)
constant unittype UNIT_TYPE_SNARED = ConvertUnitType(13)
constant unittype UNIT_TYPE_UNDEAD = ConvertUnitType(14)
constant unittype UNIT_TYPE_MECHANICAL = ConvertUnitType(15)
constant unittype UNIT_TYPE_PEON = ConvertUnitType(16)
constant unittype UNIT_TYPE_SAPPER = ConvertUnitType(17)
constant unittype UNIT_TYPE_TOWNHALL = ConvertUnitType(18)
constant unittype UNIT_TYPE_ANCIENT = ConvertUnitType(19)
constant unittype UNIT_TYPE_TAUREN = ConvertUnitType(20)
constant unittype UNIT_TYPE_POISONED = ConvertUnitType(21)
constant unittype UNIT_TYPE_POLYMORPHED = ConvertUnitType(22)
constant unittype UNIT_TYPE_SLEEPING = ConvertUnitType(23)
constant unittype UNIT_TYPE_RESISTANT = ConvertUnitType(24)
constant unittype UNIT_TYPE_ETHEREAL = ConvertUnitType(25)
constant unittype UNIT_TYPE_MAGIC_IMMUNE = ConvertUnitType(26)
//===================================================
// Unit Type Constants for use with ChooseRandomItemEx()
//===================================================
constant itemtype ITEM_TYPE_PERMANENT = ConvertItemType(0)
constant itemtype ITEM_TYPE_CHARGED = ConvertItemType(1)
constant itemtype ITEM_TYPE_POWERUP = ConvertItemType(2)
constant itemtype ITEM_TYPE_ARTIFACT = ConvertItemType(3)
constant itemtype ITEM_TYPE_PURCHASABLE = ConvertItemType(4)
constant itemtype ITEM_TYPE_CAMPAIGN = ConvertItemType(5)
constant itemtype ITEM_TYPE_MISCELLANEOUS = ConvertItemType(6)
constant itemtype ITEM_TYPE_UNKNOWN = ConvertItemType(7)
constant itemtype ITEM_TYPE_ANY = ConvertItemType(8)
// Deprecated, should use ITEM_TYPE_POWERUP
constant itemtype ITEM_TYPE_TOME = ConvertItemType(2)
//===================================================
// Animatable Camera Fields
//===================================================
constant camerafield CAMERA_FIELD_TARGET_DISTANCE = ConvertCameraField(0)
constant camerafield CAMERA_FIELD_FARZ = ConvertCameraField(1)
constant camerafield CAMERA_FIELD_ANGLE_OF_ATTACK = ConvertCameraField(2)
constant camerafield CAMERA_FIELD_FIELD_OF_VIEW = ConvertCameraField(3)
constant camerafield CAMERA_FIELD_ROLL = ConvertCameraField(4)
constant camerafield CAMERA_FIELD_ROTATION = ConvertCameraField(5)
constant camerafield CAMERA_FIELD_ZOFFSET = ConvertCameraField(6)
constant camerafield CAMERA_FIELD_NEARZ = ConvertCameraField(7)
constant camerafield CAMERA_FIELD_LOCAL_PITCH = ConvertCameraField(8)
constant camerafield CAMERA_FIELD_LOCAL_YAW = ConvertCameraField(9)
constant camerafield CAMERA_FIELD_LOCAL_ROLL = ConvertCameraField(10)
constant blendmode BLEND_MODE_NONE = ConvertBlendMode(0)
constant blendmode BLEND_MODE_DONT_CARE = ConvertBlendMode(0)
constant blendmode BLEND_MODE_KEYALPHA = ConvertBlendMode(1)
constant blendmode BLEND_MODE_BLEND = ConvertBlendMode(2)
constant blendmode BLEND_MODE_ADDITIVE = ConvertBlendMode(3)
constant blendmode BLEND_MODE_MODULATE = ConvertBlendMode(4)
constant blendmode BLEND_MODE_MODULATE_2X = ConvertBlendMode(5)
constant raritycontrol RARITY_FREQUENT = ConvertRarityControl(0)
constant raritycontrol RARITY_RARE = ConvertRarityControl(1)
constant texmapflags TEXMAP_FLAG_NONE = ConvertTexMapFlags(0)
constant texmapflags TEXMAP_FLAG_WRAP_U = ConvertTexMapFlags(1)
constant texmapflags TEXMAP_FLAG_WRAP_V = ConvertTexMapFlags(2)
constant texmapflags TEXMAP_FLAG_WRAP_UV = ConvertTexMapFlags(3)
constant fogstate FOG_OF_WAR_MASKED = ConvertFogState(1)
constant fogstate FOG_OF_WAR_FOGGED = ConvertFogState(2)
constant fogstate FOG_OF_WAR_VISIBLE = ConvertFogState(4)
//===================================================
// Camera Margin constants for use with GetCameraMargin
//===================================================
constant integer CAMERA_MARGIN_LEFT = 0
constant integer CAMERA_MARGIN_RIGHT = 1
constant integer CAMERA_MARGIN_TOP = 2
constant integer CAMERA_MARGIN_BOTTOM = 3
//===================================================
// Effect API constants
//===================================================
constant effecttype EFFECT_TYPE_EFFECT = ConvertEffectType(0)
constant effecttype EFFECT_TYPE_TARGET = ConvertEffectType(1)
constant effecttype EFFECT_TYPE_CASTER = ConvertEffectType(2)
constant effecttype EFFECT_TYPE_SPECIAL = ConvertEffectType(3)
constant effecttype EFFECT_TYPE_AREA_EFFECT = ConvertEffectType(4)
constant effecttype EFFECT_TYPE_MISSILE = ConvertEffectType(5)
constant effecttype EFFECT_TYPE_LIGHTNING = ConvertEffectType(6)
constant soundtype SOUND_TYPE_EFFECT = ConvertSoundType(0)
constant soundtype SOUND_TYPE_EFFECT_LOOPED = ConvertSoundType(1)
//===================================================
// Custom UI API constants
//===================================================
constant originframetype ORIGIN_FRAME_GAME_UI = ConvertOriginFrameType(0)
constant originframetype ORIGIN_FRAME_COMMAND_BUTTON = ConvertOriginFrameType(1)
constant originframetype ORIGIN_FRAME_HERO_BAR = ConvertOriginFrameType(2)
constant originframetype ORIGIN_FRAME_HERO_BUTTON = ConvertOriginFrameType(3)
constant originframetype ORIGIN_FRAME_HERO_HP_BAR = ConvertOriginFrameType(4)
constant originframetype ORIGIN_FRAME_HERO_MANA_BAR = ConvertOriginFrameType(5)
constant originframetype ORIGIN_FRAME_HERO_BUTTON_INDICATOR = ConvertOriginFrameType(6)
constant originframetype ORIGIN_FRAME_ITEM_BUTTON = ConvertOriginFrameType(7)
constant originframetype ORIGIN_FRAME_MINIMAP = ConvertOriginFrameType(8)
constant originframetype ORIGIN_FRAME_MINIMAP_BUTTON = ConvertOriginFrameType(9)
constant originframetype ORIGIN_FRAME_SYSTEM_BUTTON = ConvertOriginFrameType(10)
constant originframetype ORIGIN_FRAME_TOOLTIP = ConvertOriginFrameType(11)