OregonCore  revision 3611e8a-git
Your Favourite TBC server
SharedDefines.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef OREGON_SHAREDDEFINES_H
19 #define OREGON_SHAREDDEFINES_H
20 
21 #include "Platform/Define.h"
22 #include <cassert>
23 
25 {
26  EFFECT_0 = 0,
27  EFFECT_1 = 1,
29 };
30 
31 // used in script definitions
32 #define EFFECT_FIRST_FOUND 254
33 #define EFFECT_ALL 255
34 
35 enum Gender
36 {
40 };
41 
42 // Race value is index in ChrRaces.dbc
43 enum Races
44 {
46  RACE_ORC = 2,
57  RACE_NAGA = 13,
63 };
64 
65 // max+1 for player race
66 #define MAX_RACES 12
67 
68 #define RACEMASK_ALL_PLAYABLE \
69  ((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | \
70  (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1)) | \
71  (1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| \
72  (1<<(RACE_DRAENEI-1)))
73 
74 // Class value is index in ChrClasses.dbc
75 enum Classes
76 {
86  // 10 - not set
88 };
89 
90 // max+1 for player class
91 #define MAX_CLASSES 12
92 
93 #define CLASSMASK_ALL_PLAYABLE \
94  ((1<<(CLASS_WARRIOR-1))|(1<<(CLASS_PALADIN-1))|(1<<(CLASS_HUNTER-1))| \
95  (1<<(CLASS_ROGUE-1)) |(1<<(CLASS_PRIEST-1)) |(1<<(CLASS_SHAMAN-1))| \
96  (1<<(CLASS_MAGE-1)) |(1<<(CLASS_WARLOCK-1))|(1<<(CLASS_DRUID-1)))
97 
98 // valid classes for creature_template.unit_class
100 {
105 };
106 
107 #define CLASSMASK_ALL_CREATURES ((1<<(UNIT_CLASS_WARRIOR-1)) | (1<<(UNIT_CLASS_PALADIN-1)) | (1<<(UNIT_CLASS_ROGUE-1)) | (1<<(UNIT_CLASS_MAGE-1)))
108 
109 // Max creature level (included some bosses and elite)
110 #define DEFAULT_MAX_CREATURE_LEVEL 75
111 #define MAX_CREATURE_CLASS 3
112 #define MAX_EXPANSION 1
113 
114 // array index could be used to store class data only Warrior, Paladin and Mage are indexed for creature
115 // W P M
116 static const uint8 classToIndex[MAX_CLASSES] = { 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0 };
117 
118 #define CLASSMASK_WAND_USERS ((1<<(CLASS_PRIEST-1))|(1<<(CLASS_MAGE-1))|(1<<(CLASS_WARLOCK-1)))
119 
120 #define PLAYER_MAX_BATTLEGROUND_QUEUES 3
121 
123 {
132 };
133 
134 #define MIN_REPUTATION_RANK (REP_HATED)
135 #define MAX_REPUTATION_RANK 8
136 
137 #define MAX_SPILLOVER_FACTIONS 4
138 
140 {
141  COPPER = 1,
142  SILVER = COPPER * 100,
143  GOLD = SILVER * 100
144 };
145 
146 enum Stats
147 {
153 };
154 
155 #define MAX_STATS 5
156 
157 enum Powers
158 {
164  POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value)
165 };
166 
167 #define MAX_POWERS 5
168 
170 {
178 };
179 
180 #define MAX_SPELL_SCHOOL 7
181 
183 {
184  SPELL_SCHOOL_MASK_NONE = 0x00, // not exist
185  SPELL_SCHOOL_MASK_NORMAL = (1 << SPELL_SCHOOL_NORMAL), // PHYSICAL (Armor)
192 
193  // unions
194 
195  // 124, not include normal and holy damage
199  // 126
201 
202  // 127
204 };
205 
206 #define SPELL_SCHOOL_MASK_MAGIC \
207  (SPELL_SCHOOL_MASK_HOLY | SPELL_SCHOOL_MASK_FIRE | SPELL_SCHOOL_MASK_NATURE | \
208  SPELL_SCHOOL_MASK_FROST | SPELL_SCHOOL_MASK_SHADOW | \
209  SPELL_SCHOOL_MASK_ARCANE)
210 
212 {
213  for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
214  if (mask & (1 << i))
215  return SpellSchools(i);
216 
217  return SPELL_SCHOOL_NORMAL;
218 }
219 
221 {
231 };
232 
234 {
235  ITEM_QUALITY_POOR = 0, //GREY
236  ITEM_QUALITY_NORMAL = 1, //WHITE
238  ITEM_QUALITY_RARE = 3, //BLUE
239  ITEM_QUALITY_EPIC = 4, //PURPLE
241  ITEM_QUALITY_ARTIFACT = 6 //LIGHT YELLOW
242 };
243 
244 #define MAX_ITEM_QUALITY 7
245 
247 {
248  // Blizzard has gaps in categories
254  SPELL_CATEGORY_DEVOUR_MAGIC = 12, // also Dark Restore
256  SPELL_CATEGORY_UNK19 = 19, // instant spells
281  SPELL_CATEGORY_TRANQUILITY = 46, // also Strider Presence
284  SPELL_CATEGORY_UNK50 = 50, // Breath ?
289  SPELL_CATEGORY_SHILED_WARD = 56, // shields, wards
290  SPELL_CATEGORY_GROWL_FORTITUDE = 57, // growl of fortitude
299  SPELL_CATEGORY_THROW_SHOOT = 76, // throw, shoot, shot bow
301  SPELL_CATEGORY_THREAT = 82, // threat related spells, taunt, cower, feint
305  SPELL_CATEGORY_INTERRUPT_CAST = 88, // pummel, kick, etc
323  SPELL_CATEGORY_PYROBLAST = 290, // also solarburn
326  SPELL_CATEGORY_SHOOT_2 = 351, // Shoot, Shoot (TEST)
348  SPELL_CATEGORY_HOLY_SHIELD = 931, // also Black Temple Tan...
363  SPELL_CATEGORY_UNK1139 = 1139, // SUMMONS
366  SPELL_CATEOGRY_UNK1142 = 1143, // 2 SPELLS
374  SPELL_CATEGORY_UNK1158 = 1158, // INTERCEPT, ETC
406 };
407 
409 {
410  0xff9d9d9d, //GREY
411  0xffffffff, //WHITE
412  0xff1eff00, //GREEN
413  0xff0070dd, //BLUE
414  0xffa335ee, //PURPLE
415  0xffff8000, //ORANGE
416  0xffe6cc80 //LIGHT YELLOW
417 };
418 
419 // ***********************************
420 // Spell Attributes definitions
421 // ***********************************
422 
424 {
426  SPELL_ATTR0_RANGED = 0x00000002, // 1 All ranged abilities have this flag
427  SPELL_ATTR0_ON_NEXT_SWING_1 = 0x00000004, // 2 on next swing
428  SPELL_ATTR0_UNK3 = 0x00000008, // 3 not set in 2.4.2
429  SPELL_ATTR0_ABILITY = 0x00000010, // 4 client puts 'ability' instead of 'spell' in game strings for these spells
430  SPELL_ATTR0_TRADESPELL = 0x00000020, // 5 trade spells, will be added by client to a sublist of profession spell
431  SPELL_ATTR0_PASSIVE = 0x00000040, // 6 Passive spell
432  SPELL_ATTR0_HIDDEN_CLIENTSIDE = 0x00000080, // 7 Spells with this attribute are not visible in spellbook or aura bar
433  SPELL_ATTR0_HIDDEN_CAST_TIME = 0x00000100, // 8 Hide Cast Time
434  SPELL_ATTR0_TARGET_MAINHAND_ITEM = 0x00000200, // 9 Client automatically selects item from mainhand slot as a cast target
435  SPELL_ATTR0_ON_NEXT_SWING_2 = 0x00000400, // 10
436  SPELL_ATTR0_UNK11 = 0x00000800, // 11
437  SPELL_ATTR0_DAYTIME_ONLY = 0x00001000, // 12 only useable at daytime, not set in 2.4.2
438  SPELL_ATTR0_NIGHT_ONLY = 0x00002000, // 13 only useable at night, not set in 2.4.2
439  SPELL_ATTR0_INDOORS_ONLY = 0x00004000, // 14 only useable indoors, not set in 2.4.2
440  SPELL_ATTR0_OUTDOORS_ONLY = 0x00008000, // 15 Only useable outdoors.
441  SPELL_ATTR0_NOT_SHAPESHIFT = 0x00010000, // 16 Not while shapeshifted
442  SPELL_ATTR0_ONLY_STEALTHED = 0x00020000, // 17 Must be in stealth
443  SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE = 0x00040000, // 18 client won't hide unit weapons in sheath on cast/channel
444  SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION = 0x00080000, // 19 spelldamage depends on caster level
445  SPELL_ATTR0_STOP_ATTACK_TARGET = 0x00100000, // 20 Stop attack after use this spell (and not begin attack if use)
446  SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK = 0x00200000, // 21 Cannot be dodged/parried/blocked
447  SPELL_ATTR0_CAST_TRACK_TARGET = 0x00400000, // 22 Client automatically forces player to face target when casting
448  SPELL_ATTR0_CASTABLE_WHILE_DEAD = 0x00800000, // 23 castable while dead?
449  SPELL_ATTR0_CASTABLE_WHILE_MOUNTED = 0x01000000, // 24 castable while mounted
450  SPELL_ATTR0_DISABLED_WHILE_ACTIVE = 0x02000000, // 25 Activate and start cooldown after aura fade or remove summoned creature or go
451  SPELL_ATTR0_NEGATIVE_1 = 0x04000000, // 26 Many negative spells have this attr
452  SPELL_ATTR0_CASTABLE_WHILE_SITTING = 0x08000000, // 27 castable while sitting
453  SPELL_ATTR0_CANT_USED_IN_COMBAT = 0x10000000, // 28 Cannot be used in combat
454  SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY = 0x20000000, // 29 unaffected by invulnerability (hmm possible not...)
455  SPELL_ATTR0_HEARTBEAT_RESIST_CHECK = 0x40000000, // 30 [NYI] random chance the effect will end
456  SPELL_ATTR0_CANT_CANCEL = 0x80000000 // 31 positive aura can't be canceled
457 };
458 
460 {
461  SPELL_ATTR1_DISMISS_PET = 0x00000001, // 0 for spells without this flag client doesn't allow to summon pet if caster has a pet
462  SPELL_ATTR1_DRAIN_ALL_POWER = 0x00000002, // 1 use all power (Only paladin Lay of Hands and Bunyanize)
463  SPELL_ATTR1_CHANNELED_1 = 0x00000004, // 2
465  SPELL_ATTR1_UNK4 = 0x00000010, // 4 stealth and whirlwind
466  SPELL_ATTR1_NOT_BREAK_STEALTH = 0x00000020, // 5 Not break stealth
467  SPELL_ATTR1_CHANNELED_2 = 0x00000040, // 6
468  SPELL_ATTR1_CANT_BE_REFLECTED = 0x00000080, // 7
469  SPELL_ATTR1_CANT_TARGET_IN_COMBAT = 0x00000100, // 8 can target only out of combat units
470  SPELL_ATTR1_MELEE_COMBAT_START = 0x00000200, // 9 [NYI] player starts melee combat after this spell is cast
471  SPELL_ATTR1_NO_THREAT = 0x00000400, // 10 no generates threat on cast
472  SPELL_ATTR1_UNK11 = 0x00000800, // 11
473  SPELL_ATTR1_PICKPOCKET = 0x00001000, // 12 pickpocket
474  SPELL_ATTR1_FARSIGHT = 0x00002000, // 13 Client removes farsight on aura loss
475  SPELL_ATTR1_CHANNEL_TRACK_TARGET = 0x00004000, // 14 Client automatically forces player to face target when channeling
476  SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY = 0x00008000, // 15 remove auras on immunity
477  SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE = 0x00010000, // 16 unaffected by school immunity
479  SPELL_ATTR1_UNK18 = 0x00040000, // 18 Mini stuns, stuns, polymorphs
480  SPELL_ATTR_CANT_TARGET_SELF = 0x00080000, // 19
481  SPELL_ATTR1_REQ_COMBO_POINTS1 = 0x00100000, // 20 Req combo points on target
482  SPELL_ATTR1_UNK21 = 0x00200000, // 21 used by spells that modify aggro range such as Mind Soothe, Lurk and Brute Cologne
483  SPELL_ATTR1_REQ_COMBO_POINTS2 = 0x00400000, // 22 Req combo points on target
484  SPELL_ATTR1_UNK23 = 0x00800000, // 23 snake trap effect
485  SPELL_ATTR1_IS_FISHING = 0x01000000, // 24 only fishing spells
486  SPELL_ATTR1_UNK25 = 0x02000000, // 25 not set in 2.4.2
487  SPELL_ATTR1_UNK26 = 0x04000000, // 26
488  SPELL_ATTR1_UNK27 = 0x08000000, // 27
489  SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR = 0x10000000, // 28 client doesn't display these spells in aura bar
490  SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME = 0x20000000, // 29 spell name is displayed in cast bar instead of 'channeling' text
491  SPELL_ATTR1_ENABLE_AT_DODGE = 0x40000000, // 30 Overpower
492  SPELL_ATTR1_UNK31 = 0x80000000 // 31
493 };
494 
496 {
497  SPELL_ATTR2_CAN_TARGET_DEAD = 0x00000001, // 0 can target dead unit or corpse
498  SPELL_ATTR2_UNK1 = 0x00000002, // 1 Used by shadowform, ghost wolf, vanish
499  SPELL_ATTR2_IGNORE_LOS = 0x00000004, // 2
500  SPELL_ATTR2_UNK3 = 0x00000008, // 3
501  SPELL_ATTR2_DISPLAY_IN_STANCE_BAR = 0x00000010, // 4 client displays icon in stance bar when learned, even if not shapeshift
502  SPELL_ATTR2_AUTOREPEAT_FLAG = 0x00000020, // 5
503  SPELL_ATTR2_REQUIRE_TAPPED_BY_CASTER = 0x00000040, // 6 Requires untapped by other players/groups target. Polymorph, Banish, Recharging Battery
504  SPELL_ATTR2_UNK7 = 0x00000080, // 7
505  SPELL_ATTR2_UNK8 = 0x00000100, // 8 not set in 2.4.2
506  SPELL_ATTR2_UNK9 = 0x00000200, // 9 used by 30421,30466,42454
507  SPELL_ATTR2_UNK10 = 0x00000400, // 10
508  SPELL_ATTR2_HEALTH_FUNNEL = 0x00000800, // 11
509  SPELL_ATTR2_UNK12 = 0x00001000, // 12
510  SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA = 0x00002000, // 13 Items enchanted by spells with this flag preserve the enchant to arenas
511  SPELL_ATTR2_UNK14 = 0x00004000, // 14
512  SPELL_ATTR2_UNK15 = 0x00008000, // 15 not set in 2.4.2
513  SPELL_ATTR2_TAME_BEAST = 0x00010000, // 16
514  SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS = 0x00020000, // 17 don't reset timers for melee autoattacks (swings) or ranged autoattacks (autoshoots)
515  SPELL_ATTR2_REQ_DEAD_PET = 0x00040000, // 18 Only Revive pet - possible req dead pet
516  SPELL_ATTR2_NOT_NEED_SHAPESHIFT = 0x00080000, // 19 does not necessarly need shapeshift
517  SPELL_ATTR2_MUST_BE_BEHIND_TARGET = 0x00100000, // 20 spells that requires to be behind the target, there's also one spell judgement (41467) - but this one is not the paladins'
518  SPELL_ATTR2_UNK21 = 0x00200000, // 21
519  SPELL_ATTR2_UNK22 = 0x00400000, // 22
520  SPELL_ATTR2_IS_ARCANE_CONCENTRATION = 0x00800000, // 23 Only mage Arcane Concentration have this flag
521  SPELL_ATTR2_UNK24 = 0x01000000, // 24
522  SPELL_ATTR2_UNK25 = 0x02000000, // 25
523  SPELL_ATTR2_UNK26 = 0x04000000, // 26 unaffected by school immunity
524  SPELL_ATTR2_UNK27 = 0x08000000, // 27 fishing (profession), and enchant (2H) weapon
525  SPELL_ATTR2_UNK28 = 0x10000000, // 28
526  SPELL_ATTR2_CANT_CRIT = 0x20000000, // 29 Spell can't crit
527  SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC = 0x40000000, // 30 spell can trigger even if triggered
528  SPELL_ATTR2_FOOD = 0x80000000 // 31 food, well-fed, and a few others
529 };
530 
532 {
533  SPELL_ATTR3_UNK0 = 0x00000001, // 0
534  SPELL_ATTR3_UNK1 = 0x00000002, // 1
535  SPELL_ATTR3_UNK2 = 0x00000004, // 2
536  SPELL_ATTR3_CAN_BE_BLOCKED = 0x00000008, // 3
537  SPELL_ATTR3_IGNORE_RESURRECTION_TIMER = 0x00000010, // 4 you don't have to wait to be resurrected with these spells
538  SPELL_ATTR3_UNK5 = 0x00000020, // 5
539  SPELL_ATTR3_UNK6 = 0x00000040, // 6
540  SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // 7 [NYI] separate stack for every caster
541  SPELL_ATTR3_PLAYERS_ONLY = 0x00000100, // 8 Player only?
542  SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 = 0x00000200, // 9 triggered from effect?
543  SPELL_ATTR3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required
544  SPELL_ATTR3_BATTLEGROUND = 0x00000800, // 11 Can casted only on battleground
545  SPELL_ATTR3_CAST_ON_DEAD = 0x00001000, // 12 target is a dead player (not every spell has this flag)
546  SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR = 0x00002000, // 13 Clientside attribute - will not display channeling bar
547  SPELL_ATTR3_HONORLESS = 0x00004000, // 14 "Honorless Target" only this spells have this flag
548  SPELL_ATTR3_AUTO_SHOT = 0x00008000, // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
549  SPELL_ATTR3_CANT_TRIGGER_PROC = 0x00010000, // 16 confirmed with many patchnotes
550  SPELL_ATTR3_NO_INITIAL_AGGRO = 0x00020000, // 17 no initial aggro
551  SPELL_ATTR3_CANT_MISS = 0x00040000, // 18 Spell should always hit its target
552  SPELL_ATTR3_DISABLE_PROC = 0x00080000, // 19 during aura proc no spells can trigger
553  SPELL_ATTR3_DEATH_PERSISTENT = 0x00100000, // 20 Death persistent spells
554  SPELL_ATTR3_UNK21 = 0x00200000, // 21 used by nature's grasp.
555  SPELL_ATTR3_REQ_WAND = 0x00400000, // 22 Req wand used by Shoot
556  SPELL_ATTR3_UNK23 = 0x00800000, // 23 used by Uber Heal over Time, Debuff Uber Heal Over Time, Create Pumpkin Treats (,stackable too)
557  SPELL_ATTR3_REQ_OFFHAND = 0x01000000, // 24 Req offhand weapon
558  SPELL_ATTR3_UNK25 = 0x02000000, // 25
559  SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED = 0x04000000, // 26 [NYI] auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2
560  SPELL_ATTR3_UNK27 = 0x08000000, // 27
561  SPELL_ATTR3_HAS_VISUAL_EFFECT = 0x10000000, // 28
562  SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells
563  SPELL_ATTR3_DONT_DISPLAY_RANGE = 0x40000000, // 30 client doesn't display range in tooltip for those spells
564  SPELL_ATTR3_UNK31 = 0x80000000 // 31
565 };
566 
568 {
569  SPELL_ATTR4_IGNORE_RESISTANCES = 0x00000001, // 0 spells with this attribute will completely ignore the target's resistance (these spells can't be resisted)
570  SPELL_ATTR4_PROC_ONLY_ON_CASTER = 0x00000002, // 1 proc only on effects with TARGET_UNIT_CASTER?
571  SPELL_ATTR4_EXPIRE_OFFLINE = 0x00000004, // 2 Aura continues to expire while logged out
572  SPELL_ATTR4_UNK3 = 0x00000008, // 3
573  SPELL_ATTR4_UNK4 = 0x00000010, // 4
574  SPELL_ATTR4_UNK5 = 0x00000020, // 5
575  SPELL_ATTR4_NOT_STEALABLE = 0x00000040, // 6 although such auras might be dispellable, they cannot be stolen
576  SPELL_ATTR4_TRIGGERED = 0x00000080, // 7 spells forced to be triggered
577  SPELL_ATTR4_UNK8 = 0x00000100, // 8
578  SPELL_ATTR4_TRIGGER_ACTIVATE = 0x00000200, // 9 initially disabled / trigger activate from event (Execute, Riposte, Deep Freeze end other)
579  SPELL_ATTR4_SPELL_VS_EXTEND_COST = 0x00000400, // 10 Rogue Shiv have this flag
580  SPELL_ATTR4_UNK11 = 0x00000800, // 11
581  SPELL_ATTR4_UNK12 = 0x00001000, // 12
582  SPELL_ATTR4_UNK13 = 0x00002000, // 13
583  SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS = 0x00004000, // 14 doesn't break auras by damage from these spells
584  SPELL_ATTR4_UNK15 = 0x00008000, // 15
585  SPELL_ATTR4_NOT_USABLE_IN_ARENA = 0x00010000, // 16 not usable in arena
586  SPELL_ATTR4_USABLE_IN_ARENA = 0x00020000, // 17 usable in arena
587  SPELL_ATTR4_AREA_TARGET_CHAIN = 0x00040000, // 18 [NYI] hits area targets one after another instead of all at once
588  SPELL_ATTR4_UNK19 = 0x00080000, // 19
589  SPELL_ATTR4_UNK20 = 0x00100000, // 20
590  SPELL_ATTR4_STANCES = 0x00200000, // 21 stances, shapeshifts, etc.
591  SPELL_ATTR4_UNK22 = 0x00400000, // 22 used by seal of command (20424,42058)
592  SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS = 0x00800000, // 23 Used by spells that cannot trigger item procs such as enchants
593  SPELL_ATTR4_AUTOSHOT = 0x01000000, // 24
594  SPELL_ATTR4_SCALE_PET = 0x02000000, // 25 pet scaling auras
595  SPELL_ATTR4_CAST_ONLY_IN_OUTLAND = 0x04000000, // 26 Can only be used in Outland.
596  SPELL_ATTR4_UNK27 = 0x08000000, // 27
597  SPELL_ATTR4_UNK28 = 0x10000000, // 28
598  SPELL_ATTR4_UNK29 = 0x20000000, // 29
599  SPELL_ATTR4_UNK30 = 0x40000000, // 30
600  SPELL_ATTR4_UNK31 = 0x80000000 // 31 Polymorph: Chicken (228), Sonic Boom (38052,38488)
601 };
602 
604 {
605  SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING = 0x00000001, // 0 don't interrupt channeling spells when moving
606  SPELL_ATTR5_NO_REAGENT_WHILE_PREP = 0x00000002, // 1 not need reagents if UNIT_FLAG_PREPARATION
607  SPELL_ATTR5_UNK2 = 0x00000004, // 2 used by infected bite, transporter malfunction, curse of recklessness, Blessing of Blacfathom
608  SPELL_ATTR5_USABLE_WHILE_STUNNED = 0x00000008, // 3 usable while stunned
609  SPELL_ATTR5_UNK4 = 0x00000010, // 4 used by 8944,24937,40902,41268,41269,41271
610  SPELL_ATTR5_SINGLE_TARGET_SPELL = 0x00000020, // 5 Only one target can be apply at a time
611  SPELL_ATTR5_UNK6 = 0x00000040, // 6
612  SPELL_ATTR5_UNK7 = 0x00000080, // 7
613  SPELL_ATTR5_UNK8 = 0x00000100, // 8 used by 33645,36310,39923,40620,45889
614  SPELL_ATTR5_START_PERIODIC_AT_APPLY = 0x00000200, // 9 Start Periodic At apply
615  SPELL_ATTR5_HIDE_DURATION = 0x00000400, // 10 do not send duration to client
616  SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET = 0x00000800, // 11 [NYI] uses target's target as target if original target not valid (intervene for example)
617  SPELL_ATTR5_UNK12 = 0x00001000, // 12
618  SPELL_ATTR5_HASTE_AFFECT_DURATION = 0x00002000, // 13 haste effects decrease duration of this
619  SPELL_ATTR5_UNK14 = 0x00004000, // 14 used by raise dead, flame wave and haste other
620  SPELL_ATTR5_MULTI_TARGET = 0x00008000, // 15 used by multi-target spells: cleave,multi-shot,thunder clap and more
621  SPELL_ATTR5_UNK16 = 0x00010000, // 16 used by One-Handed Weapon Specialization rank 1-5 - talent,passive (20196-20200) all have Attributes set to 464
622  SPELL_ATTR5_USABLE_WHILE_FEARED = 0x00020000, // 17 usable while feared
623  SPELL_ATTR5_USABLE_WHILE_CONFUSED = 0x00040000, // 18 usable while confused
624  SPELL_ATTR5_DONT_TURN_DURING_CAST = 0x00080000, // 19 Blocks caster's turning when casting (client does not automatically turn caster's model to face UNIT_FIELD_TARGET)
625  SPELL_ATTR5_SPECIAL_MOUNT = 0x00100000, // 20 used by mount transformators, also by black qiraji and dragonmaw illusion
626  SPELL_ATTR5_UNK21 = 0x00200000, // 21 used by demonice sacrifice, BM Only OFF/ON, BM OFF, Terun Rift, "Damage", Rocket Bot Attack
627  SPELL_ATTR5_UNK22 = 0x00400000, // 22 used by spells Hex Lord Malacrass casts (player based), Hex Lord Adds also and also Flame Wreath from Aran
628  SPELL_ATTR5_UNK23 = 0x00800000, // 23 used by ignite, shadow work: death
629  SPELL_ATTR5_UNK24 = 0x01000000, // 24
630  SPELL_ATTR5_UNK25 = 0x02000000, // 25 used by one spell - Death Lightning, doesn't seem to be used anywhere
631  SPELL_ATTR5_UNK26 = 0x04000000, // 26 used by thunder clap and seed of corruption
632  SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST = 0x08000000, // 27 Auras with this attribute are not visible on units that are the caster
633  SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST = 0x10000000, // 28 Auras with this attribute are not visible on units that are not the caster
634  SPELL_ATTR5_UNK29 = 0x20000000, // 29 used by Might of Froswolf (46389) and Honor of the Stormpeak (46391)
635  SPELL_ATTR5_UNK30 = 0x40000000, // 30 used by ahune spells (45937,45938,45945,46314)
636  SPELL_ATTR5_TAUNT = 0x80000000 // 31 Forces all nearby enemies to focus attacks to caster Taunt, Challenging Roar, etc.
637 };
638 
640 {
641  SPELL_ATTR6_UNK0 = 0x00000001, // 0 Only Move spell have this flag
642  SPELL_ATTR6_UNK1 = 0x00000002, // 1 not set in 2.4.2
644  SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG = 0x00000008, // 3 [NYI] skips checking UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC flags on assist
645  SPELL_ATTR6_UNK4 = 0x00000010, // 4 not set in 2.4.2
646  SPELL_ATTR6_UNK5 = 0x00000020, // 5
647  SPELL_ATTR6_CAN_TARGET_INVISIBLE = 0x00000040, // 6 not set in 2.4.3
648  SPELL_ATTR6_UNK7 = 0x00000080, // 7
649  SPELL_ATTR6_UNK8 = 0x00000100, // 8
650  SPELL_ATTR6_UNK9 = 0x00000200, // 9 not set in 2.4.2
651  SPELL_ATTR6_UNK10 = 0x00000400, // 10
653  SPELL_ATTR6_UNK12 = 0x00001000, // 12 not set in 2.4.2
654  SPELL_ATTR6_UNK13 = 0x00002000, // 13 not set in 2.4.2
655  SPELL_ATTR6_UNK14 = 0x00004000, // 14 not set in 2.4.2
656  SPELL_ATTR6_UNK15 = 0x00008000, // 15 not set in 2.4.2
657  SPELL_ATTR6_UNK16 = 0x00010000, // 16 not set in 2.4.2
658  SPELL_ATTR6_UNK17 = 0x00020000, // 17 not set in 2.4.2
659  SPELL_ATTR6_UNK18 = 0x00040000, // 18 not set in 2.4.2
660  SPELL_ATTR6_UNK19 = 0x00080000, // 19 not set in 2.4.2
661  SPELL_ATTR6_UNK20 = 0x00100000, // 20 not set in 2.4.2
662  SPELL_ATTR6_UNK21 = 0x00200000, // 21 not set in 2.4.2
663  SPELL_ATTR6_UNK22 = 0x00400000, // 22 not set in 2.4.2
664  SPELL_ATTR6_UNK23 = 0x00800000, // 23 not set in 2.4.2
665  SPELL_ATTR6_UNK24 = 0x01000000, // 24 not set in 2.4.2
666  SPELL_ATTR6_UNK25 = 0x02000000, // 25 not set in 2.4.2
667  SPELL_ATTR6_UNK26 = 0x04000000, // 26 not set in 2.4.2
668  SPELL_ATTR6_UNK27 = 0x08000000, // 27 not set in 2.4.2
669  SPELL_ATTR6_UNK28 = 0x10000000, // 28 not set in 2.4.2
670  SPELL_ATTR6_NO_DMG_PERCENT_MODS = 0x20000000, // 29 not set in 2.4.2
671  SPELL_ATTR6_UNK30 = 0x40000000, // 30 not set in 2.4.2
672  SPELL_ATTR6_UNK31 = 0x80000000 // 31 not set in 2.4.2
673 };
674 
676 {
685 };
686 
687 #define MAX_SHEATHETYPE 8
688 
690 {
705  SLOT_BACK = 14,
711 };
712 
714 {
733  LANG_ADDON = 0xFFFFFFFF // used by addons, in 2.4.0 not exit, replaced by messagetype?
734 };
735 
736 #define LANGUAGES_COUNT 19
737 
738 enum TeamId
739 {
743 };
744 
745 enum Team
746 {
747  TEAM_NONE = 0, // if ReputationListId > 0 && Flags != FACTION_FLAG_TEAM_HEADER
748  HORDE = 67,
749  ALLIANCE = 469,
750  //TEAM_STEAMWHEEDLE_CARTEL = 169, // not used in code
751  //TEAM_ALLIANCE_FORCES = 891,
752  //TEAM_HORDE_FORCES = 892,
753  //TEAM_SANCTUARY = 936,
754  //TEAM_OUTLAND = 980,
755 };
756 
758 {
800  SPELL_EFFECT_41 = 41, // not set: old SPELL_EFFECT_SUMMON_WILD
801  SPELL_EFFECT_42 = 42, // not set: old SPELL_EFFECT_SUMMON_GUARDIAN
832  SPELL_EFFECT_73 = 73, // not set: old SPELL_EFFECT_SUMMON_POSSESSED
833  SPELL_EFFECT_74 = 74, // not set: old SPELL_EFFECT_SUMMON_TOTEM
846  SPELL_EFFECT_87 = 87, // not set: old SPELL_EFFECT_SUMMON_TOTEM_SLOT1
847  SPELL_EFFECT_88 = 88, // not set: old SPELL_EFFECT_SUMMON_TOTEM_SLOT2
848  SPELL_EFFECT_89 = 89, // not set: old SPELL_EFFECT_SUMMON_TOTEM_SLOT3
849  SPELL_EFFECT_90 = 90, // not set: old SPELL_EFFECT_SUMMON_TOTEM_SLOT4
852  SPELL_EFFECT_93 = 93, // not set: old SPELL_EFFECT_SUMMON_PHANTASM
856  SPELL_EFFECT_97 = 97, // not set: old SPELL_EFFECT_SUMMON_CRITTER
871  SPELL_EFFECT_112 = 112, // not set: old SPELL_EFFECT_SUMMON_DEMON
881  SPELL_EFFECT_122 = 122, // not set
900  SPELL_EFFECT_141 = 141, // one spell: bloodbolt
904  SPELL_EFFECT_145 = 145, // one spell: black hole effect
905  SPELL_EFFECT_ACTIVATE_RUNE = 146, // not set
907  SPELL_EFFECT_148 = 148, // not set
909  SPELL_EFFECT_150 = 150, // not set
911  SPELL_EFFECT_SUMMON_FRIEND = 152, // one spell: Summon Friend
914 };
915 
916 // Spell aura states
918 {
919  // (C) used in caster aura state (T) used in target aura state
920  // (c) used in caster aura state-not (t) used in target aura state-not
921  AURA_STATE_DEFENSE = 1, // C |
923  AURA_STATE_BERSERKING = 3, // C T |
924  //AURA_STATE_UNKNOWN4 = 4, // c t| some limitation to charge spells (?) and target test spells
926  //AURA_STATE_UNKNOWN6 = 6, // | not used
928  AURA_STATE_ROGUE_ATTACK_FROM_STEALTH = 7, // C | FIX ME: not implemented yet!
929  //AURA_STATE_UNKNOWN7c = 7, // c | random/focused bursts spells (?)
930  //AURA_STATE_UNKNOWN8 = 8, // | not used
931  //AURA_STATE_UNKNOWN9 = 9, // | not used
932  AURA_STATE_WARRIOR_VICTORY_RUSH = 10, // C | warrior victory rush
933  AURA_STATE_HUNTER_CRIT_STRIKE = 10, // C | hunter crit strike
934  AURA_STATE_CRIT = 11, // C |
937  AURA_STATE_IMMOLATE = 14, // T |
938  AURA_STATE_SWIFTMEND = 15, // T |
943 };
944 
945 // Spell mechanics
947 {
956  MECHANIC_PACIFY = 8, //0 spells use this mechanic
970  MECHANIC_PERSUADE = 22, //0 spells use this mechanic
977  MECHANIC_IMMUNE_SHIELD = 29, // Divine (Blessing) Shield/Protection and Ice Block
979 };
980 
981 // Used for spell 42292 Immune Movement Impairment and Loss of Control (0x49967da6)
982 #define IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK (\
983  (1<<MECHANIC_CHARM)|(1<<MECHANIC_CONFUSED)|(1<<MECHANIC_FEAR)| \
984  (1<<MECHANIC_ROOT)|(1<<MECHANIC_PACIFY)|(1<<MECHANIC_SLEEP)| \
985  (1<<MECHANIC_SNARE)|(1<<MECHANIC_STUN)|(1<<MECHANIC_FREEZE)| \
986  (1<<MECHANIC_KNOCKOUT)|(1<<MECHANIC_POLYMORPH)|(1<<MECHANIC_BANISH)| \
987  (1<<MECHANIC_SHACKLE)|(1<<MECHANIC_TURN)|(1<<MECHANIC_HORROR)| \
988  (1<<MECHANIC_DAZE)|(1<<MECHANIC_SAPPED))
989 
990 // Spell dispell type
992 {
1004 };
1005 
1006 #define DISPEL_ALL_MASK ((1<<DISPEL_MAGIC) | (1<<DISPEL_CURSE) | (1<<DISPEL_DISEASE) | (1<<DISPEL_POISON))
1007 
1008 //To all Immune system,if target has immunes,
1009 //some spell that related to ImmuneToDispel or ImmuneToSchool or ImmuneToDamage type can't cast to it,
1010 //some spell_effects that related to ImmuneToEffect<effect>(only this effect in the spell) can't cast to it,
1011 //some aura(related to Mechanics or ImmuneToState<aura>) can't apply to it.
1013 {
1014  IMMUNITY_EFFECT = 0, // enum SpellEffects
1015  IMMUNITY_STATE = 1, // enum AuraType
1016  IMMUNITY_SCHOOL = 2, // enum SpellSchoolMask
1017  IMMUNITY_DAMAGE = 3, // enum SpellSchoolMask
1018  IMMUNITY_DISPEL = 4, // enum DispelType
1019  IMMUNITY_MECHANIC = 5, // enum Mechanics
1021 };
1022 
1023 #define MAX_SPELL_IMMUNITY 7
1024 
1026 {
1029  TARGET_UNIT_NEARBY_ENEMY = 2, // only one spell has that, but regardless, it's a target type after all
1036  TARGET_DST_HOME = 9, // uses in teleport to innkeeper spells
1037  TARGET_UNIT_TARGET_DEST_CASTER = 11, // teleport target to caster
1040  TARGET_DST_DB = 17, // uses in teleport spells and some other
1051  TARGET_DEST_DYNOBJ_ALLY = 29, // only for effect 27
1052  TARGET_UNIT_AREA_ALLY_SRC = 30, // in TargetB used only with TARGET_SRC_CASTER and in self casting range in TargetA
1056  TARGET_UNIT_AREA_PARTY_DST = 34, // used in Tranquility
1063  TARGET_DEST_CASTER_FRONT_LEFT = 41, //earth totem
1064  TARGET_DEST_CASTER_BACK_LEFT = 42, //water totem
1075  TARGET_DST_TARGET_ENEMY = 53, // set unit coordinates as dest, only 16 target B imlemented
1076  TARGET_UNIT_CONE_ENEMY_UNKNOWN = 54, // 180 degree, or different angle
1077  TARGET_DEST_CASTER_FRONT_LEAP = 55, // for a leap spell
1084  TARGET_TEST = 62, // for a test spell
1087  TARGET_DEST_TARGET_BACK = 65, // uses in teleport behind spells
1114 };
1115 
1116 #define TOTAL_SPELL_TARGETS 94
1117 
1119 {
1120  /*TARGET_FLAG_NONE = 0x0000,
1121  TARGET_FLAG_SWIMMER = 0x0002,
1122  TARGET_FLAG_ITEM = 0x0010,
1123  TARGET_FLAG_SOURCE_AREA = 0x0020,
1124  TARGET_FLAG_DEST_AREA = 0x0040,
1125  TARGET_FLAG_UNKNOWN = 0x0080,
1126  TARGET_FLAG_SELF = 0x0100,
1127  TARGET_FLAG_PVP_CORPSE = 0x0200,
1128  TARGET_FLAG_MASS_SPIRIT_HEAL = 0x0400,
1129  TARGET_FLAG_BEAST_CORPSE = 0x0402,
1130  TARGET_FLAG_OBJECT = 0x4000,
1131  TARGET_FLAG_RESURRECTABLE = 0x8000*/
1132 
1133  TARGET_FLAG_SELF = 0x00000000,
1134  TARGET_FLAG_UNIT = 0x00000002, // pguid
1135  TARGET_FLAG_ITEM = 0x00000010, // pguid
1136  TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // 3 float
1137  TARGET_FLAG_DEST_LOCATION = 0x00000040, // 3 float
1138  TARGET_FLAG_OBJECT_UNK = 0x00000080, // ?
1139  TARGET_FLAG_PVP_CORPSE = 0x00000200, // pguid
1140  TARGET_FLAG_OBJECT = 0x00000800, // pguid
1141  TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid
1142  TARGET_FLAG_STRING = 0x00002000, // string
1143  TARGET_FLAG_GAMEOBJECT_ITEM = 0x00004000, // 199 spells, opening object/lock
1144  TARGET_FLAG_CORPSE = 0x00008000, // pguid
1145  TARGET_FLAG_UNK2 = 0x00010000 // pguid
1146 };
1147 
1149 {
1162 };
1163 
1165 {
1171 };
1172 
1174 {
1179 };
1180 
1182 {
1186 };
1187 
1189 {
1359 
1360  SPELL_CAST_OK = 0xFF // custom value, don't must be send to client
1361 };
1362 
1364 {
1367 
1369 };
1370 
1372 {
1385 
1387 };
1388 
1390 {
1393 
1395 };
1396 
1398 {
1401 };
1402 
1405 {
1407  SPELL_RANGE_IDX_COMBAT = 2, //< often ~5.5 (but infact dynamic melee combat range)
1408  SPELL_RANGE_IDX_ANYWHERE = 13, //< 500000 (anywhere)
1409 };
1410 
1412 {
1448 };
1449 
1450 #define MAX_GAMEOBJECT_TYPE 35 // sending to client this or greater value can crash client.
1451 
1452 #define GAMEOBJECT_FISHINGNODE_ENTRY 35591 // Better to define it somewhere instead of hardcoding everywhere
1453 
1455 {
1456  GO_FLAG_IN_USE = 0x00000001, //disables interaction while animated
1457  GO_FLAG_LOCKED = 0x00000002, //require key, spell, event, etc to be opened. Makes "Locked" appear in tooltip
1458  GO_FLAG_INTERACT_COND = 0x00000004, //cannot interact (condition to interact)
1459  GO_FLAG_TRANSPORT = 0x00000008, //any kind of transport? Object can transport (elevator, boat, car)
1460  GO_FLAG_NOT_SELECTABLE = 0x00000010, // not selectable even in GM mode
1461  GO_FLAG_NODESPAWN = 0x00000020, //never despawn, typically for doors, they just change state
1462  GO_FLAG_TRIGGERED = 0x00000040 //typically, summoned objects. Triggered by spell or other events
1463 };
1464 
1466 {
1467  GO_DYNFLAG_LO_ACTIVATE = 0x01, // enables interaction with GO
1468  GO_DYNFLAG_LO_ANIMATE = 0x02, // possibly more distinct animation of GO
1469  GO_DYNFLAG_LO_NO_INTERACT = 0x04, // appears to disable interaction (not fully verified)
1470  GO_DYNFLAG_LO_SPARKLE = 0x08, // makes GO sparkle
1471 };
1472 
1474 {
1647 };
1648 
1649 enum Emote
1650 {
1768 };
1769 
1770 enum Anim
1771 {
1772  ANIM_STAND = 0x0,
1773  ANIM_DEATH = 0x1,
1774  ANIM_SPELL = 0x2,
1775  ANIM_STOP = 0x3,
1776  ANIM_WALK = 0x4,
1777  ANIM_RUN = 0x5,
1778  ANIM_DEAD = 0x6,
1779  ANIM_RISE = 0x7,
1786  ANIM_STUN = 0xE,
1802  ANIM_DODGE = 0x1E,
1808  ANIM_BLOCK = 0x24,
1810  ANIM_JUMP = 0x26,
1812  ANIM_FALL = 0x28,
1814  ANIM_SWIM = 0x2A,
1822  ANIM_LOOT = 0x32,
1863  ANIM_MOUNT = 0x5B,
1867  ANIM_KICK = 0x5F,
1870  ANIM_SITUP = 0x62,
1894  ANIM_EATING = 0x7A,
1899  ANIM_BIRTH = 0x7F,
1902  ANIM_HOWL = 0x82,
1903  ANIM_DROWN = 0x83,
1907  ANIM_FLY = 0x87,
1915  ANIM_SPRINT = 0x8F,
1917 
1931  ANIM_HOLD = 158,
1932  ANIM_DECAY = 159,
1939  ANIM_ARROW = 166,
1942  ANIM_SWAY = 169,
1966  ANIM_HOVER = 193,
1973  ANIM_LAND = 200,
1997 };
1998 
2000 {
2004 };
2005 
2007 {
2027 };
2028 
2029 enum TrainerType // this is important type for npcs!
2030 {
2032  TRAINER_TYPE_MOUNTS = 1, // on blizz it's 2
2035 };
2036 
2037 #define MAX_TRAINER_TYPE 4
2038 
2040 {
2054 };
2055 
2057 
2059 {
2092 };
2093 
2095 {
2096  CREATURE_TYPE_FLAG_TAMEABLE_PET = 0x00000001, // Makes the mob tameable (must also be a beast and have family set)
2097  CREATURE_TYPE_FLAG_GHOST_VISIBLE = 0x00000002, // Creature are also visible for not alive player. Allow gossip interaction if npcflag allow?
2098  CREATURE_TYPE_FLAG_BOSS_MOB = 0x00000004, // Changes creature's visible level to "??" in the creature's portrait - Immune Knockback.
2101  CREATURE_TYPE_FLAG_UNK5 = 0x00000020, // Sound related
2103  CREATURE_TYPE_FLAG_CAN_INTERACT_WHILE_DEAD = 0x00000080, // Player can interact with the creature if its dead (not player dead)
2104  CREATURE_TYPE_FLAG_HERB_SKINNING_SKILL = 0x00000100, // Can be looted by herbalist
2105  CREATURE_TYPE_FLAG_MINING_SKINNING_SKILL = 0x00000200, // Can be looted by miner
2106  CREATURE_TYPE_FLAG_DO_NOT_LOG_DEATH = 0x00000400, // Death event will not show up in combat log
2107  CREATURE_TYPE_FLAG_MOUNTED_COMBAT_ALLOWED = 0x00000800, // Creature can remain mounted when entering combat
2108  CREATURE_TYPE_FLAG_CAN_ASSIST = 0x00001000, // ? Can aid any player in combat if in range?
2111  CREATURE_TYPE_FLAG_ENGINEERING_SKINNING_SKILL = 0x00008000, // Can be looted by engineer
2112  CREATURE_TYPE_FLAG_EXOTIC_PET = 0x00010000, // Can be tamed by hunter as exotic pet
2113 };
2114 
2116 {
2122  CREATURE_UNKNOWN = 5 // found in 2.2.3 for 2 mobs
2123 };
2124 
2125 // values based at QuestInfo.dbc
2127 {
2137 };
2138 
2139 // values based at QuestSort.dbc
2141 {
2177 };
2178 
2180 {
2181  switch (QuestSort)
2182  {
2183  case QUEST_SORT_WARLOCK:
2184  return CLASS_WARLOCK;
2185  case QUEST_SORT_WARRIOR:
2186  return CLASS_WARRIOR;
2187  case QUEST_SORT_SHAMAN:
2188  return CLASS_SHAMAN;
2189  case QUEST_SORT_PALADIN:
2190  return CLASS_PALADIN;
2191  case QUEST_SORT_MAGE:
2192  return CLASS_MAGE;
2193  case QUEST_SORT_ROGUE:
2194  return CLASS_ROGUE;
2195  case QUEST_SORT_HUNTER:
2196  return CLASS_HUNTER;
2197  case QUEST_SORT_PRIEST:
2198  return CLASS_PRIEST;
2199  case QUEST_SORT_DRUID:
2200  return CLASS_DRUID;
2201  }
2202  return 0;
2203 }
2204 
2206 {
2208 
2294  SKILL_FURY = 256,
2310  SKILL_MAIL = 413,
2347 };
2348 
2349 #define MAX_SKILL_TYPE 770
2350 
2352 {
2353  switch (QuestSort)
2354  {
2355  case QUEST_SORT_HERBALISM:
2356  return SKILL_HERBALISM;
2357  case QUEST_SORT_FISHING:
2358  return SKILL_FISHING;
2360  return SKILL_BLACKSMITHING;
2361  case QUEST_SORT_ALCHEMY:
2362  return SKILL_ALCHEMY;
2364  return SKILL_LEATHERWORKING;
2365  case QUEST_SORT_ENGINERING:
2366  return SKILL_ENGINEERING;
2367  case QUEST_SORT_TAILORING:
2368  return SKILL_TAILORING;
2369  case QUEST_SORT_COOKING:
2370  return SKILL_COOKING;
2371  case QUEST_SORT_FIRST_AID:
2372  return SKILL_FIRST_AID;
2373  }
2374  return 0;
2375 }
2376 
2378 {
2383  SKILL_CATEGORY_SECONDARY = 9, // secondary professions
2385  SKILL_CATEGORY_PROFESSION = 11, // primary professions
2387 };
2388 
2390 {
2410 };
2411 
2413 {
2422 };
2423 
2425 {
2427 };
2428 
2429 // Some magic spells with explicit use in code
2430 enum
2431 {
2432  SPELL_DEATH_TOUCH = 5, // kill target
2433  SPELL_SUICIDE = 7, // kill caster
2446  SPELL_DUEL_BEG = 7267, // beg
2449 };
2450 
2452 {
2459 };
2460 
2461 #define MAX_WEATHER_TYPE 4
2462 
2464 {
2465  CHAT_MSG_ADDON = 0xFFFFFFFF,
2513 };
2514 
2515 #define MAX_CHAT_MSG_TYPE 0x2F
2516 
2518 {
2519  CHAT_LINK_COLOR_TALENT = 0xff4e96f7, // blue
2520  CHAT_LINK_COLOR_SPELL = 0xff71d5ff, // bright blue
2521  CHAT_LINK_COLOR_ENCHANT = 0xffffd000, // orange
2522 };
2523 
2524 // Values from ItemPetFood (power of (value-1) used for compare with CreatureFamilyEntry.petDietMask
2526 {
2535 };
2536 
2537 #define MAX_PET_DIET 9
2538 
2539 #define PET_FOLLOW_DIST 0.2f // Trinity has 1.0f
2540 #define PET_FOLLOW_ANGLE float(M_PI/2)
2541 
2542 #define CHAIN_SPELL_JUMP_RADIUS 10
2543 
2544 // Max values for Guild & Guild Bank
2545 #define GUILD_BANK_MAX_TABS 6
2546 #define GUILD_BANK_MAX_SLOTS 98
2547 #define GUILD_BANK_MAX_LOGS 24
2548 #define GUILD_EVENTLOG_MAX_ENTRIES 100
2549 #define GUILD_MAX_RANKS 10
2550 
2552 {
2553  AI_REACTION_ALERT = 0, // pre-aggro (used in client packet handler)
2554  AI_REACTION_FRIENDLY = 1, // (NOT used in client packet handler)
2555  AI_REACTION_HOSTILE = 2, // sent on every attack, triggers aggro sound (used in client packet handler)
2556  AI_REACTION_AFRAID = 3, // seen for polymorph (when AI not in control of self?) (NOT used in client packet handler)
2557  AI_REACTION_DESTROY = 4 // used on object destroy (NOT used in client packet handler)
2558 };
2559 
2560 // Diminishing Returns Types
2562 {
2563  DRTYPE_NONE = 0, // this spell is not diminished, but may have limited it's duration to 10s
2564  DRTYPE_PLAYER = 1, // this spell is diminished only when applied on players
2565  DRTYPE_ALL = 2 // this spell is diminished in every case
2566 };
2567 
2568 // Diminishing Return Groups
2570 {
2571  // Common Groups
2587  // Rogue Specific
2589  // Warlock Specific
2591  // Shared Class Specifics
2592  DIMINISHING_FREEZE, // Hunter's Freezing Trap
2593  // Other
2594  // Don't Diminish, but limit duration to 10s
2596 };
2597 
2599 {
2603 };
2604 
2606 {
2611 };
2612 
2614 {
2625 };
2626 
2628 {
2631 };
2632 
2634 {
2642 
2648 
2649  AUTH_OK = 0x0C,
2650  AUTH_FAILED = 0x0D,
2651  AUTH_REJECT = 0x0E,
2665  AUTH_BANNED = 0x1C,
2672 
2678 
2682 
2686 
2699 
2706 
2717 
2735 };
2736 
2737 // Ban function modes
2739 {
2743 };
2744 
2745 // Ban function return codes
2747 {
2751 };
2752 
2754 {
2761 };
2762 
2764 {
2765  MAIL_OK = 0,
2778 };
2779 
2781 {
2784 
2787 };
2788 
2789 // we need to stick to 1 version or half of the stuff will work for someone
2790 // others will not and opposite
2791 // will only support WoW and WoW:TBC 2.4.3 client build 8606...
2792 
2793 #define EXPECTED_OREGONCORE_CLIENT_BUILD {8606, 0}
2794 
2795 #endif
2796 
despawns when UnSummon() is called
GameobjectTypes
Targets
uint32 const CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)