forked from maikel233/xhook_wowclassic_TBC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSharedDefines.h
2620 lines (2468 loc) · 86.1 KB
/
SharedDefines.h
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
#pragma once
#include<cassert>
#include<stdint.h>
#include<vector>
#include<map>
#include<memory>
typedef int64_t int64;
typedef int32_t int32;
typedef int16_t int16;
typedef int8_t int8;
typedef uint64_t uint64;
typedef uint32_t uint32;
typedef uint16_t uint16;
typedef uint8_t uint8;
enum Gender
{
GENDER_MALE = 0,
GENDER_FEMALE = 1,
GENDER_NONE = 2
};
#define MAX_GENDER 3
// Race value is index in ChrRaces.dbc
enum Races
{
RACE_HUMAN = 1,
RACE_ORC = 2,
RACE_DWARF = 3,
RACE_NIGHTELF = 4,
RACE_UNDEAD = 5,
RACE_TAUREN = 6,
RACE_GNOME = 7,
RACE_TROLL = 8,
RACE_GOBLIN = 9,
};
// max+1 for player race
#define MAX_RACES 9
#define RACEMASK_ALL_PLAYABLE \
((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | \
(1<<(RACE_NIGHTELF-1)) |(1<<(RACE_UNDEAD-1)) |(1<<(RACE_TAUREN-1)) | \
(1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)))
// for most cases batter use ChrRace data for team check as more safe, but when need full mask of team can be use this defines.
#define RACEMASK_ALLIANCE \
((1<<(RACE_HUMAN-1)) |(1<<(RACE_DWARF-1)) |(1<<(RACE_NIGHTELF-1))| \
(1<<(RACE_GNOME-1)))
#define RACEMASK_HORDE \
((1<<(RACE_ORC-1)) |(1<<(RACE_UNDEAD-1)) |(1<<(RACE_TAUREN-1)) | \
(1<<(RACE_TROLL-1)))
// Class value is index in ChrClasses.dbc
enum Classes
{
CLASS_WARRIOR = 1,
CLASS_PALADIN = 2,
CLASS_HUNTER = 3,
CLASS_ROGUE = 4,
CLASS_PRIEST = 5,
// CLASS_DEATH_KNIGHT = 6, // not listed in DBC, will be in 3.0
CLASS_SHAMAN = 7,
CLASS_MAGE = 8,
CLASS_WARLOCK = 9,
// CLASS_UNK2 = 10,unused
CLASS_DRUID = 11,
};
// max+1 for player class
#define MAX_CLASSES 12
#define CLASSMASK_ALL_PLAYABLE \
((1<<(CLASS_WARRIOR-1))|(1<<(CLASS_PALADIN-1))|(1<<(CLASS_HUNTER-1))| \
(1<<(CLASS_ROGUE-1)) |(1<<(CLASS_PRIEST-1)) |(1<<(CLASS_SHAMAN-1))| \
(1<<(CLASS_MAGE-1)) |(1<<(CLASS_WARLOCK-1))|(1<<(CLASS_DRUID-1)) )
#define CLASSMASK_ALL_CREATURES ((1<<(CLASS_WARRIOR-1)) | (1<<(CLASS_PALADIN-1)) | (1<<(CLASS_MAGE-1)) )
#define MAX_CREATURE_CLASS 3
// array index could be used to store class data only Warrior, Paladin and Mage are indexed for creature
// W P M
static const uint8 classToIndex[MAX_CLASSES] = { 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0 };
#define CLASSMASK_WAND_USERS ((1<<(CLASS_PRIEST-1))|(1<<(CLASS_MAGE-1))|(1<<(CLASS_WARLOCK-1)))
#define PLAYER_MAX_BATTLEGROUND_QUEUES 3
#define HONOR_STANDING_MIN_KILL 15
enum ReputationRank
{
REP_HATED = 0,
REP_HOSTILE = 1,
REP_UNFRIENDLY = 2,
REP_NEUTRAL = 3,
REP_FRIENDLY = 4,
REP_HONORED = 5,
REP_REVERED = 6,
REP_EXALTED = 7
};
#define MIN_REPUTATION_RANK (REP_HATED)
#define MAX_REPUTATION_RANK 8
#define MAX_SPILLOVER_FACTIONS 4
enum MoneyConstants
{
COPPER = 1,
SILVER = COPPER * 100,
GOLD = SILVER * 100
};
enum Stats
{
STAT_STRENGTH = 0,
STAT_AGILITY = 1,
STAT_STAMINA = 2,
STAT_INTELLECT = 3,
STAT_SPIRIT = 4
};
#define MAX_STATS 5
/**
* These are the different possible powers that are available to us, they should
* be fairly familiar if you've played WoW.
*/
enum Powers
{
POWER_MANA = 0, ///< The most common one, mobs usually have this or rage
POWER_RAGE = 1, ///< This is what warriors use to cast their spells
POWER_FOCUS = 2, ///< Used by hunters after Cataclysm (4.x)
POWER_ENERGY = 3, ///< Used by rouges to do their spells
POWER_HAPPINESS = 4, ///< Hunters pet's happiness affect their damage
MAX_POWERS = 5,
POWER_ALL = 127, // default for class? - need check for TBC
POWER_HEALTH = 0xFFFFFFFE ///< Health, everyone has this (-2 as signed value)
};
#define MAX_POWERS 5
/**
* The different spell schools that are available, used in both damage calculation
* and spell casting to decide what should be affected, the \ref SpellSchools::SPELL_SCHOOL_NORMAL
* is the armor, others should be self explanatory.
*
* Note that these are the values to use for changing ie, the armor via a
* \ref Modifier, and it is the \ref Modifier::m_miscValue that should be set.
*/
enum SpellSchools
{
/// Physical, Armor
SPELL_SCHOOL_NORMAL = 0,
SPELL_SCHOOL_HOLY = 1,
SPELL_SCHOOL_FIRE = 2,
SPELL_SCHOOL_NATURE = 3,
SPELL_SCHOOL_FROST = 4,
SPELL_SCHOOL_SHADOW = 5,
SPELL_SCHOOL_ARCANE = 6
};
#define MAX_SPELL_SCHOOL 7
/**
* A bitmask of the available SpellSchools. Used for convenience
*/
enum SpellSchoolMask
{
/// not exist
SPELL_SCHOOL_MASK_NONE = 0x00,
/// PHYSICAL (Armor)
SPELL_SCHOOL_MASK_NORMAL = (1 << SPELL_SCHOOL_NORMAL),
SPELL_SCHOOL_MASK_HOLY = (1 << SPELL_SCHOOL_HOLY),
SPELL_SCHOOL_MASK_FIRE = (1 << SPELL_SCHOOL_FIRE),
SPELL_SCHOOL_MASK_NATURE = (1 << SPELL_SCHOOL_NATURE),
SPELL_SCHOOL_MASK_FROST = (1 << SPELL_SCHOOL_FROST),
SPELL_SCHOOL_MASK_SHADOW = (1 << SPELL_SCHOOL_SHADOW),
SPELL_SCHOOL_MASK_ARCANE = (1 << SPELL_SCHOOL_ARCANE),
// unions
/// 124, not include normal and holy damage
SPELL_SCHOOL_MASK_SPELL = (SPELL_SCHOOL_MASK_FIRE |
SPELL_SCHOOL_MASK_NATURE | SPELL_SCHOOL_MASK_FROST |
SPELL_SCHOOL_MASK_SHADOW | SPELL_SCHOOL_MASK_ARCANE),
/// 126
SPELL_SCHOOL_MASK_MAGIC = (SPELL_SCHOOL_MASK_HOLY | SPELL_SCHOOL_MASK_SPELL),
/// 127
SPELL_SCHOOL_MASK_ALL = (SPELL_SCHOOL_MASK_NORMAL | SPELL_SCHOOL_MASK_MAGIC)
};
#define SPELL_SCHOOL_MASK_MAGIC \
( SPELL_SCHOOL_MASK_HOLY | SPELL_SCHOOL_MASK_FIRE | SPELL_SCHOOL_MASK_NATURE | \
SPELL_SCHOOL_MASK_FROST | SPELL_SCHOOL_MASK_SHADOW | \
SPELL_SCHOOL_MASK_ARCANE )
/**
* Converts a \ref SpellSchools value into a bitmask representation since this is missing
* in the 1.12 dbc files.
* @param school The school that should be converted to a bitmask, see \ref SpellSchools
* @return A bitmask representation of the given \ref SpellSchools
* \see SpellSchools
*/
inline SpellSchoolMask GetSchoolMask(uint32 school)
{
return SpellSchoolMask(1 << school);
}
/**
* Turns a \ref SpellSchoolMask into a \ref SpellSchools from the first bit
* that is set in the mask.
* @param mask the mask you want to get the first school for
* @return a \ref SpellSchools of the first bit that was set, if none were found
* \ref SpellSchools::SPELL_SCHOOL_NORMAL is returned
*/
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
{
for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
if (mask & (1 << i))
{
return SpellSchools(i);
}
return SPELL_SCHOOL_NORMAL;
}
enum ItemQualities
{
ITEM_QUALITY_POOR = 0, // GREY
ITEM_QUALITY_NORMAL = 1, // WHITE
ITEM_QUALITY_UNCOMMON = 2, // GREEN
ITEM_QUALITY_RARE = 3, // BLUE
ITEM_QUALITY_EPIC = 4, // PURPLE
ITEM_QUALITY_LEGENDARY = 5, // ORANGE
ITEM_QUALITY_ARTIFACT = 6 // LIGHT YELLOW
};
#define MAX_ITEM_QUALITY 7
const uint32 ItemQualityColors[MAX_ITEM_QUALITY] =
{
0xff9d9d9d, // GREY
0xffffffff, // WHITE
0xff1eff00, // GREEN
0xff0070dd, // BLUE
0xffa335ee, // PURPLE
0xffff8000, // ORANGE
0xffe6cc80 // LIGHT YELLOW
};
// ***********************************
// Spell Attributes definitions
// ***********************************
enum SpellAttributes
{
SPELL_ATTR_UNK0 = 0x00000001, // 0
SPELL_ATTR_RANGED = 0x00000002, // 1 All ranged abilites have this flag
SPELL_ATTR_ON_NEXT_SWING_1 = 0x00000004, // 2 on next swing
SPELL_ATTR_UNK3 = 0x00000008, // 3 not set in 2.4.2
SPELL_ATTR_UNK4 = 0x00000010, // 4 isAbility
SPELL_ATTR_TRADESPELL = 0x00000020, // 5 trade spells, will be added by client to a sublist of profession spell
SPELL_ATTR_PASSIVE = 0x00000040, // 6 Passive spell
SPELL_ATTR_HIDE_SPELL = 0x00000080, // 7 Shows no spell icon
SPELL_ATTR_UNK8 = 0x00000100, // 8 hide created item in tooltip (for effect=24)
SPELL_ATTR_UNK9 = 0x00000200, // 9
SPELL_ATTR_ON_NEXT_SWING_2 = 0x00000400, // 10 on next swing 2
SPELL_ATTR_UNK11 = 0x00000800, // 11
SPELL_ATTR_DAYTIME_ONLY = 0x00001000, // 12 only useable at daytime, not set in 2.4.2
SPELL_ATTR_NIGHT_ONLY = 0x00002000, // 13 only useable at night, not set in 2.4.2
SPELL_ATTR_INDOORS_ONLY = 0x00004000, // 14 only useable indoors, not set in 2.4.2
SPELL_ATTR_OUTDOORS_ONLY = 0x00008000, // 15 Only useable outdoors.
SPELL_ATTR_NOT_SHAPESHIFT = 0x00010000, // 16 Not while shapeshifted
SPELL_ATTR_ONLY_STEALTHED = 0x00020000, // 17 Must be in stealth
SPELL_ATTR_UNK18 = 0x00040000, // 18
SPELL_ATTR_LEVEL_DAMAGE_CALCULATION = 0x00080000, // 19 spelldamage depends on caster level
SPELL_ATTR_STOP_ATTACK_TARGET = 0x00100000, // 20 Stop attack after use this spell (and not begin attack if use)
SPELL_ATTR_IMPOSSIBLE_DODGE_PARRY_BLOCK = 0x00200000, // 21 Can not be dodged/parried/blocked
SPELL_ATTR_SET_TRACKING_TARGET = 0x00400000, // 22 SetTrackingTarget
SPELL_ATTR_UNK23 = 0x00800000, // 23 castable while dead?
SPELL_ATTR_CASTABLE_WHILE_MOUNTED = 0x01000000, // 24 castable while mounted
SPELL_ATTR_DISABLED_WHILE_ACTIVE = 0x02000000, // 25 Activate and start cooldown after aura fade or remove summoned creature or go
SPELL_ATTR_UNK26 = 0x04000000, // 26
SPELL_ATTR_CASTABLE_WHILE_SITTING = 0x08000000, // 27 castable while sitting
SPELL_ATTR_CANT_USED_IN_COMBAT = 0x10000000, // 28 Can not be used in combat
SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY = 0x20000000, // 29 unaffected by invulnerability (hmm possible not...)
SPELL_ATTR_HEARTBEAT_RESIST_CHECK = 0x40000000, // 30 TC 335: random chance the effect will end (subjected to the hearbeat resist)
SPELL_ATTR_CANT_CANCEL = 0x80000000 // 31 positive aura can't be canceled
};
enum SpellAttributesEx
{
SPELL_ATTR_EX_UNK0 = 0x00000001, // 0
SPELL_ATTR_EX_DRAIN_ALL_POWER = 0x00000002, // 1 use all power (Only paladin Lay of Hands and Bunyanize)
SPELL_ATTR_EX_CHANNELED_1 = 0x00000004, // 2 channeled 1
SPELL_ATTR_EX_UNK3 = 0x00000008, // 3
SPELL_ATTR_EX_UNK4 = 0x00000010, // 4
SPELL_ATTR_EX_NOT_BREAK_STEALTH = 0x00000020, // 5 Not break stealth
SPELL_ATTR_EX_CHANNELED_2 = 0x00000040, // 6 channeled 2
SPELL_ATTR_EX_NEGATIVE = 0x00000080, // 7
SPELL_ATTR_EX_NOT_IN_COMBAT_TARGET = 0x00000100, // 8 Spell req target not to be in combat state
SPELL_ATTR_EX_UNK9 = 0x00000200, // 9
SPELL_ATTR_EX_NO_THREAT = 0x00000400, // 10 no generates threat on cast 100%
SPELL_ATTR_EX_UNK11 = 0x00000800, // 11
SPELL_ATTR_EX_UNK12 = 0x00001000, // 12
SPELL_ATTR_EX_FARSIGHT = 0x00002000, // 13 related to farsight
SPELL_ATTR_EX_UNK14 = 0x00004000, // 14
SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY = 0x00008000, // 15 remove auras on immunity
SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE = 0x00010000, // 16 unaffected by school immunity
SPELL_ATTR_EX_UNK17 = 0x00020000, // 17 for auras SPELL_AURA_TRACK_CREATURES, SPELL_AURA_TRACK_RESOURCES and SPELL_AURA_TRACK_STEALTHED select non-stacking tracking spells
SPELL_ATTR_EX_UNK18 = 0x00040000, // 18
SPELL_ATTR_EX_CANT_TARGET_SELF = 0x00080000, // 19 spells that exclude the caster
SPELL_ATTR_EX_REQ_TARGET_COMBO_POINTS = 0x00100000, // 20 Req combo points on target
SPELL_ATTR_EX_UNK21 = 0x00200000, // 21
SPELL_ATTR_EX_REQ_COMBO_POINTS = 0x00400000, // 22 Use combo points (in 4.x not required combo point target selected)
SPELL_ATTR_EX_UNK23 = 0x00800000, // 23
SPELL_ATTR_EX_UNK24 = 0x01000000, // 24 Req fishing pole??
SPELL_ATTR_EX_UNK25 = 0x02000000, // 25 not set in 2.4.2
SPELL_ATTR_EX_UNK26 = 0x04000000, // 26
SPELL_ATTR_EX_UNK27 = 0x08000000, // 27
SPELL_ATTR_EX_UNK28 = 0x10000000, // 28
SPELL_ATTR_EX_UNK29 = 0x20000000, // 29
SPELL_ATTR_EX_UNK30 = 0x40000000, // 30 overpower
SPELL_ATTR_EX_UNK31 = 0x80000000, // 31
};
enum SpellAttributesEx2
{
SPELL_ATTR_EX2_UNK0 = 0x00000001, // 0
SPELL_ATTR_EX2_UNK1 = 0x00000002, // 1
SPELL_ATTR_EX2_CANT_REFLECTED = 0x00000004, // 2 ? used for detect can or not spell reflected // do not need LOS (e.g. 18220 since 3.3.3)
SPELL_ATTR_EX2_UNK3 = 0x00000008, // 3 auto targeting? (e.g. fishing skill enhancement items since 3.3.3)
SPELL_ATTR_EX2_UNK4 = 0x00000010, // 4
SPELL_ATTR_EX2_AUTOREPEAT_FLAG = 0x00000020, // 5
SPELL_ATTR_EX2_UNK6 = 0x00000040, // 6 only usable on tabbed by yourself
SPELL_ATTR_EX2_UNK7 = 0x00000080, // 7
SPELL_ATTR_EX2_UNK8 = 0x00000100, // 8 not set in 2.4.2
SPELL_ATTR_EX2_UNK9 = 0x00000200, // 9
SPELL_ATTR_EX2_UNK10 = 0x00000400, // 10
SPELL_ATTR_EX2_HEALTH_FUNNEL = 0x00000800, // 11
SPELL_ATTR_EX2_UNK12 = 0x00001000, // 12
SPELL_ATTR_EX2_UNK13 = 0x00002000, // 13
SPELL_ATTR_EX2_UNK14 = 0x00004000, // 14
SPELL_ATTR_EX2_UNK15 = 0x00008000, // 15 not set in 2.4.2
SPELL_ATTR_EX2_UNK16 = 0x00010000, // 16
SPELL_ATTR_EX2_UNK17 = 0x00020000, // 17 suspend weapon timer instead of resetting it, (?Hunters Shot and Stings only have this flag?)
SPELL_ATTR_EX2_UNK18 = 0x00040000, // 18 Only Revive pet - possible req dead pet
SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT = 0x00080000, // 19 does not necessary need shapeshift (pre-3.x not have passive spells with this attribute)
SPELL_ATTR_EX2_UNK20 = 0x00100000, // 20
SPELL_ATTR_EX2_DAMAGE_REDUCED_SHIELD = 0x00200000, // 21 for ice blocks, pala immunity buffs, priest absorb shields, but used also for other spells -> not sure!
SPELL_ATTR_EX2_UNK22 = 0x00400000, // 22
SPELL_ATTR_EX2_UNK23 = 0x00800000, // 23 Only mage Arcane Concentration have this flag
SPELL_ATTR_EX2_UNK24 = 0x01000000, // 24
SPELL_ATTR_EX2_UNK25 = 0x02000000, // 25
SPELL_ATTR_EX2_UNK26 = 0x04000000, // 26 unaffected by school immunity
SPELL_ATTR_EX2_UNK27 = 0x08000000, // 27
SPELL_ATTR_EX2_UNK28 = 0x10000000, // 28 no breaks stealth if it fails??
SPELL_ATTR_EX2_CANT_CRIT = 0x20000000, // 29 Spell can't crit
SPELL_ATTR_EX2_UNK30 = 0x40000000, // 30
SPELL_ATTR_EX2_FOOD_BUFF = 0x80000000, // 31 Food or Drink Buff (like Well Fed)
};
enum SpellAttributesEx3
{
SPELL_ATTR_EX3_UNK0 = 0x00000001, // 0
SPELL_ATTR_EX3_UNK1 = 0x00000002, // 1
SPELL_ATTR_EX3_UNK2 = 0x00000004, // 2
SPELL_ATTR_EX3_UNK3 = 0x00000008, // 3
SPELL_ATTR_EX3_UNK4 = 0x00000010, // 4 Druid Rebirth only this spell have this flag
SPELL_ATTR_EX3_UNK5 = 0x00000020, // 5
SPELL_ATTR_EX3_UNK6 = 0x00000040, // 6
SPELL_ATTR_EX3_UNK7 = 0x00000080, // 7 create a separate (de)buff stack for each caster
SPELL_ATTR_EX3_TARGET_ONLY_PLAYER = 0x00000100, // 8 Can target only player
SPELL_ATTR_EX3_UNK9 = 0x00000200, // 9
SPELL_ATTR_EX3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required
SPELL_ATTR_EX3_BATTLEGROUND = 0x00000800, // 11 Can casted only on battleground
SPELL_ATTR_EX3_CAST_ON_DEAD = 0x00001000, // 12 target is a dead player (not every spell has this flag)
SPELL_ATTR_EX3_UNK13 = 0x00002000, // 13
SPELL_ATTR_EX3_UNK14 = 0x00004000, // 14 "Honorless Target" only this spells have this flag
SPELL_ATTR_EX3_UNK15 = 0x00008000, // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
SPELL_ATTR_EX3_UNK16 = 0x00010000, // 16 no triggers effects that trigger on casting a spell??
SPELL_ATTR_EX3_NO_INITIAL_AGGRO = 0x00020000, // 17 Causes no aggro if not missed
SPELL_ATTR_EX3_CANT_MISS = 0x00040000, // 18 Spell should always hit its target
SPELL_ATTR_EX3_UNK19 = 0x00080000, // 19
SPELL_ATTR_EX3_DEATH_PERSISTENT = 0x00100000, // 20 Death persistent spells
SPELL_ATTR_EX3_UNK21 = 0x00200000, // 21
SPELL_ATTR_EX3_REQ_WAND = 0x00400000, // 22 Req wand
SPELL_ATTR_EX3_UNK23 = 0x00800000, // 23
SPELL_ATTR_EX3_REQ_OFFHAND = 0x01000000, // 24 Req offhand weapon
SPELL_ATTR_EX3_UNK25 = 0x02000000, // 25 no cause spell pushback ?
SPELL_ATTR_EX3_UNK26 = 0x04000000, // 26
SPELL_ATTR_EX3_UNK27 = 0x08000000, // 27
SPELL_ATTR_EX3_UNK28 = 0x10000000, // 28 always cast ok ? (requires more research)
SPELL_ATTR_EX3_UNK29 = 0x20000000, // 29
SPELL_ATTR_EX3_UNK30 = 0x40000000, // 30
SPELL_ATTR_EX3_UNK31 = 0x80000000 // 31
};
enum SpellAttributesEx4
{
SPELL_ATTR_EX4_UNK0 = 0x00000001, // 0
SPELL_ATTR_EX4_UNK1 = 0x00000002, // 1 proc on finishing move?
SPELL_ATTR_EX4_UNK2 = 0x00000004, // 2
SPELL_ATTR_EX4_UNK3 = 0x00000008, // 3
SPELL_ATTR_EX4_UNK4 = 0x00000010, // 4 This will no longer cause guards to attack on use??
SPELL_ATTR_EX4_UNK5 = 0x00000020, // 5
SPELL_ATTR_EX4_NOT_STEALABLE = 0x00000040, // 6 although such auras might be dispellable, they can not be stolen
SPELL_ATTR_EX4_UNK7 = 0x00000080, // 7
SPELL_ATTR_EX4_STACK_DOT_MODIFIER = 0x00000100, // 8 no effect on non DoTs?
SPELL_ATTR_EX4_UNK9 = 0x00000200, // 9
SPELL_ATTR_EX4_SPELL_VS_EXTEND_COST = 0x00000400, // 10 Rogue Shiv have this flag
SPELL_ATTR_EX4_UNK11 = 0x00000800, // 11
SPELL_ATTR_EX4_UNK12 = 0x00001000, // 12
SPELL_ATTR_EX4_UNK13 = 0x00002000, // 13
SPELL_ATTR_EX4_UNK14 = 0x00004000, // 14
SPELL_ATTR_EX4_UNK15 = 0x00008000, // 15
SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA = 0x00010000, // 16 not usable in arena
SPELL_ATTR_EX4_USABLE_IN_ARENA = 0x00020000, // 17 usable in arena
SPELL_ATTR_EX4_UNK18 = 0x00040000, // 18
SPELL_ATTR_EX4_UNK19 = 0x00080000, // 19
SPELL_ATTR_EX4_UNK20 = 0x00100000, // 20 do not give "more powerful spell" error message
SPELL_ATTR_EX4_UNK21 = 0x00200000, // 21
SPELL_ATTR_EX4_UNK22 = 0x00400000, // 22
SPELL_ATTR_EX4_UNK23 = 0x00800000, // 23
SPELL_ATTR_EX4_UNK24 = 0x01000000, // 24
SPELL_ATTR_EX4_UNK25 = 0x02000000, // 25 pet scaling auras
SPELL_ATTR_EX4_CAST_ONLY_IN_OUTLAND = 0x04000000, // 26 Can only be used in Outland.
SPELL_ATTR_EX4_UNK27 = 0x08000000, // 27
SPELL_ATTR_EX4_UNK28 = 0x10000000, // 28
SPELL_ATTR_EX4_UNK29 = 0x20000000, // 29
SPELL_ATTR_EX4_UNK30 = 0x40000000, // 30
SPELL_ATTR_EX4_UNK31 = 0x80000000 // 31
};
enum SheathTypes
{
SHEATHETYPE_NONE = 0,
SHEATHETYPE_MAINHAND = 1,
SHEATHETYPE_OFFHAND = 2,
SHEATHETYPE_LARGEWEAPONLEFT = 3,
SHEATHETYPE_LARGEWEAPONRIGHT = 4,
SHEATHETYPE_HIPWEAPONLEFT = 5,
SHEATHETYPE_HIPWEAPONRIGHT = 6,
SHEATHETYPE_SHIELD = 7
};
#define MAX_SHEATHETYPE 8
enum CharacterSlot
{
SLOT_HEAD = 0,
SLOT_NECK = 1,
SLOT_SHOULDERS = 2,
SLOT_SHIRT = 3,
SLOT_CHEST = 4,
SLOT_WAIST = 5,
SLOT_LEGS = 6,
SLOT_FEET = 7,
SLOT_WRISTS = 8,
SLOT_HANDS = 9,
SLOT_FINGER1 = 10,
SLOT_FINGER2 = 11,
SLOT_TRINKET1 = 12,
SLOT_TRINKET2 = 13,
SLOT_BACK = 14,
SLOT_MAIN_HAND = 15,
SLOT_OFF_HAND = 16,
SLOT_RANGED = 17,
SLOT_TABARD = 18,
SLOT_EMPTY = 19
};
// from Languages.dbc (checked for 1.12.1)
enum Language
{
LANG_UNIVERSAL = 0,
LANG_ORCISH = 1,
LANG_DARNASSIAN = 2,
LANG_TAURAHE = 3,
LANG_DWARVISH = 6,
LANG_COMMON = 7,
LANG_DEMONIC = 8,
LANG_TITAN = 9,
LANG_THALASSIAN = 10,
LANG_DRACONIC = 11,
LANG_KALIMAG = 12,
LANG_GNOMISH = 13,
LANG_TROLL = 14,
LANG_GUTTERSPEAK = 33,
LANG_ADDON = 0xFFFFFFFF // used by addons, in 2.4.0 not exit, replaced by messagetype?
};
#define LANGUAGES_COUNT 15
// In fact !=0 values is alliance/horde root faction ids
enum Team
{
TEAM_NONE = 0, // used when team value unknown or not set, 0 is also meaning that can be used !team check
TEAM_BOTH_ALLOWED = 0, // used when a check should evaluate true for both teams
TEAM_INVALID = 1, // used to invalidate some team depending checks (means not for both teams)
HORDE = 67,
ALLIANCE = 469,
};
enum PvpTeamIndex
{
TEAM_INDEX_ALLIANCE = 0,
TEAM_INDEX_HORDE = 1,
TEAM_INDEX_NEUTRAL = 2,
};
#define PVP_TEAM_COUNT 2
/**
* This are the different things that a spell can have as it's spell effect, see
* \ref SpellEntry::Effect for where in the DBC this is stored. Also see \ref HowSpellsWork
*/
enum SpellEffects
{
SPELL_EFFECT_NONE = 0,
SPELL_EFFECT_INSTAKILL = 1,
SPELL_EFFECT_SCHOOL_DAMAGE = 2,
SPELL_EFFECT_DUMMY = 3,
SPELL_EFFECT_PORTAL_TELEPORT = 4,
SPELL_EFFECT_TELEPORT_UNITS = 5,
SPELL_EFFECT_APPLY_AURA = 6,
SPELL_EFFECT_ENVIRONMENTAL_DAMAGE = 7,
SPELL_EFFECT_POWER_DRAIN = 8,
SPELL_EFFECT_HEALTH_LEECH = 9,
SPELL_EFFECT_HEAL = 10,
SPELL_EFFECT_BIND = 11,
SPELL_EFFECT_PORTAL = 12,
SPELL_EFFECT_RITUAL_BASE = 13,
SPELL_EFFECT_RITUAL_SPECIALIZE = 14,
SPELL_EFFECT_RITUAL_ACTIVATE_PORTAL = 15,
SPELL_EFFECT_QUEST_COMPLETE = 16,
SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL = 17,
SPELL_EFFECT_RESURRECT = 18,
SPELL_EFFECT_ADD_EXTRA_ATTACKS = 19,
SPELL_EFFECT_DODGE = 20,
SPELL_EFFECT_EVADE = 21,
SPELL_EFFECT_PARRY = 22,
SPELL_EFFECT_BLOCK = 23,
SPELL_EFFECT_CREATE_ITEM = 24,
SPELL_EFFECT_WEAPON = 25,
SPELL_EFFECT_DEFENSE = 26,
SPELL_EFFECT_PERSISTENT_AREA_AURA = 27,
SPELL_EFFECT_SUMMON = 28,
SPELL_EFFECT_LEAP = 29,
SPELL_EFFECT_ENERGIZE = 30,
SPELL_EFFECT_WEAPON_PERCENT_DAMAGE = 31,
SPELL_EFFECT_TRIGGER_MISSILE = 32,
SPELL_EFFECT_OPEN_LOCK = 33,
SPELL_EFFECT_SUMMON_CHANGE_ITEM = 34,
SPELL_EFFECT_APPLY_AREA_AURA_PARTY = 35,
SPELL_EFFECT_LEARN_SPELL = 36,
SPELL_EFFECT_SPELL_DEFENSE = 37,
SPELL_EFFECT_DISPEL = 38,
SPELL_EFFECT_LANGUAGE = 39,
SPELL_EFFECT_DUAL_WIELD = 40,
SPELL_EFFECT_SUMMON_WILD = 41,
SPELL_EFFECT_SUMMON_GUARDIAN = 42,
SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER = 43,
SPELL_EFFECT_SKILL_STEP = 44,
SPELL_EFFECT_ADD_HONOR = 45,
SPELL_EFFECT_SPAWN = 46,
SPELL_EFFECT_TRADE_SKILL = 47,
SPELL_EFFECT_STEALTH = 48,
SPELL_EFFECT_DETECT = 49,
SPELL_EFFECT_TRANS_DOOR = 50,
SPELL_EFFECT_FORCE_CRITICAL_HIT = 51,
SPELL_EFFECT_GUARANTEE_HIT = 52,
SPELL_EFFECT_ENCHANT_ITEM = 53,
SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY = 54,
SPELL_EFFECT_TAMECREATURE = 55,
SPELL_EFFECT_SUMMON_PET = 56,
SPELL_EFFECT_LEARN_PET_SPELL = 57,
SPELL_EFFECT_WEAPON_DAMAGE = 58,
SPELL_EFFECT_OPEN_LOCK_ITEM = 59,
SPELL_EFFECT_PROFICIENCY = 60,
SPELL_EFFECT_SEND_EVENT = 61,
SPELL_EFFECT_POWER_BURN = 62,
SPELL_EFFECT_THREAT = 63,
SPELL_EFFECT_TRIGGER_SPELL = 64,
SPELL_EFFECT_HEALTH_FUNNEL = 65,
SPELL_EFFECT_POWER_FUNNEL = 66,
SPELL_EFFECT_HEAL_MAX_HEALTH = 67,
SPELL_EFFECT_INTERRUPT_CAST = 68,
SPELL_EFFECT_DISTRACT = 69,
SPELL_EFFECT_PULL = 70,
SPELL_EFFECT_PICKPOCKET = 71,
SPELL_EFFECT_ADD_FARSIGHT = 72,
SPELL_EFFECT_SUMMON_POSSESSED = 73,
SPELL_EFFECT_SUMMON_TOTEM = 74,
SPELL_EFFECT_HEAL_MECHANICAL = 75,
SPELL_EFFECT_SUMMON_OBJECT_WILD = 76,
SPELL_EFFECT_SCRIPT_EFFECT = 77,
SPELL_EFFECT_ATTACK = 78,
SPELL_EFFECT_SANCTUARY = 79,
SPELL_EFFECT_ADD_COMBO_POINTS = 80,
SPELL_EFFECT_CREATE_HOUSE = 81,
SPELL_EFFECT_BIND_SIGHT = 82,
SPELL_EFFECT_DUEL = 83,
SPELL_EFFECT_STUCK = 84,
SPELL_EFFECT_SUMMON_PLAYER = 85,
SPELL_EFFECT_ACTIVATE_OBJECT = 86,
SPELL_EFFECT_SUMMON_TOTEM_SLOT1 = 87,
SPELL_EFFECT_SUMMON_TOTEM_SLOT2 = 88,
SPELL_EFFECT_SUMMON_TOTEM_SLOT3 = 89,
SPELL_EFFECT_SUMMON_TOTEM_SLOT4 = 90,
SPELL_EFFECT_THREAT_ALL = 91,
SPELL_EFFECT_ENCHANT_HELD_ITEM = 92,
SPELL_EFFECT_SUMMON_PHANTASM = 93,
SPELL_EFFECT_SELF_RESURRECT = 94,
SPELL_EFFECT_SKINNING = 95,
SPELL_EFFECT_CHARGE = 96,
SPELL_EFFECT_SUMMON_CRITTER = 97,
SPELL_EFFECT_KNOCK_BACK = 98,
SPELL_EFFECT_DISENCHANT = 99,
SPELL_EFFECT_INEBRIATE = 100,
SPELL_EFFECT_FEED_PET = 101,
SPELL_EFFECT_DISMISS_PET = 102,
SPELL_EFFECT_REPUTATION = 103,
SPELL_EFFECT_SUMMON_OBJECT_SLOT1 = 104,
SPELL_EFFECT_SUMMON_OBJECT_SLOT2 = 105,
SPELL_EFFECT_SUMMON_OBJECT_SLOT3 = 106,
SPELL_EFFECT_SUMMON_OBJECT_SLOT4 = 107,
SPELL_EFFECT_DISPEL_MECHANIC = 108,
SPELL_EFFECT_SUMMON_DEAD_PET = 109,
SPELL_EFFECT_DESTROY_ALL_TOTEMS = 110,
SPELL_EFFECT_DURABILITY_DAMAGE = 111,
SPELL_EFFECT_SUMMON_DEMON = 112,
SPELL_EFFECT_RESURRECT_NEW = 113,
SPELL_EFFECT_ATTACK_ME = 114,
SPELL_EFFECT_DURABILITY_DAMAGE_PCT = 115,
SPELL_EFFECT_SKIN_PLAYER_CORPSE = 116,
SPELL_EFFECT_SPIRIT_HEAL = 117,
SPELL_EFFECT_SKILL = 118,
SPELL_EFFECT_APPLY_AREA_AURA_PET = 119,
SPELL_EFFECT_TELEPORT_GRAVEYARD = 120,
SPELL_EFFECT_NORMALIZED_WEAPON_DMG = 121,
SPELL_EFFECT_122 = 122,
SPELL_EFFECT_SEND_TAXI = 123,
SPELL_EFFECT_PLAYER_PULL = 124,
SPELL_EFFECT_MODIFY_THREAT_PERCENT = 125,
SPELL_EFFECT_126 = 126,
SPELL_EFFECT_127 = 127,
SPELL_EFFECT_128 = 128,
SPELL_EFFECT_129 = 129,
TOTAL_SPELL_EFFECTS = 130
};
enum SpellCastResult
{
SPELL_FAILED_AFFECTING_COMBAT = 0x00,
SPELL_FAILED_ALREADY_AT_FULL_HEALTH = 0x01,
SPELL_FAILED_ALREADY_AT_FULL_MANA = 0x02,
SPELL_FAILED_ALREADY_BEING_TAMED = 0x03,
SPELL_FAILED_ALREADY_HAVE_CHARM = 0x04,
SPELL_FAILED_ALREADY_HAVE_SUMMON = 0x05,
SPELL_FAILED_ALREADY_OPEN = 0x06,
SPELL_FAILED_MORE_POWERFUL_SPELL_ACTIVE = 0x07,
// SPELL_FAILED_AUTOTRACK_INTERRUPTED = 0x08, old commented CAST_FAIL_FAILED = 8,-> 29
SPELL_FAILED_BAD_IMPLICIT_TARGETS = 0x09,
SPELL_FAILED_BAD_TARGETS = 0x0A,
SPELL_FAILED_CANT_BE_CHARMED = 0x0B,
SPELL_FAILED_CANT_BE_DISENCHANTED = 0x0C,
SPELL_FAILED_CANT_BE_PROSPECTED = 0x0D,
SPELL_FAILED_CANT_CAST_ON_TAPPED = 0x0E,
SPELL_FAILED_CANT_DUEL_WHILE_INVISIBLE = 0x0F,
SPELL_FAILED_CANT_DUEL_WHILE_STEALTHED = 0x10,
SPELL_FAILED_CANT_TOO_CLOSE_TO_ENEMY = 0x11,
SPELL_FAILED_CANT_DO_THAT_YET = 0x12,
SPELL_FAILED_CASTER_DEAD = 0x13,
SPELL_FAILED_CHARMED = 0x14,
SPELL_FAILED_CHEST_IN_USE = 0x15,
SPELL_FAILED_CONFUSED = 0x16,
SPELL_FAILED_DONT_REPORT = 0x17, // [-ZERO] need check
SPELL_FAILED_EQUIPPED_ITEM = 0x18,
SPELL_FAILED_EQUIPPED_ITEM_CLASS = 0x19,
SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND = 0x1A,
SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND = 0x1B,
SPELL_FAILED_ERROR = 0x1C,
SPELL_FAILED_FIZZLE = 0x1D,
SPELL_FAILED_FLEEING = 0x1E,
SPELL_FAILED_FOOD_LOWLEVEL = 0x1F,
SPELL_FAILED_HIGHLEVEL = 0x20,
// SPELL_FAILED_HUNGER_SATIATED = 0x21,
SPELL_FAILED_IMMUNE = 0x22,
SPELL_FAILED_INTERRUPTED = 0x23,
SPELL_FAILED_INTERRUPTED_COMBAT = 0x24,
SPELL_FAILED_ITEM_ALREADY_ENCHANTED = 0x25,
SPELL_FAILED_ITEM_GONE = 0x26,
SPELL_FAILED_ENCHANT_NOT_EXISTING_ITEM = 0x27,
SPELL_FAILED_ITEM_NOT_READY = 0x28,
SPELL_FAILED_LEVEL_REQUIREMENT = 0x29,
SPELL_FAILED_LINE_OF_SIGHT = 0x2A,
SPELL_FAILED_LOWLEVEL = 0x2B,
SPELL_FAILED_SKILL_NOT_HIGH_ENOUGH = 0x2C,
SPELL_FAILED_MAINHAND_EMPTY = 0x2D,
SPELL_FAILED_MOVING = 0x2E,
SPELL_FAILED_NEED_AMMO = 0x2F,
SPELL_FAILED_NEED_REQUIRES_SOMETHING = 0x30,
SPELL_FAILED_NEED_EXOTIC_AMMO = 0x31,
SPELL_FAILED_NOPATH = 0x32,
SPELL_FAILED_NOT_BEHIND = 0x33,
SPELL_FAILED_NOT_FISHABLE = 0x34,
SPELL_FAILED_NOT_HERE = 0x35,
SPELL_FAILED_NOT_INFRONT = 0x36,
SPELL_FAILED_NOT_IN_CONTROL = 0x37,
SPELL_FAILED_NOT_KNOWN = 0x38,
SPELL_FAILED_NOT_MOUNTED = 0x39,
SPELL_FAILED_NOT_ON_TAXI = 0x3A,
SPELL_FAILED_NOT_ON_TRANSPORT = 0x3B,
SPELL_FAILED_NOT_READY = 0x3C,
SPELL_FAILED_NOT_SHAPESHIFT = 0x3D,
SPELL_FAILED_NOT_STANDING = 0x3E,
SPELL_FAILED_NOT_TRADEABLE = 0x3F, // rogues trying "enchant" other's weapon with poison
SPELL_FAILED_NOT_TRADING = 0x40, // CAST_FAIL_CANT_ENCHANT_TRADE_ITEM
SPELL_FAILED_NOT_UNSHEATHED = 0x41, // yellow text
SPELL_FAILED_NOT_WHILE_GHOST = 0x42,
SPELL_FAILED_NO_AMMO = 0x43,
SPELL_FAILED_NO_CHARGES_REMAIN = 0x44,
SPELL_FAILED_NO_CHAMPION = 0x45, // CAST_FAIL_NOT_SELECT
SPELL_FAILED_NO_COMBO_POINTS = 0x46,
SPELL_FAILED_NO_DUELING = 0x47,
SPELL_FAILED_NO_ENDURANCE = 0x48,
SPELL_FAILED_NO_FISH = 0x49,
SPELL_FAILED_NO_ITEMS_WHILE_SHAPESHIFTED = 0x4A,
SPELL_FAILED_NO_MOUNTS_ALLOWED = 0x4B,
SPELL_FAILED_NO_PET = 0x4C,
SPELL_FAILED_NO_POWER = 0x4D, // CAST_FAIL_NOT_ENOUGH_MANA
SPELL_FAILED_NOTHING_TO_DISPEL = 0x4E,
SPELL_FAILED_NOTHING_TO_STEAL = 0x4F,
SPELL_FAILED_ONLY_ABOVEWATER = 0x50, // CAST_FAIL_CANT_USE_WHILE_SWIMMING
SPELL_FAILED_ONLY_DAYTIME = 0x51,
SPELL_FAILED_ONLY_INDOORS = 0x52,
SPELL_FAILED_ONLY_MOUNTED = 0x53,
SPELL_FAILED_ONLY_NIGHTTIME = 0x54,
SPELL_FAILED_ONLY_OUTDOORS = 0x55,
SPELL_FAILED_ONLY_SHAPESHIFT = 0x56,
SPELL_FAILED_ONLY_STEALTHED = 0x57,
SPELL_FAILED_ONLY_UNDERWATER = 0x58, // CAST_FAIL_CAN_ONLY_USE_WHILE_SWIMMING
SPELL_FAILED_OUT_OF_RANGE = 0x59,
SPELL_FAILED_PACIFIED = 0x5A,
SPELL_FAILED_POSSESSED = 0x5B,
// SPELL_FAILED_REAGENTS = 0x5C, [-ZERO] not in 1.12
SPELL_FAILED_REQUIRES_AREA = 0x5D, // CAST_FAIL_YOU_NEED_TO_BE_IN_XXX
SPELL_FAILED_REQUIRES_SPELL_FOCUS = 0x5E, // CAST_FAIL_REQUIRES_XXX
SPELL_FAILED_ROOTED = 0x5F, // CAST_FAIL_UNABLE_TO_MOVE
SPELL_FAILED_SILENCED = 0x60,
SPELL_FAILED_SPELL_IN_PROGRESS = 0x61,
SPELL_FAILED_SPELL_LEARNED = 0x62,
SPELL_FAILED_SPELL_UNAVAILABLE = 0x63,
SPELL_FAILED_STUNNED = 0x64,
SPELL_FAILED_TARGETS_DEAD = 0x65,
SPELL_FAILED_TARGET_AFFECTING_COMBAT = 0x66,
SPELL_FAILED_TARGET_AURASTATE = 0x67, // CAST_FAIL_CANT_DO_THAT_YET_2
SPELL_FAILED_TARGET_DUELING = 0x68,
SPELL_FAILED_TARGET_ENEMY = 0x69,
SPELL_FAILED_TARGET_ENRAGED = 0x6A, // CAST_FAIL_TARGET_IS_TOO_ENRAGED_TO_CHARM
SPELL_FAILED_TARGET_FRIENDLY = 0x6B,
SPELL_FAILED_TARGET_IN_COMBAT = 0x6C,
SPELL_FAILED_TARGET_IS_PLAYER = 0x6D,
SPELL_FAILED_TARGET_NOT_DEAD = 0x6E,
SPELL_FAILED_TARGET_NOT_IN_PARTY = 0x6F,
SPELL_FAILED_TARGET_NOT_LOOTED = 0x70, // CAST_FAIL_CREATURE_MUST_BE_LOOTED_FIRST
SPELL_FAILED_TARGET_NOT_PLAYER = 0x71,
SPELL_FAILED_TARGET_NO_POCKETS = 0x72, // CAST_FAIL_NOT_ITEM_TO_STEAL
SPELL_FAILED_TARGET_NO_WEAPONS = 0x73,
SPELL_FAILED_TARGET_UNSKINNABLE = 0x74,
SPELL_FAILED_THIRST_SATIATED = 0x75,
SPELL_FAILED_TOO_CLOSE = 0x76,
SPELL_FAILED_TOO_MANY_OF_ITEM = 0x77,
// SPELL_FAILED_TOTEMS = 0x78, // [-ZERO] not in 1.12
SPELL_FAILED_TRAINING_POINTS = 0x79,
SPELL_FAILED_TRY_AGAIN = 0x7A, // CAST_FAIL_FAILED_ATTEMPT
SPELL_FAILED_UNIT_NOT_BEHIND = 0x7B,
SPELL_FAILED_UNIT_NOT_INFRONT = 0x7C,
SPELL_FAILED_WRONG_PET_FOOD = 0x7D,
SPELL_FAILED_NOT_WHILE_FATIGUED = 0x7E,
SPELL_FAILED_TARGET_NOT_IN_INSTANCE = 0x7F, // CAST_FAIL_TARGET_MUST_BE_IN_THIS_INSTANCE
SPELL_FAILED_NOT_WHILE_TRADING = 0x80,
SPELL_FAILED_TARGET_NOT_IN_RAID = 0x81,
SPELL_FAILED_DISENCHANT_WHILE_LOOTING = 0x82,
SPELL_FAILED_PROSPECT_WHILE_LOOTING = 0x83,
// SPELL_FAILED_PROSPECT_NEED_MORE = 0x85,
SPELL_FAILED_TARGET_FREEFORALL = 0x85,
SPELL_FAILED_NO_EDIBLE_CORPSES = 0x86,
SPELL_FAILED_ONLY_BATTLEGROUNDS = 0x87,
SPELL_FAILED_TARGET_NOT_GHOST = 0x88,
SPELL_FAILED_TOO_MANY_SKILLS = 0x89, // CAST_FAIL_YOUR_PET_CANT_LEARN_MORE_SKILLS
SPELL_FAILED_CANT_USE_NEW_ITEM = 0x8A,
SPELL_FAILED_WRONG_WEATHER = 0x8B, // CAST_FAIL_CANT_DO_IN_THIS_WEATHER
SPELL_FAILED_DAMAGE_IMMUNE = 0x8C, // CAST_FAIL_CANT_DO_IN_IMMUNE
SPELL_FAILED_PREVENTED_BY_MECHANIC = 0x8D, // CAST_FAIL_CANT_DO_IN_XXX
SPELL_FAILED_PLAY_TIME = 0x8E, // CAST_FAIL_GAME_TIME_OVER
SPELL_FAILED_REPUTATION = 0x8F,
SPELL_FAILED_MIN_SKILL = 0x90,
SPELL_FAILED_UNKNOWN = 0x91,
SPELL_CAST_OK = 0xFF // custom value, don't must be send to client
};
// Spell aura states
enum AuraState
{
// (C) used in caster aura state (T) used in target aura state
AURA_STATE_DEFENSE = 1, // C |
AURA_STATE_HEALTHLESS_20_PERCENT = 2, // C T |
AURA_STATE_BERSERKING = 3, // C |
AURA_STATE_FROZEN = 4, // | frozen target (but not used for any spells in 1.12.1 at client side)
AURA_STATE_JUDGEMENT = 5, // C |
// AURA_STATE_UNKNOWN6 = 6, // | not used
AURA_STATE_HUNTER_PARRY = 7, // C |
AURA_STATE_ROGUE_ATTACK_FROM_STEALTH = 7, // C | FIX ME: not implemented yet!
};
// Spell mechanics
enum Mechanics
{
MECHANIC_NONE = 0,
MECHANIC_CHARM = 1,
MECHANIC_DISORIENTED = 2,
MECHANIC_DISARM = 3,
MECHANIC_DISTRACT = 4,
MECHANIC_FEAR = 5,
MECHANIC_FUMBLE = 6,
MECHANIC_ROOT = 7,
MECHANIC_PACIFY = 8, // 0 spells use this mechanic
MECHANIC_SILENCE = 9,
MECHANIC_SLEEP = 10,
MECHANIC_SNARE = 11,
MECHANIC_STUN = 12,
MECHANIC_FREEZE = 13,
MECHANIC_KNOCKOUT = 14,
MECHANIC_BLEED = 15,
MECHANIC_BANDAGE = 16,
MECHANIC_POLYMORPH = 17,
MECHANIC_BANISH = 18,
MECHANIC_SHIELD = 19,
MECHANIC_SHACKLE = 20,
MECHANIC_MOUNT = 21,
MECHANIC_PERSUADE = 22, // 0 spells use this mechanic
MECHANIC_TURN = 23,
MECHANIC_HORROR = 24,
MECHANIC_INVULNERABILITY = 25,
MECHANIC_INTERRUPT = 26,
MECHANIC_DAZE = 27,
MECHANIC_DISCOVERY = 28,
MECHANIC_IMMUNE_SHIELD = 29, // Divine (Blessing) Shield/Protection and Ice Block
MECHANIC_SAPPED = 30
};
#define FIRST_MECHANIC 1
#define MAX_MECHANIC 31
///Mask defining \ref Mechanics mask which is immune to root and snare
#define IMMUNE_TO_ROOT_AND_SNARE_MASK ( \
(1<<(MECHANIC_ROOT-1))|(1<<(MECHANIC_SNARE-1)))
#define IMMUNE_TO_ROOT_AND_STUN_MASK ( \
(1<<(MECHANIC_ROOT-1))|(1<<(MECHANIC_STUN-1)))
/// Daze and all crowd control spells except polymorph are not removed
#define MECHANIC_NOT_REMOVED_BY_SHAPESHIFT ( \
(1<<(MECHANIC_CHARM -1))|(1<<(MECHANIC_DISORIENTED-1))|(1<<(MECHANIC_FEAR -1))| \
(1<<(MECHANIC_PACIFY-1))|(1<<(MECHANIC_STUN -1))|(1<<(MECHANIC_FREEZE-1))| \
(1<<(MECHANIC_BANISH-1))|(1<<(MECHANIC_SHACKLE -1))|(1<<(MECHANIC_HORROR-1))| \
(1<<(MECHANIC_TURN -1))|(1<<(MECHANIC_DAZE -1))|(1<<(MECHANIC_SAPPED-1)))
/// Different types of \ref Spell s that can be dispelled and what the reason for the dispel is.
/// Also coupled with \ref Aura s as \ref Spell s have \ref Aura s.
enum DispelType
{
DISPEL_NONE = 0,
DISPEL_MAGIC = 1,
DISPEL_CURSE = 2,
DISPEL_DISEASE = 3,
DISPEL_POISON = 4,
DISPEL_STEALTH = 5,
DISPEL_INVISIBILITY = 6,
DISPEL_ALL = 7,
DISPEL_SPE_NPC_ONLY = 8,
DISPEL_ENRAGE = 9,
DISPEL_ZG_TICKET = 10
};
#define DISPEL_ALL_MASK ( (1<<DISPEL_MAGIC) | (1<<DISPEL_CURSE) | (1<<DISPEL_DISEASE) | (1<<DISPEL_POISON) )
// To all Immune system,if target has immunes,
// some spell that related to ImmuneToDispel or ImmuneToSchool or ImmuneToDamage type can't cast to it,
// some spell_effects that related to ImmuneToEffect<effect>(only this effect in the spell) can't cast to it,
// some aura(related to Mechanics or ImmuneToState<aura>) can't apply to it.
enum SpellImmunity
{
IMMUNITY_EFFECT = 0, // enum SpellEffects
IMMUNITY_STATE = 1, // enum AuraType
IMMUNITY_SCHOOL = 2, // enum SpellSchoolMask
IMMUNITY_DAMAGE = 3, // enum SpellSchoolMask
IMMUNITY_DISPEL = 4, // enum DispelType
IMMUNITY_MECHANIC = 5 // enum Mechanics
};
#define MAX_SPELL_IMMUNITY 6
/**
* The different types of attacks you can do with
* weapons
*/
enum WeaponAttackType
{
///Main-hand weapon
BASE_ATTACK = 0,
///Off-hand weapon
OFF_ATTACK = 1,
///Ranged weapon, bow/wand etc.
RANGED_ATTACK = 2
};
#define MAX_ATTACK 3
enum Targets
{
TARGET_NONE = 0,
TARGET_SELF = 1,
TARGET_RANDOM_ENEMY_CHAIN_IN_AREA = 2, // only one spell has that, but regardless, it's a target type after all
TARGET_RANDOM_FRIEND_CHAIN_IN_AREA = 3,
TARGET_RANDOM_UNIT_CHAIN_IN_AREA = 4, // some plague spells that are infectious - maybe targets not-infected friends inrange
TARGET_PET = 5,
TARGET_CHAIN_DAMAGE = 6,
TARGET_AREAEFFECT_INSTANT = 7, // targets around provided destination point
TARGET_AREAEFFECT_CUSTOM = 8,
TARGET_INNKEEPER_COORDINATES = 9, // uses in teleport to innkeeper spells
TARGET_11 = 11, // used by spell 4 'Word of Recall Other'
TARGET_ALL_ENEMY_IN_AREA = 15,
TARGET_ALL_ENEMY_IN_AREA_INSTANT = 16,
TARGET_TABLE_X_Y_Z_COORDINATES = 17, // uses in teleport spells and some other
TARGET_EFFECT_SELECT = 18, // highly depends on the spell effect
TARGET_ALL_PARTY_AROUND_CASTER = 20,
TARGET_SINGLE_FRIEND = 21,
TARGET_CASTER_COORDINATES = 22, // used only in TargetA, target selection dependent from TargetB
TARGET_GAMEOBJECT = 23,
TARGET_IN_FRONT_OF_CASTER = 24,
TARGET_DUELVSPLAYER = 25,
TARGET_GAMEOBJECT_ITEM = 26,
TARGET_MASTER = 27,
TARGET_ALL_ENEMY_IN_AREA_CHANNELED = 28,
TARGET_29 = 29,
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER = 30, // select friendly for caster object faction (in different original caster faction) in TargetB used only with TARGET_ALL_AROUND_CASTER and in self casting range in TargetA
TARGET_ALL_FRIENDLY_UNITS_IN_AREA = 31,
TARGET_MINION = 32,
TARGET_ALL_PARTY = 33,
TARGET_ALL_PARTY_AROUND_CASTER_2 = 34, // used in Tranquility
TARGET_SINGLE_PARTY = 35,
TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER = 36,
TARGET_AREAEFFECT_PARTY = 37,
TARGET_SCRIPT = 38,
TARGET_SELF_FISHING = 39,
TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT = 40,
TARGET_TOTEM_EARTH = 41,
TARGET_TOTEM_WATER = 42,
TARGET_TOTEM_AIR = 43,
TARGET_TOTEM_FIRE = 44,
TARGET_CHAIN_HEAL = 45,
TARGET_SCRIPT_COORDINATES = 46,
TARGET_DYNAMIC_OBJECT_FRONT = 47,
TARGET_DYNAMIC_OBJECT_BEHIND = 48,
TARGET_DYNAMIC_OBJECT_LEFT_SIDE = 49,
TARGET_DYNAMIC_OBJECT_RIGHT_SIDE = 50,
TARGET_AREAEFFECT_GO_AROUND_SOURCE = 51,
TARGET_AREAEFFECT_GO_AROUND_DEST = 52, // gameobject around destination, select by spell_script_target
TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented
TARGET_LARGE_FRONTAL_CONE = 54,
TARGET_ALL_RAID_AROUND_CASTER = 56,
TARGET_SINGLE_FRIEND_2 = 57,
TARGET_58 = 58,
TARGET_NARROW_FRONTAL_CONE = 60,
TARGET_AREAEFFECT_PARTY_AND_CLASS = 61,
TARGET_DUELVSPLAYER_COORDINATES = 63,
};
/**
* Tells how a spell that was cast missed or hit, ie it might have been
* resisted or dodged etc. This enum tells which of those it was. The only
* one which indicates a hit is SPELL_MISS_NONE
*/
enum SpellMissInfo
{
SPELL_MISS_NONE = 0, ///< Indicates an actual hit
SPELL_MISS_MISS = 1,
SPELL_MISS_RESIST = 2, ///< The spell was resisted
SPELL_MISS_DODGE = 3,