TrinityCore
SpellInfo.h File Reference
#include "SharedDefines.h"
#include "DB2Structure.h"
#include "Object.h"
#include "SpellAuraDefines.h"
#include "SpellDefines.h"
#include <boost/container/flat_set.hpp>
#include <bitset>
+ Include dependency graph for SpellInfo.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SpellImplicitTargetInfo
 
struct  SpellImplicitTargetInfo::StaticData
 
struct  ImmunityInfo
 
class  SpellEffectInfo
 
struct  SpellEffectInfo::ScalingInfo
 
struct  SpellEffectInfo::StaticData
 
struct  SpellDiminishInfo
 
struct  SpellPowerCost
 
class  SpellInfo
 
struct  SpellInfo::ScalingInfo
 

Typedefs

typedef std::vector< SpellXSpellVisualEntry const * > SpellVisualVector
 
typedef std::unordered_map< uint32, SpellVisualVectorSpellVisualMap
 
typedef std::vector< AuraEffect * > AuraEffectVector
 

Enumerations

enum  SpellTargetSelectionCategories {
  TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_SELECT_CATEGORY_NEARBY,
  TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CATEGORY_TRAJ, TARGET_SELECT_CATEGORY_LINE
}
 
enum  SpellTargetReferenceTypes {
  TARGET_REFERENCE_TYPE_NONE, TARGET_REFERENCE_TYPE_CASTER, TARGET_REFERENCE_TYPE_TARGET, TARGET_REFERENCE_TYPE_LAST,
  TARGET_REFERENCE_TYPE_SRC, TARGET_REFERENCE_TYPE_DEST
}
 
enum  SpellTargetObjectTypes : uint8 {
  TARGET_OBJECT_TYPE_NONE = 0, TARGET_OBJECT_TYPE_SRC, TARGET_OBJECT_TYPE_DEST, TARGET_OBJECT_TYPE_UNIT,
  TARGET_OBJECT_TYPE_UNIT_AND_DEST, TARGET_OBJECT_TYPE_GOBJ, TARGET_OBJECT_TYPE_GOBJ_ITEM, TARGET_OBJECT_TYPE_ITEM,
  TARGET_OBJECT_TYPE_CORPSE, TARGET_OBJECT_TYPE_CORPSE_ENEMY, TARGET_OBJECT_TYPE_CORPSE_ALLY
}
 
enum  SpellTargetCheckTypes : uint8 {
  TARGET_CHECK_DEFAULT, TARGET_CHECK_ENTRY, TARGET_CHECK_ENEMY, TARGET_CHECK_ALLY,
  TARGET_CHECK_PARTY, TARGET_CHECK_RAID, TARGET_CHECK_RAID_CLASS, TARGET_CHECK_PASSENGER,
  TARGET_CHECK_SUMMONED, TARGET_CHECK_THREAT, TARGET_CHECK_TAP
}
 
enum  SpellTargetDirectionTypes {
  TARGET_DIR_NONE, TARGET_DIR_FRONT, TARGET_DIR_BACK, TARGET_DIR_RIGHT,
  TARGET_DIR_LEFT, TARGET_DIR_FRONT_RIGHT, TARGET_DIR_BACK_RIGHT, TARGET_DIR_BACK_LEFT,
  TARGET_DIR_FRONT_LEFT, TARGET_DIR_RANDOM, TARGET_DIR_ENTRY
}
 
enum  SpellEffectImplicitTargetTypes { EFFECT_IMPLICIT_TARGET_NONE = 0, EFFECT_IMPLICIT_TARGET_EXPLICIT, EFFECT_IMPLICIT_TARGET_CASTER }
 
enum  SpellSpecificType {
  SPELL_SPECIFIC_NORMAL = 0, SPELL_SPECIFIC_SEAL = 1, SPELL_SPECIFIC_AURA = 3, SPELL_SPECIFIC_STING = 4,
  SPELL_SPECIFIC_CURSE = 5, SPELL_SPECIFIC_ASPECT = 6, SPELL_SPECIFIC_TRACKER = 7, SPELL_SPECIFIC_WARLOCK_ARMOR = 8,
  SPELL_SPECIFIC_MAGE_ARMOR = 9, SPELL_SPECIFIC_ELEMENTAL_SHIELD = 10, SPELL_SPECIFIC_MAGE_POLYMORPH = 11, SPELL_SPECIFIC_WARLOCK_CORRUPTION = 17,
  SPELL_SPECIFIC_FOOD = 19, SPELL_SPECIFIC_DRINK = 20, SPELL_SPECIFIC_FOOD_AND_DRINK = 21, SPELL_SPECIFIC_PRESENCE = 22,
  SPELL_SPECIFIC_CHARM = 23, SPELL_SPECIFIC_SCROLL = 24, SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE = 25, SPELL_SPECIFIC_WARRIOR_ENRAGE = 26,
  SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT = 27, SPELL_SPECIFIC_HAND = 28, SPELL_SPECIFIC_PHASE = 29, SPELL_SPECIFIC_BANE = 30
}
 
enum  SpellCustomAttributes {
  SPELL_ATTR0_CU_ENCHANT_PROC = 0x00000001, SPELL_ATTR0_CU_CONE_BACK = 0x00000002, SPELL_ATTR0_CU_CONE_LINE = 0x00000004, SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008,
  SPELL_ATTR0_CU_NO_INITIAL_THREAT = 0x00000010, SPELL_ATTR0_CU_AURA_CC = 0x00000020, SPELL_ATTR0_CU_DONT_BREAK_STEALTH = 0x00000040, SPELL_ATTR0_CU_CAN_CRIT = 0x00000080,
  SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100, SPELL_ATTR0_CU_CHARGE = 0x00000200, SPELL_ATTR0_CU_PICKPOCKET = 0x00000400, SPELL_ATTR0_CU_DEPRECATED_ROLLING_PERIODIC = 0x00000800,
  SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF0 = 0x00001000, SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF1 = 0x00002000, SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF2 = 0x00004000, SPELL_ATTR0_CU_IGNORE_ARMOR = 0x00008000,
  SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER = 0x00010000, SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET = 0x00020000, SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET = 0x00040000, SPELL_ATTR0_CU_NEEDS_AMMO_DATA = 0x00080000,
  SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000, SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC = 0x00200000, SPELL_ATTR0_CU_DEPRECATED_LIQUID_AURA = 0x00400000, SPELL_ATTR0_CU_IS_TALENT = 0x00800000,
  SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED = 0x01000000
}
 

Functions

uint32 GetTargetFlagMask (SpellTargetObjectTypes objType)
 

Typedef Documentation

◆ AuraEffectVector

typedef std::vector<AuraEffect*> AuraEffectVector

◆ SpellVisualMap

typedef std::unordered_map<uint32, SpellVisualVector> SpellVisualMap

◆ SpellVisualVector

typedef std::vector<SpellXSpellVisualEntry const*> SpellVisualVector

Enumeration Type Documentation

◆ SpellCustomAttributes

Enumerator
SPELL_ATTR0_CU_ENCHANT_PROC 
SPELL_ATTR0_CU_CONE_BACK 
SPELL_ATTR0_CU_CONE_LINE 
SPELL_ATTR0_CU_SHARE_DAMAGE 
SPELL_ATTR0_CU_NO_INITIAL_THREAT 
SPELL_ATTR0_CU_AURA_CC 
SPELL_ATTR0_CU_DONT_BREAK_STEALTH 
SPELL_ATTR0_CU_CAN_CRIT 
SPELL_ATTR0_CU_DIRECT_DAMAGE 
SPELL_ATTR0_CU_CHARGE 
SPELL_ATTR0_CU_PICKPOCKET 
SPELL_ATTR0_CU_DEPRECATED_ROLLING_PERIODIC 
SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF0 
SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF1 
SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF2 
SPELL_ATTR0_CU_IGNORE_ARMOR 
SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER 
SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET 
SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET 
SPELL_ATTR0_CU_NEEDS_AMMO_DATA 
SPELL_ATTR0_CU_BINARY_SPELL 
SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC 
SPELL_ATTR0_CU_DEPRECATED_LIQUID_AURA 
SPELL_ATTR0_CU_IS_TALENT 
SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED 
148 {
149  SPELL_ATTR0_CU_ENCHANT_PROC = 0x00000001,
150  SPELL_ATTR0_CU_CONE_BACK = 0x00000002,
151  SPELL_ATTR0_CU_CONE_LINE = 0x00000004,
152  SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008,
154  SPELL_ATTR0_CU_AURA_CC = 0x00000020,
156  SPELL_ATTR0_CU_CAN_CRIT = 0x00000080,
157  SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100,
158  SPELL_ATTR0_CU_CHARGE = 0x00000200,
159  SPELL_ATTR0_CU_PICKPOCKET = 0x00000400,
160  SPELL_ATTR0_CU_DEPRECATED_ROLLING_PERIODIC = 0x00000800, // DO NOT REUSE
161  SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF0 = 0x00001000, // DO NOT REUSE
162  SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF1 = 0x00002000, // DO NOT REUSE
163  SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF2 = 0x00004000, // DO NOT REUSE
164  SPELL_ATTR0_CU_IGNORE_ARMOR = 0x00008000,
168  SPELL_ATTR0_CU_NEEDS_AMMO_DATA = 0x00080000,
169  SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000,
171  SPELL_ATTR0_CU_DEPRECATED_LIQUID_AURA = 0x00400000, // DO NOT REUSE
172  SPELL_ATTR0_CU_IS_TALENT = 0x00800000,
174 };
Definition: SpellInfo.h:168
Definition: SpellInfo.h:156
Definition: SpellInfo.h:161
Definition: SpellInfo.h:155
Definition: SpellInfo.h:169
Definition: SpellInfo.h:158
Definition: SpellInfo.h:163
Definition: SpellInfo.h:162
Definition: SpellInfo.h:153
Definition: SpellInfo.h:173
Definition: SpellInfo.h:152
Definition: SpellInfo.h:151
Definition: SpellInfo.h:149
Definition: SpellInfo.h:154
Definition: SpellInfo.h:171
Definition: SpellInfo.h:159
Definition: SpellInfo.h:157
Definition: SpellInfo.h:164
Definition: SpellInfo.h:150
Definition: SpellInfo.h:167
Definition: SpellInfo.h:166
Definition: SpellInfo.h:165
Definition: SpellInfo.h:172

◆ SpellEffectImplicitTargetTypes

Enumerator
EFFECT_IMPLICIT_TARGET_NONE 
EFFECT_IMPLICIT_TARGET_EXPLICIT 
EFFECT_IMPLICIT_TARGET_CASTER 
112 {
116 };
Definition: SpellInfo.h:113
Definition: SpellInfo.h:114
Definition: SpellInfo.h:115

◆ SpellSpecificType

Enumerator
SPELL_SPECIFIC_NORMAL 
SPELL_SPECIFIC_SEAL 
SPELL_SPECIFIC_AURA 
SPELL_SPECIFIC_STING 
SPELL_SPECIFIC_CURSE 
SPELL_SPECIFIC_ASPECT 
SPELL_SPECIFIC_TRACKER 
SPELL_SPECIFIC_WARLOCK_ARMOR 
SPELL_SPECIFIC_MAGE_ARMOR 
SPELL_SPECIFIC_ELEMENTAL_SHIELD 
SPELL_SPECIFIC_MAGE_POLYMORPH 
SPELL_SPECIFIC_WARLOCK_CORRUPTION 
SPELL_SPECIFIC_FOOD 
SPELL_SPECIFIC_DRINK 
SPELL_SPECIFIC_FOOD_AND_DRINK 
SPELL_SPECIFIC_PRESENCE 
SPELL_SPECIFIC_CHARM 
SPELL_SPECIFIC_SCROLL 
SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE 
SPELL_SPECIFIC_WARRIOR_ENRAGE 
SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT 
SPELL_SPECIFIC_HAND 
SPELL_SPECIFIC_PHASE 
SPELL_SPECIFIC_BANE 
120 {
133  SPELL_SPECIFIC_FOOD = 19,
142  SPELL_SPECIFIC_HAND = 28,
145 };
Definition: SpellInfo.h:130
Definition: SpellInfo.h:142
Definition: SpellInfo.h:124
Definition: SpellInfo.h:127
Definition: SpellInfo.h:138
Definition: SpellInfo.h:136
Definition: SpellInfo.h:144
Definition: SpellInfo.h:129
Definition: SpellInfo.h:141
Definition: SpellInfo.h:123
Definition: SpellInfo.h:143
Definition: SpellInfo.h:132
Definition: SpellInfo.h:128
Definition: SpellInfo.h:122
Definition: SpellInfo.h:125
Definition: SpellInfo.h:139
Definition: SpellInfo.h:131
Definition: SpellInfo.h:126
Definition: SpellInfo.h:133
Definition: SpellInfo.h:137
Definition: SpellInfo.h:135
Definition: SpellInfo.h:140
Definition: SpellInfo.h:121
Definition: SpellInfo.h:134

◆ SpellTargetCheckTypes

Enumerator
TARGET_CHECK_DEFAULT 
TARGET_CHECK_ENTRY 
TARGET_CHECK_ENEMY 
TARGET_CHECK_ALLY 
TARGET_CHECK_PARTY 
TARGET_CHECK_RAID 
TARGET_CHECK_RAID_CLASS 
TARGET_CHECK_PASSENGER 
TARGET_CHECK_SUMMONED 
TARGET_CHECK_THREAT 
TARGET_CHECK_TAP 
81  : uint8
82 {
94 };
Definition: SpellInfo.h:92
Definition: SpellInfo.h:88
Definition: SpellInfo.h:87
Definition: SpellInfo.h:83
Definition: SpellInfo.h:85
Definition: SpellInfo.h:90
Definition: SpellInfo.h:84
Definition: SpellInfo.h:89
Definition: SpellInfo.h:91
Definition: SpellInfo.h:93
uint8_t uint8
Definition: Define.h:145
Definition: SpellInfo.h:86

◆ SpellTargetDirectionTypes

Enumerator
TARGET_DIR_NONE 
TARGET_DIR_FRONT 
TARGET_DIR_BACK 
TARGET_DIR_RIGHT 
TARGET_DIR_LEFT 
TARGET_DIR_FRONT_RIGHT 
TARGET_DIR_BACK_RIGHT 
TARGET_DIR_BACK_LEFT 
TARGET_DIR_FRONT_LEFT 
TARGET_DIR_RANDOM 
TARGET_DIR_ENTRY 
97 {
109 };
Definition: SpellInfo.h:103
Definition: SpellInfo.h:104
Definition: SpellInfo.h:99
Definition: SpellInfo.h:101
Definition: SpellInfo.h:100
Definition: SpellInfo.h:98
Definition: SpellInfo.h:105
Definition: SpellInfo.h:106
Definition: SpellInfo.h:102
Definition: SpellInfo.h:108
Definition: SpellInfo.h:107

◆ SpellTargetObjectTypes

Enumerator
TARGET_OBJECT_TYPE_NONE 
TARGET_OBJECT_TYPE_SRC 
TARGET_OBJECT_TYPE_DEST 
TARGET_OBJECT_TYPE_UNIT 
TARGET_OBJECT_TYPE_UNIT_AND_DEST 
TARGET_OBJECT_TYPE_GOBJ 
TARGET_OBJECT_TYPE_GOBJ_ITEM 
TARGET_OBJECT_TYPE_ITEM 
TARGET_OBJECT_TYPE_CORPSE 
TARGET_OBJECT_TYPE_CORPSE_ENEMY 
TARGET_OBJECT_TYPE_CORPSE_ALLY 
65  : uint8
66 {
76  // only for effect target type
79 };
Definition: SpellInfo.h:77
Definition: SpellInfo.h:78
Definition: SpellInfo.h:73
Definition: SpellInfo.h:67
Definition: SpellInfo.h:70
Definition: SpellInfo.h:75
uint8_t uint8
Definition: Define.h:145
Definition: SpellInfo.h:72
Definition: SpellInfo.h:68
Definition: SpellInfo.h:69
Definition: SpellInfo.h:71
Definition: SpellInfo.h:74

◆ SpellTargetReferenceTypes

Enumerator
TARGET_REFERENCE_TYPE_NONE 
TARGET_REFERENCE_TYPE_CASTER 
TARGET_REFERENCE_TYPE_TARGET 
TARGET_REFERENCE_TYPE_LAST 
TARGET_REFERENCE_TYPE_SRC 
TARGET_REFERENCE_TYPE_DEST 
56 {
63 };
Definition: SpellInfo.h:62
Definition: SpellInfo.h:59
Definition: SpellInfo.h:57
Definition: SpellInfo.h:58
Definition: SpellInfo.h:60
Definition: SpellInfo.h:61

◆ SpellTargetSelectionCategories

Enumerator
TARGET_SELECT_CATEGORY_NYI 
TARGET_SELECT_CATEGORY_DEFAULT 
TARGET_SELECT_CATEGORY_CHANNEL 
TARGET_SELECT_CATEGORY_NEARBY 
TARGET_SELECT_CATEGORY_CONE 
TARGET_SELECT_CATEGORY_AREA 
TARGET_SELECT_CATEGORY_TRAJ 
TARGET_SELECT_CATEGORY_LINE 

Function Documentation

◆ GetTargetFlagMask()

uint32 GetTargetFlagMask ( SpellTargetObjectTypes  objType)
40 {
41  switch (objType)
42  {
54  return TARGET_FLAG_UNIT;
60  return TARGET_FLAG_ITEM;
63  default:
64  return TARGET_FLAG_NONE;
65  }
66 }
Definition: SpellInfo.h:77
Definition: SpellDefines.h:272
Definition: SpellDefines.h:270
Definition: SpellInfo.h:78
Definition: SpellDefines.h:282
Definition: SpellDefines.h:285
Definition: SpellInfo.h:73
Definition: SpellDefines.h:286
Definition: SpellInfo.h:70
Definition: SpellDefines.h:280
Definition: SpellInfo.h:75
Definition: SpellDefines.h:277
Definition: SpellInfo.h:72
Definition: SpellInfo.h:68
Definition: SpellDefines.h:275
Definition: SpellInfo.h:69
Definition: SpellInfo.h:71
Definition: SpellDefines.h:276
Definition: SpellInfo.h:74
+ Here is the caller graph for this function: