651{
674
680};
681
683{
691};
692
694{
701};
702
704{
714
717};
718
720{
730};
731
733{
745};
746
748{
752};
753
754
756{
779};
780
782{
816
819};
820
822
824{
825private:
827public:
830
831 bool IsArea() const;
837 float CalcDirectionAngle() const;
838
840 uint32 GetExplicitTargetMask(
bool& srcSet,
bool& dstSet)
const;
841
842private:
843 struct StaticData
844 {
850 };
851
852 static std::array<StaticData, TOTAL_SPELL_TARGETS> _data;
853};
854
856{
859public:
881
887
897
902
905
908
911
912private:
913 struct StaticData
914 {
917 };
918
919 static std::array<StaticData, TOTAL_SPELL_EFFECTS>
_data;
920};
921
923{
925
926public:
943 uint32 TargetCreatureType;
944 uint32 RequiresSpellFocus;
948 uint32 CasterAuraStateNot;
949 uint32 TargetAuraStateNot;
952 uint32 ExcludeCasterAuraSpell;
953 uint32 ExcludeTargetAuraSpell;
956 uint32 CategoryRecoveryTime;
957 uint32 StartRecoveryCategory;
960 uint32 AuraInterruptFlags;
961 uint32 ChannelInterruptFlags;
973 uint32 ManaPerSecondPerLevel;
974 uint32 ManaCostPercentage;
977 float Speed;
979 std::array<uint32, 2>
Totem;
980 std::array<int32, MAX_SPELL_REAGENTS> Reagent;
981 std::array<uint32, MAX_SPELL_REAGENTS> ReagentCount;
982 int32 EquippedItemClass;
983 int32 EquippedItemSubClassMask;
984 int32 EquippedItemInventoryTypeMask;
986 std::array<uint32, 2> SpellVisual;
990 std::array<char const*, 16> SpellName;
991 std::array<char const*, 16> Rank;
993 uint32 MaxAffectedTargets;
1000 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> Effects;
1001 uint32 ExplicitTargetMask;
1003
1004
1007 bool _isStackableWithRanks;
1008 bool _isSpellValid;
1009 bool _isCritCapable;
1010 bool _requireCooldownInfo;
1011
1014
1015 uint32 GetCategory()
const;
1017 bool HasEffectMechanic(
Mechanics mechanic)
const;
1019 bool HasAnyAura() const;
1020 bool HasAreaAuraEffect() const;
1021
1022 inline bool HasAttribute(
SpellAttr0 attribute)
const {
return (Attributes & attribute) != 0; }
1023 inline bool HasAttribute(
SpellAttr1 attribute)
const {
return (AttributesEx & attribute) != 0; }
1024 inline bool HasAttribute(
SpellAttr2 attribute)
const {
return (AttributesEx2 & attribute) != 0; }
1025 inline bool HasAttribute(
SpellAttr3 attribute)
const {
return (AttributesEx3 & attribute) != 0; }
1026 inline bool HasAttribute(
SpellAttr4 attribute)
const {
return (AttributesEx4 & attribute) != 0; }
1027 inline bool HasAttribute(
SpellAttr5 attribute)
const {
return (AttributesEx5 & attribute) != 0; }
1028 inline bool HasAttribute(
SpellAttr6 attribute)
const {
return (AttributesEx6 & attribute) != 0; }
1029 inline bool HasAttribute(
SpellAttr7 attribute)
const {
return (AttributesEx7 & attribute) != 0; }
1030 inline bool HasAttribute(
SpellCustomAttributes customAttribute)
const {
return (AttributesCu & customAttribute) != 0; }
1031
1032 bool IsExplicitDiscovery() const;
1033 bool IsLootCrafting() const;
1034 bool IsQuestTame() const;
1035 bool IsProfessionOrRiding() const;
1036 bool IsProfession() const;
1037 bool IsPrimaryProfession() const;
1038 bool IsPrimaryProfessionFirstRank() const;
1039 bool IsAbilityLearnedWithProfession() const;
1040 bool IsAbilityOfSkillType(
uint32 skillType)
const;
1041
1042 bool IsAffectingArea() const;
1043 bool IsTargetingArea() const;
1044 bool NeedsExplicitUnitTarget() const;
1046 bool IsChannelCategorySpell() const;
1047 bool IsSelfCast() const;
1048
1049 bool IsPassive() const;
1050 bool IsAutocastable() const;
1051 bool ComputeIsCritCapable() const;
1052 bool IsCritCapable() const;
1053 bool RequireCooldownInfo() const;
1054 void SetCritCapable(bool val);
1055 bool ComputeIsStackableWithRanks() const;
1056 bool IsStackableWithRanks() const;
1057 void SetStackableWithRanks(bool val);
1058 bool IsSpellValid() const;
1059 void SetSpellValid(bool val);
1060 bool IsPassiveStackableWithRanks() const;
1061 bool IsMultiSlotAura() const;
1062 bool IsCooldownStartedOnEvent() const;
1063 bool IsDeathPersistent() const;
1064 bool IsRequiringDeadTarget() const;
1065 bool IsAllowingDeadTarget() const;
1066 bool CanBeUsedInCombat() const;
1067 bool IsPositive() const;
1068 bool IsPositiveEffect(
uint8 effIndex)
const;
1069 bool IsChanneled() const;
1070 [[nodiscard]] bool IsActionAllowedChannel() const;
1071 bool NeedsComboPoints() const;
1072 bool IsBreakingStealth() const;
1073 bool IsRangedWeaponSpell() const;
1074 bool IsAutoRepeatRangedSpell() const;
1075
1076 bool IsAffectedBySpellMods() const;
1078
1079 bool CanPierceImmuneAura(
SpellInfo const* aura)
const;
1080 bool CanDispelAura(
SpellInfo const* aura)
const;
1081
1082 bool IsSingleTarget() const;
1083 bool IsAuraExclusiveBySpecificWith(
SpellInfo const* spellInfo)
const;
1084 bool IsAuraExclusiveBySpecificPerCasterWith(
SpellInfo const* spellInfo)
const;
1085
1090 bool CheckTargetCreatureType(
Unit const* target)
const;
1091
1092
1093 bool IsStrongerAuraActive(
Unit const* caster,
Unit const* target)
const;
1094 bool IsAuraEffectEqual(
SpellInfo const* otherSpellInfo)
const;
1095 bool ValidateAttribute6SpellDamageMods(
Unit const* caster,
const AuraEffect* auraEffect,
bool isDot)
const;
1096
1098 uint32 GetAllEffectsMechanicMask()
const;
1099 uint32 GetEffectMechanicMask(
uint8 effIndex)
const;
1100 uint32 GetSpellMechanicMaskByEffectMask(
uint32 effectMask)
const;
1102 bool HasAnyEffectMechanic() const;
1103 uint32 GetDispelMask()
const;
1105 uint32 GetExplicitTargetMask()
const;
1106
1109
1110 float GetMinRange(bool positive = false) const;
1111 float GetMaxRange(
bool positive =
false,
Unit* caster =
nullptr,
Spell* spell =
nullptr)
const;
1112
1113 int32 GetDuration()
const;
1114 int32 GetMaxDuration()
const;
1115
1116 uint32 GetMaxTicks()
const;
1117
1118 uint32 CalcCastTime(
Unit* caster =
nullptr,
Spell* spell =
nullptr)
const;
1119 uint32 GetRecoveryTime()
const;
1120
1122
1123 bool IsRanked() const;
1124 uint8 GetRank()
const;
1125 SpellInfo const* GetFirstRankSpell()
const;
1126 SpellInfo const* GetLastRankSpell()
const;
1127 SpellInfo const* GetNextRankSpell()
const;
1128 SpellInfo const* GetPrevRankSpell()
const;
1130 bool IsRankOf(
SpellInfo const* spellInfo)
const;
1131 bool IsDifferentRankOf(
SpellInfo const* spellInfo)
const;
1132 bool IsHighRankOf(
SpellInfo const* spellInfo)
const;
1133
1134 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> const& GetEffects() const { return Effects; }
1136
1137
1138 void _InitializeExplicitTargetMask();
1139 bool _IsPositiveEffect(
uint8 effIndex,
bool deep)
const;
1140 bool _IsPositiveSpell() const;
1141 static bool _IsPositiveTarget(
uint32 targetA,
uint32 targetB);
1142
1145
1146
1147 void _UnloadImplicitTargetConditionLists();
1148
1149 bool CheckElixirStacking(
Unit const* caster)
const;
1150
1151private:
1152 std::array<SpellEffectInfo, MAX_SPELL_EFFECTS>& _GetEffects() { return Effects; }
1154};
1155
1156#endif
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1636
#define AC_GAME_API
Definition Define.h:94
#define ASSERT
Definition Errors.h:68
SpellEffIndex
Definition SharedDefines.h:30
SpellAttr7
Definition SharedDefines.h:640
SpellEffects
Definition SharedDefines.h:778
SpellAttr5
Definition SharedDefines.h:566
Targets
Definition SharedDefines.h:1409
SpellAttr2
Definition SharedDefines.h:455
SpellAttr1
Definition SharedDefines.h:418
SpellAttr3
Definition SharedDefines.h:492
SpellAttr0
Definition SharedDefines.h:381
TotemCategory
Definition SharedDefines.h:3083
AuraStateType
Definition SharedDefines.h:1288
DispelType
Definition SharedDefines.h:1371
SpellCastResult
Definition SharedDefines.h:948
SpellAttr4
Definition SharedDefines.h:529
SpellAttr6
Definition SharedDefines.h:603
SpellSchoolMask
Definition SharedDefines.h:295
AuraType
Definition SpellAuraDefines.h:62
SpellEffectImplicitTargetTypes
Definition SpellInfo.h:141
@ EFFECT_IMPLICIT_TARGET_CASTER
Definition SpellInfo.h:144
@ EFFECT_IMPLICIT_TARGET_NONE
Definition SpellInfo.h:142
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition SpellInfo.h:143
SpellTargetSelectionCategories
Definition SpellInfo.h:76
@ TARGET_SELECT_CATEGORY_CONE
Definition SpellInfo.h:81
@ TARGET_SELECT_CATEGORY_AREA
Definition SpellInfo.h:82
@ TARGET_SELECT_CATEGORY_DEFAULT
Definition SpellInfo.h:78
@ TARGET_SELECT_CATEGORY_NEARBY
Definition SpellInfo.h:80
@ TARGET_SELECT_CATEGORY_NYI
Definition SpellInfo.h:77
@ TARGET_SELECT_CATEGORY_TRAJ
Definition SpellInfo.h:83
@ TARGET_SELECT_CATEGORY_CHANNEL
Definition SpellInfo.h:79
SpellTargetCheckTypes
Definition SpellInfo.h:113
@ TARGET_CHECK_CORPSE
Definition SpellInfo.h:122
@ TARGET_CHECK_PASSENGER
Definition SpellInfo.h:121
@ TARGET_CHECK_PARTY
Definition SpellInfo.h:118
@ TARGET_CHECK_ENEMY
Definition SpellInfo.h:116
@ TARGET_CHECK_DEFAULT
Definition SpellInfo.h:114
@ TARGET_CHECK_ENTRY
Definition SpellInfo.h:115
@ TARGET_CHECK_RAID_CLASS
Definition SpellInfo.h:120
@ TARGET_CHECK_ALLY
Definition SpellInfo.h:117
@ TARGET_CHECK_RAID
Definition SpellInfo.h:119
@ TARGET_FLAG_TRADE_ITEM
Definition SpellInfo.h:58
@ TARGET_FLAG_STRING
Definition SpellInfo.h:59
@ TARGET_FLAG_NONE
Definition SpellInfo.h:45
@ TARGET_FLAG_UNIT_RAID
Definition SpellInfo.h:48
@ TARGET_FLAG_UNIT_ENEMY
Definition SpellInfo.h:53
@ TARGET_FLAG_GLYPH_SLOT
Definition SpellInfo.h:63
@ TARGET_FLAG_CORPSE_ALLY
Definition SpellInfo.h:61
@ TARGET_FLAG_UNIT_MINIPET
Definition SpellInfo.h:62
@ TARGET_FLAG_UNIT_PASSENGER
Definition SpellInfo.h:66
@ TARGET_FLAG_UNUSED20
Definition SpellInfo.h:65
@ TARGET_FLAG_UNIT_ALLY
Definition SpellInfo.h:54
@ TARGET_FLAG_ITEM_MASK
Definition SpellInfo.h:72
@ TARGET_FLAG_UNUSED_1
Definition SpellInfo.h:46
@ TARGET_FLAG_UNIT
Definition SpellInfo.h:47
@ TARGET_FLAG_DEST_TARGET
Definition SpellInfo.h:64
@ TARGET_FLAG_UNIT_DEAD
Definition SpellInfo.h:56
@ TARGET_FLAG_CORPSE_ENEMY
Definition SpellInfo.h:55
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition SpellInfo.h:70
@ TARGET_FLAG_UNIT_PARTY
Definition SpellInfo.h:49
SpellTargetDirectionTypes
Definition SpellInfo.h:126
@ TARGET_DIR_FRONT_RIGHT
Definition SpellInfo.h:132
@ TARGET_DIR_NONE
Definition SpellInfo.h:127
@ TARGET_DIR_BACK
Definition SpellInfo.h:129
@ TARGET_DIR_BACK_RIGHT
Definition SpellInfo.h:133
@ TARGET_DIR_RIGHT
Definition SpellInfo.h:130
@ TARGET_DIR_FRONT_LEFT
Definition SpellInfo.h:135
@ TARGET_DIR_FRONT
Definition SpellInfo.h:128
@ TARGET_DIR_LEFT
Definition SpellInfo.h:131
@ TARGET_DIR_ENTRY
Definition SpellInfo.h:137
@ TARGET_DIR_BACK_LEFT
Definition SpellInfo.h:134
@ TARGET_DIR_RANDOM
Definition SpellInfo.h:136
SpellCustomAttributes
Definition SpellInfo.h:175
@ SPELL_ATTR0_CU_IGNORE_ARMOR
Definition SpellInfo.h:191
@ SPELL_ATTR0_CU_POSITIVE_EFF2
Definition SpellInfo.h:203
@ SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER
Definition SpellInfo.h:192
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition SpellInfo.h:194
@ SPELL_ATTR0_CU_ENCHANT_PROC
Definition SpellInfo.h:176
@ SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS
Definition SpellInfo.h:197
@ SPELL_ATTR0_CU_FORCE_SEND_CATEGORY_COOLDOWNS
Definition SpellInfo.h:204
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
Definition SpellInfo.h:184
@ SPELL_ATTR0_CU_POSITIVE
Definition SpellInfo.h:211
@ SPELL_ATTR0_CU_FORCE_AURA_SAVING
Definition SpellInfo.h:205
@ SPELL_ATTR0_CU_NO_PVP_FLAG
Definition SpellInfo.h:183
@ SPELL_ATTR0_CU_DONT_BREAK_STEALTH
Definition SpellInfo.h:182
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
Definition SpellInfo.h:193
@ SPELL_ATTR0_CU_CONE_BACK
Definition SpellInfo.h:177
@ SPELL_ATTR0_CU_SINGLE_AURA_STACK
Definition SpellInfo.h:198
@ SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED
Definition SpellInfo.h:200
@ SPELL_ATTR0_CU_NEGATIVE_EFF2
Definition SpellInfo.h:190
@ SPELL_ATTR0_CU_AURA_CC
Definition SpellInfo.h:181
@ SPELL_ATTR0_CU_NEGATIVE_EFF1
Definition SpellInfo.h:189
@ SPELL_ATTR0_CU_CHARGE
Definition SpellInfo.h:185
@ SPELL_ATTR0_CU_NEGATIVE
Definition SpellInfo.h:210
@ SPELL_ATTR0_CU_NEEDS_AMMO_DATA
Definition SpellInfo.h:195
@ SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY
Definition SpellInfo.h:208
@ SPELL_ATTR0_CU_POSITIVE_EFF0
Definition SpellInfo.h:201
@ SPELL_ATTR0_CU_NEGATIVE_EFF0
Definition SpellInfo.h:188
@ SPELL_ATTR0_CU_POSITIVE_EFF1
Definition SpellInfo.h:202
@ SPELL_ATTR0_CU_BINARY_SPELL
Definition SpellInfo.h:196
@ SPELL_ATTR0_CU_SHARE_DAMAGE
Definition SpellInfo.h:179
@ SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC
Definition SpellInfo.h:199
@ SPELL_ATTR0_CU_IGNORE_EVADE
Definition SpellInfo.h:187
@ SPELL_ATTR0_CU_ONLY_ONE_AREA_AURA
Definition SpellInfo.h:206
@ SPELL_ATTR0_CU_ENCOUNTER_REWARD
Definition SpellInfo.h:207
@ SPELL_ATTR0_CU_PICKPOCKET
Definition SpellInfo.h:186
@ SPELL_ATTR0_CU_CONE_LINE
Definition SpellInfo.h:178
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
Definition SpellInfo.h:180
SpellSpecificType
Definition SpellInfo.h:149
@ SPELL_SPECIFIC_FOOD
Definition SpellInfo.h:163
@ SPELL_SPECIFIC_MAGE_ARMOR
Definition SpellInfo.h:158
@ SPELL_SPECIFIC_NORMAL
Definition SpellInfo.h:150
@ SPELL_SPECIFIC_STING
Definition SpellInfo.h:153
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
Definition SpellInfo.h:169
@ SPELL_SPECIFIC_ASPECT
Definition SpellInfo.h:155
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
Definition SpellInfo.h:170
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
Definition SpellInfo.h:159
@ SPELL_SPECIFIC_WARLOCK_CORRUPTION
Definition SpellInfo.h:162
@ SPELL_SPECIFIC_PRESENCE
Definition SpellInfo.h:166
@ SPELL_SPECIFIC_CURSE
Definition SpellInfo.h:154
@ SPELL_SPECIFIC_JUDGEMENT
Definition SpellInfo.h:161
@ SPELL_SPECIFIC_DRINK
Definition SpellInfo.h:164
@ SPELL_SPECIFIC_HAND
Definition SpellInfo.h:171
@ SPELL_SPECIFIC_AURA
Definition SpellInfo.h:152
@ SPELL_SPECIFIC_WARLOCK_ARMOR
Definition SpellInfo.h:157
@ SPELL_SPECIFIC_SCROLL
Definition SpellInfo.h:168
@ SPELL_SPECIFIC_MAGE_POLYMORPH
Definition SpellInfo.h:160
@ SPELL_SPECIFIC_TRACKER
Definition SpellInfo.h:156
@ SPELL_SPECIFIC_SEAL
Definition SpellInfo.h:151
@ SPELL_SPECIFIC_FOOD_AND_DRINK
Definition SpellInfo.h:165
@ SPELL_SPECIFIC_CHARM
Definition SpellInfo.h:167
SpellTargetObjectTypes
Definition SpellInfo.h:97
@ TARGET_OBJECT_TYPE_UNIT
Definition SpellInfo.h:101
@ TARGET_OBJECT_TYPE_ITEM
Definition SpellInfo.h:105
@ TARGET_OBJECT_TYPE_CORPSE
Definition SpellInfo.h:106
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
Definition SpellInfo.h:102
@ TARGET_OBJECT_TYPE_NONE
Definition SpellInfo.h:98
@ TARGET_OBJECT_TYPE_DEST
Definition SpellInfo.h:100
@ TARGET_OBJECT_TYPE_GOBJ
Definition SpellInfo.h:103
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
Definition SpellInfo.h:109
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
Definition SpellInfo.h:108
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
Definition SpellInfo.h:104
@ TARGET_OBJECT_TYPE_SRC
Definition SpellInfo.h:99
SpellTargetReferenceTypes
Definition SpellInfo.h:87
@ TARGET_REFERENCE_TYPE_SRC
Definition SpellInfo.h:92
@ TARGET_REFERENCE_TYPE_TARGET
Definition SpellInfo.h:90
@ TARGET_REFERENCE_TYPE_LAST
Definition SpellInfo.h:91
@ TARGET_REFERENCE_TYPE_NONE
Definition SpellInfo.h:88
@ TARGET_REFERENCE_TYPE_CASTER
Definition SpellInfo.h:89
@ TARGET_REFERENCE_TYPE_DEST
Definition SpellInfo.h:93
ProcFlags
Definition SpellMgr.h:104
PowerType
Definition VehicleDefines.h:29
Definition SpellAuraEffects.h:39
Definition SpellInfo.h:249
float CalcDamageMultiplier(Unit *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:539
float CalcRadius(Unit *caster=nullptr, Spell *=nullptr) const
Definition SpellInfo.cpp:552
int32 CalcValue(Unit const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
Definition SpellInfo.cpp:409
uint32 GetMissingTargetMask(bool srcSet=false, bool destSet=false, uint32 mask=0) const
Definition SpellInfo.cpp:574
bool IsFarUnitTargetEffect() const
Definition SpellInfo.cpp:390
bool IsEffect() const
Definition SpellInfo.cpp:353
bool IsTargetingArea() const
Definition SpellInfo.cpp:373
bool IsFarDestTargetEffect() const
Definition SpellInfo.cpp:399
SpellEffectImplicitTargetTypes GetImplicitTargetType() const
Definition SpellInfo.cpp:598
SpellEffectInfo()
Definition SpellInfo.h:275
float CalcValueMultiplier(Unit *caster, Spell *spell=nullptr) const
Definition SpellInfo.cpp:531
uint32 GetProvidedTargetMask() const
Definition SpellInfo.cpp:569
int32 CalcBaseValue(int32 value) const
Definition SpellInfo.cpp:523
Definition SpellInfo.h:316
Definition SpellMgr.h:640
Definition DBCStructure.h:1757
Definition DBCStructure.h:1765
Definition SpellMgr.h:554
Definition DBCStructure.h:1832
SpellTargetObjectTypes UsedTargetObjectType
Definition SpellInfo.h:309
SpellEffectImplicitTargetTypes ImplicitTargetType
Definition SpellInfo.h:308
Definition DBCStructure.h:1641
Definition DBCStructure.h:1784
Definition DBCStructure.h:1792