TrinityCore
SpellMgr.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore 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 _SPELLMGR_H
19#define _SPELLMGR_H
20
21// For static or at-server-startup loaded spell data
22
23#include "Define.h"
24#include "DBCEnums.h"
25#include "Duration.h"
26#include "EnumFlag.h"
27#include "Errors.h"
28#include "FlagsArray.h"
29#include "Hash.h"
30#include "IteratorPair.h"
31#include "RaceMask.h"
32#include "SharedDefines.h"
33#include "SpellDefines.h"
34#include <bitset>
35#include <functional>
36#include <map>
37#include <set>
38#include <vector>
39#include <unordered_map>
40#include <unordered_set>
41
42class SpellInfo;
43class Player;
44class Unit;
45class ProcEventInfo;
53struct SpellEffectEntry;
56struct SpellLabelEntry;
57struct SpellLevelsEntry;
58struct SpellMiscEntry;
59struct SpellNameEntry;
60struct SpellPowerEntry;
66struct SpellTotemsEntry;
68enum AuraType : uint32;
69
70// only used in code
72{
75 SPELLCATEGORY_JUDGEMENT = 1210, // Judgement (seal trigger)
78};
79
80//SpellFamilyFlags
82{
83 // SPELLFAMILYFLAG = SpellFamilyFlags[0]
84 // SPELLFAMILYFLAG1 = SpellFamilyFlags[1]
85 // SPELLFAMILYFLAG2 = SpellFamilyFlags[2]
86
87 // Rogue
89 SPELLFAMILYFLAG0_ROGUE_VAN_SPRINT = 0x00000840, // Vanish, Sprint
90 SPELLFAMILYFLAG1_ROGUE_SHADOWSTEP = 0x00000200, // Shadowstep
91 SPELLFAMILYFLAG0_ROGUE_KICK = 0x00000010, // Kick
92 SPELLFAMILYFLAG1_ROGUE_DISMANTLE_SMOKE_BOMB = 0x80100000, // Dismantle, Smoke Bomb
93
94 // Warrior
99
100 // Warlock
102
103 // Druid
105
106 // Paladin
108
109 // Shaman
115
116 // Deathknight
119
121 SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS = 0x04000000 // Seems to be linked to most totems and some totem effects
123
125{
126 SPELL_LINK_CAST = 0, // +: cast; -: remove
128 SPELL_LINK_AURA = 2, // +: aura; -: immune
131
132// Spell proc event related declarations (accessed using SpellMgr functions)
134{
135 PROC_FLAG_NONE = 0x00000000,
136
137 PROC_FLAG_HEARTBEAT = 0x00000001, // 00 Killed by agressor - not sure about this flag
138 PROC_FLAG_KILL = 0x00000002, // 01 Kill target (in most cases need XP/Honor reward)
139
140 PROC_FLAG_DEAL_MELEE_SWING = 0x00000004, // 02 Done melee auto attack
141 PROC_FLAG_TAKE_MELEE_SWING = 0x00000008, // 03 Taken melee auto attack
142
143 PROC_FLAG_DEAL_MELEE_ABILITY = 0x00000010, // 04 Done attack by Spell that has dmg class melee
144 PROC_FLAG_TAKE_MELEE_ABILITY = 0x00000020, // 05 Taken attack by Spell that has dmg class melee
145
146 PROC_FLAG_DEAL_RANGED_ATTACK = 0x00000040, // 06 Done ranged auto attack
147 PROC_FLAG_TAKE_RANGED_ATTACK = 0x00000080, // 07 Taken ranged auto attack
148
149 PROC_FLAG_DEAL_RANGED_ABILITY = 0x00000100, // 08 Done attack by Spell that has dmg class ranged
150 PROC_FLAG_TAKE_RANGED_ABILITY = 0x00000200, // 09 Taken attack by Spell that has dmg class ranged
151
152 PROC_FLAG_DEAL_HELPFUL_ABILITY = 0x00000400, // 10 Done positive spell that has dmg class none
153 PROC_FLAG_TAKE_HELPFUL_ABILITY = 0x00000800, // 11 Taken positive spell that has dmg class none
154
155 PROC_FLAG_DEAL_HARMFUL_ABILITY = 0x00001000, // 12 Done negative spell that has dmg class none
156 PROC_FLAG_TAKE_HARMFUL_ABILITY = 0x00002000, // 13 Taken negative spell that has dmg class none
157
158 PROC_FLAG_DEAL_HELPFUL_SPELL = 0x00004000, // 14 Done positive spell that has dmg class magic
159 PROC_FLAG_TAKE_HELPFUL_SPELL = 0x00008000, // 15 Taken positive spell that has dmg class magic
160
161 PROC_FLAG_DEAL_HARMFUL_SPELL = 0x00010000, // 16 Done negative spell that has dmg class magic
162 PROC_FLAG_TAKE_HARMFUL_SPELL = 0x00020000, // 17 Taken negative spell that has dmg class magic
163
164 PROC_FLAG_DEAL_HARMFUL_PERIODIC = 0x00040000, // 18 Successful do periodic (damage)
165 PROC_FLAG_TAKE_HARMFUL_PERIODIC = 0x00080000, // 19 Taken spell periodic (damage)
166
167 PROC_FLAG_TAKE_ANY_DAMAGE = 0x00100000, // 20 Taken any damage
168
169 PROC_FLAG_DEAL_HELPFUL_PERIODIC = 0x00200000, // 21 On trap activation (possibly needs name change to ON_GAMEOBJECT_CAST or USE)
170
171 PROC_FLAG_MAIN_HAND_WEAPON_SWING = 0x00400000, // 22 Done main-hand melee attacks (spell and autoattack)
172 PROC_FLAG_OFF_HAND_WEAPON_SWING = 0x00800000, // 23 Done off-hand melee attacks (spell and autoattack)
173
174 PROC_FLAG_DEATH = 0x01000000, // 24 Died in any way
175
176 PROC_FLAG_JUMP = 0x02000000, // 25 Jumped
177
178 PROC_FLAG_PROC_CLONE_SPELL = 0x04000000, // 26 Proc Clone Spell
179
180 PROC_FLAG_ENTER_COMBAT = 0x08000000, // 27 Entered combat
181
182 PROC_FLAG_ENCOUNTER_START = 0x10000000, // 28 Encounter started
183
184 PROC_FLAG_CAST_ENDED = 0x20000000, // 29 Cast Ended
185
186 PROC_FLAG_LOOTED = 0x40000000, // 30 Looted (took from loot, not opened loot window)
187
188 PROC_FLAG_TAKE_HELPFUL_PERIODIC = 0x80000000, // 31 Take Helpful Periodic
189
190 // flag masks
193
197
200
210
217
224
227
229
231{
232 PROC_FLAG_2_NONE = 0x00000000,
235 PROC_FLAG_2_CAST_SUCCESSFUL = 0x00000004
237
239
240#define MELEE_BASED_TRIGGER_MASK (PROC_FLAG_DEAL_MELEE_SWING | \
241 PROC_FLAG_TAKE_MELEE_SWING | \
242 PROC_FLAG_DEAL_MELEE_ABILITY | \
243 PROC_FLAG_TAKE_MELEE_ABILITY | \
244 PROC_FLAG_DEAL_RANGED_ATTACK | \
245 PROC_FLAG_TAKE_RANGED_ATTACK | \
246 PROC_FLAG_DEAL_RANGED_ABILITY | \
247 PROC_FLAG_TAKE_RANGED_ABILITY)
248
250{
252 PROC_SPELL_TYPE_DAMAGE = 0x0000001, // damage type of spell
253 PROC_SPELL_TYPE_HEAL = 0x0000002, // heal type of spell
254 PROC_SPELL_TYPE_NO_DMG_HEAL = 0x0000004, // other spells
257
259
261{
268
270
272{
273 PROC_HIT_NONE = 0x0000000, // no value - PROC_HIT_NORMAL | PROC_HIT_CRITICAL for TAKEN proc type, PROC_HIT_NORMAL | PROC_HIT_CRITICAL | PROC_HIT_ABSORB for DONE
274 PROC_HIT_NORMAL = 0x0000001, // non-critical hits
275 PROC_HIT_CRITICAL = 0x0000002,
276 PROC_HIT_MISS = 0x0000004,
278 PROC_HIT_DODGE = 0x0000010,
279 PROC_HIT_PARRY = 0x0000020,
280 PROC_HIT_BLOCK = 0x0000040, // partial or full block
281 PROC_HIT_EVADE = 0x0000080,
282 PROC_HIT_IMMUNE = 0x0000100,
283 PROC_HIT_DEFLECT = 0x0000200,
284 PROC_HIT_ABSORB = 0x0000400, // partial or full absorb
285 PROC_HIT_REFLECT = 0x0000800,
288 PROC_HIT_DISPEL = 0x0004000,
289 PROC_HIT_MASK_ALL = 0x0007FFF
291
293
295{
296 PROC_ATTR_NONE = 0x0000000,
297 PROC_ATTR_REQ_EXP_OR_HONOR = 0x0000001, // requires proc target to give exp or honor for aura proc
298 PROC_ATTR_TRIGGERED_CAN_PROC = 0x0000002, // aura can proc even with triggered spells
299 PROC_ATTR_REQ_POWER_COST = 0x0000004, // requires triggering spell to have a power cost for aura proc
300 PROC_ATTR_REQ_SPELLMOD = 0x0000008, // requires triggering spell to be affected by proccing aura to drop charges
301 PROC_ATTR_USE_STACKS_FOR_CHARGES = 0x0000010, // consuming proc drops a stack from proccing aura instead of charge
302
303 PROC_ATTR_REDUCE_PROC_60 = 0x0000080, // aura should have a reduced chance to proc if level of proc Actor > 60
304 PROC_ATTR_CANT_PROC_FROM_ITEM_CAST = 0x0000100, // do not allow aura proc if proc is caused by a spell casted by item
305};
306
308
309#define PROC_ATTR_ALL_ALLOWED (PROC_ATTR_REQ_EXP_OR_HONOR | \
310 PROC_ATTR_TRIGGERED_CAN_PROC | \
311 PROC_ATTR_REQ_POWER_COST | \
312 PROC_ATTR_REQ_SPELLMOD | \
313 PROC_ATTR_USE_STACKS_FOR_CHARGES | \
314 PROC_ATTR_REDUCE_PROC_60)
315
317{
318 uint32 SchoolMask = 0; // if nonzero - bitmask for matching proc condition based on spell's school
319 uint32 SpellFamilyName = 0; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyName
320 flag128 SpellFamilyMask; // if nonzero - bitmask for matching proc condition based on candidate spell's SpellFamilyFlags
321 ProcFlagsInit ProcFlags; // if nonzero - overwrite procFlags field for given Spell.dbc entry, bitmask for matching proc condition, see enum ProcFlags
322 ProcFlagsSpellType SpellTypeMask = PROC_SPELL_TYPE_NONE; // if nonzero - bitmask for matching proc condition based on candidate spell's damage/heal effects, see enum ProcFlagsSpellType
323 ProcFlagsSpellPhase SpellPhaseMask = PROC_SPELL_PHASE_NONE; // if nonzero - bitmask for matching phase of a spellcast on which proc occurs, see enum ProcFlagsSpellPhase
324 ProcFlagsHit HitMask = PROC_HIT_NONE; // if nonzero - bitmask for matching proc condition based on hit result, see enum ProcFlagsHit
325 ProcAttributes AttributesMask = PROC_ATTR_NONE; // bitmask, see ProcAttributes
327 float ProcsPerMinute = 0.0f; // if nonzero - chance to proc is equal to value * aura caster's weapon speed / 60
328 float Chance = 0.0f; // if nonzero - owerwrite procChance field for given Spell.dbc entry, defines chance of proc to occur, not used if ProcsPerMinute set
329 Milliseconds Cooldown = 0ms; // if nonzero - cooldown in secs for aura proc, applied to aura
330 uint32 Charges = 0; // if nonzero - overwrite procCharges field for given Spell.dbc entry, defines how many times proc can occur before aura remove, 0 - infinite
331};
332
334{
335 ENCHANT_PROC_ATTR_WHITE_HIT = 0x0000001, // enchant shall only proc off white hits (not abilities)
336 ENCHANT_PROC_ATTR_LIMIT_60 = 0x0000002 // enchant effects shall be reduced past lvl 60
338
340{
341 float Chance; // if nonzero - overwrite SpellItemEnchantment value
342 float ProcsPerMinute; // if nonzero - chance to proc is equal to value * aura caster's weapon speed / 60
343 uint32 HitMask; // if nonzero - bitmask for matching proc condition based on hit result, see enum ProcFlagsHit
344 uint32 AttributesMask; // bitmask, see EnchantProcAttributes
345};
346
347typedef std::unordered_map<uint32, SpellEnchantProcEntry> SpellEnchantProcEventMap;
348
350{
358
359namespace std
360{
361 template<>
362 struct hash<SpellGroup>
363 {
364 size_t operator()(SpellGroup const& group) const noexcept
365 {
366 return hash<uint32>()(uint32(group));
367 }
368 };
369}
370
371#define SPELL_GROUP_DB_RANGE_MIN 1000
372
373// spell_id, group_id
374typedef std::unordered_multimap<uint32, SpellGroup> SpellSpellGroupMap;
375typedef std::pair<SpellSpellGroupMap::const_iterator, SpellSpellGroupMap::const_iterator> SpellSpellGroupMapBounds;
376
377// group_id, spell_id
378typedef std::unordered_multimap<SpellGroup, int32> SpellGroupSpellMap;
379typedef std::pair<SpellGroupSpellMap::const_iterator, SpellGroupSpellMap::const_iterator> SpellGroupSpellMapBounds;
380
382{
390
391typedef std::unordered_map<SpellGroup, SpellGroupStackRule> SpellGroupStackMap;
392
393typedef std::unordered_map<SpellGroup, std::unordered_set<uint32 /*auraName*/>> SameEffectStackMap;
394
396{
397 int32 flatMod; // flat threat-value for this Spell - default: 0
398 float pctMod; // threat-multiplier for this Spell - default: 1.0f
399 float apPctMod; // Pct of AP that is added as Threat - default: 0.0f
400};
401
402typedef std::unordered_map<uint32, SpellThreatEntry> SpellThreatMap;
403
404// coordinates for spells (accessed using SpellMgr functions)
406{
408 float target_X;
409 float target_Y;
410 float target_Z;
412};
413
414typedef std::map<std::pair<uint32 /*spell_id*/, SpellEffIndex /*effIndex*/>, SpellTargetPosition> SpellTargetPositionMap;
415
416// Enum with EffectRadiusIndex and their actual radius
418{
455 EFFECT_RADIUS_0_5_YARDS = 44, // 0.5 yards
474 EFFECT_RADIUS_3_5_YARDS = 64, // 3.5 yards
477
478// Spell pet auras
480{
481 private:
482 typedef std::unordered_map<uint32, uint32> PetAuraMap;
483
484 public:
485 PetAura() : removeOnChangePet(false), damage(0) { }
486
487 PetAura(uint32 petEntry, uint32 aura, bool _removeOnChangePet, int _damage) :
488 removeOnChangePet(_removeOnChangePet), damage(_damage)
489 {
490 auras[petEntry] = aura;
491 }
492
493 uint32 GetAura(uint32 petEntry) const
494 {
495 PetAuraMap::const_iterator itr = auras.find(petEntry);
496 if (itr != auras.end())
497 return itr->second;
498 PetAuraMap::const_iterator itr2 = auras.find(0);
499 if (itr2 != auras.end())
500 return itr2->second;
501 return 0;
502 }
503
504 void AddAura(uint32 petEntry, uint32 aura)
505 {
506 auras[petEntry] = aura;
507 }
508
510 {
511 return removeOnChangePet;
512 }
513
515 {
516 return damage;
517 }
518
519 private:
523};
524typedef std::map<uint32, PetAura> SpellPetAuraMap;
525
527{
528 SPELL_AREA_FLAG_AUTOCAST = 0x1, // if has autocast, spell is applied on enter
529 SPELL_AREA_FLAG_AUTOREMOVE = 0x2, // if has autoremove, spell is remove automatically inside zone/area (always removed on leaving area or zone)
530 SPELL_AREA_FLAG_IGNORE_AUTOCAST_ON_QUEST_STATUS_CHANGE = 0x4, // if this flag is set then spell will not be applied automatically on quest status change
531};
532
534{
536 uint32 areaId; // zone/subzone/or 0 is not limited to zone
537 uint32 questStart; // quest start (quest must be active or rewarded for spell apply)
538 uint32 questEnd; // quest end (quest must not be rewarded for spell apply)
539 int32 auraSpell; // spell aura must be applied for spell apply)if possitive) and it must not be applied in other case
540 Trinity::RaceMask<uint64> raceMask; // can be applied only to races
541 Gender gender; // can be applied only to gender
542 uint32 questStartStatus; // QuestStatus that quest_start must have in order to keep the spell
543 uint32 questEndStatus; // QuestStatus that the quest_end must have in order to keep the spell (if the quest_end's status is different than this, the spell will be dropped)
544 uint8 flags; // if SPELL_AREA_FLAG_AUTOCAST then auto applied at area enter, in other case just allowed to cast || if SPELL_AREA_FLAG_AUTOREMOVE then auto removed inside area (will allways be removed on leaved even without flag)
545
546 // helpers
547 bool IsFitToRequirements(Player const* player, uint32 newZone, uint32 newArea) const;
548};
549
550typedef std::multimap<uint32, SpellArea> SpellAreaMap;
551typedef std::multimap<uint32, SpellArea const*> SpellAreaForQuestMap;
552typedef std::multimap<uint32, SpellArea const*> SpellAreaForAuraMap;
553typedef std::multimap<uint32, SpellArea const*> SpellAreaForAreaMap;
554typedef std::pair<SpellAreaMap::const_iterator, SpellAreaMap::const_iterator> SpellAreaMapBounds;
555typedef std::pair<SpellAreaForQuestMap::const_iterator, SpellAreaForQuestMap::const_iterator> SpellAreaForQuestMapBounds;
556typedef std::pair<SpellAreaForAuraMap::const_iterator, SpellAreaForAuraMap::const_iterator> SpellAreaForAuraMapBounds;
557typedef std::pair<SpellAreaForAreaMap::const_iterator, SpellAreaForAreaMap::const_iterator> SpellAreaForAreaMapBounds;
558
559// Spell rank chain (accessed using SpellMgr functions)
561{
567};
568
569typedef std::unordered_map<uint32, SpellChainNode> SpellChainMap;
570
571// spell_id req_spell
572typedef std::multimap<uint32, uint32> SpellRequiredMap;
573typedef std::pair<SpellRequiredMap::const_iterator, SpellRequiredMap::const_iterator> SpellRequiredMapBounds;
574
575// req_spell spell_id
576typedef std::multimap<uint32, uint32> SpellsRequiringSpellMap;
577typedef std::pair<SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator> SpellsRequiringSpellMapBounds;
578
579// Spell learning properties (accessed using SpellMgr functions)
581{
584 uint16 value; // 0 - max skill value for player level
585 uint16 maxvalue; // 0 - max skill value for player level
586};
587
588typedef std::unordered_map<uint32, SpellLearnSkillNode> SpellLearnSkillMap;
589
591{
594 bool Active; // show in spellbook or not
595 bool AutoLearned; // This marks the spell as automatically learned from another source that - will only be used for unlearning
596};
597
599{
600 None = 0x0,
601 AoETarget = 0x1,
602 ChainTarget = 0x2
603};
604
606
608{
609 std::bitset<MAX_SPELL_SCHOOL> School;
610 std::bitset<DISPEL_MAX> DispelType;
611 std::bitset<MAX_MECHANIC> Mechanic;
612 std::vector<SpellEffectName> Effect;
613 std::vector<AuraType> Aura;
615};
616
617typedef std::multimap<uint32, SpellLearnSpellNode> SpellLearnSpellMap;
618typedef std::pair<SpellLearnSpellMap::const_iterator, SpellLearnSpellMap::const_iterator> SpellLearnSpellMapBounds;
619
620typedef std::multimap<uint32, SkillLineAbilityEntry const*> SkillLineAbilityMap;
621typedef std::pair<SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator> SkillLineAbilityMapBounds;
622
623typedef std::set<uint32> PetFamilySpellsSet;
624typedef std::map<uint32, PetFamilySpellsSet> PetFamilySpellsStore;
625
626typedef std::multimap<uint32, uint32> PetLevelupSpellSet;
627typedef std::map<uint32, PetLevelupSpellSet> PetLevelupSpellMap;
628
629typedef std::map<uint32, uint32> SpellDifficultySearcherMap;
630
631#define MAX_CREATURE_SPELL_DATA_SLOT 4
632
634{
636};
637
638// < 0 for petspelldata id, > 0 for creature_id
639typedef std::map<int32, PetDefaultSpellsEntry> PetDefaultSpellsMap;
640
641typedef std::unordered_map<std::pair<SpellLinkedType, uint32>, std::vector<int32>> SpellLinkedMap;
642
644
645bool IsWeaponSkill(uint32 skill);
646
647inline bool IsProfessionSkill(uint32 skill)
648{
649 return IsPrimaryProfessionSkill(skill) || skill == SKILL_FISHING || skill == SKILL_COOKING;
650}
651
653{
654 return IsProfessionSkill(skill) || skill == SKILL_RIDING;
655}
656
657bool IsPartOfSkillLine(uint32 skillId, uint32 spellId);
658
660
662{
669 std::array<SpellEffectEntry const*, MAX_SPELL_EFFECTS> Effects = { };
672 std::vector<SpellLabelEntry const*> Labels;
673 SpellLevelsEntry const* Levels = nullptr;
674 SpellMiscEntry const* Misc = nullptr;
675 std::array<SpellPowerEntry const*, MAX_POWERS_PER_SPELL> Powers = { };
676 SpellReagentsEntry const* Reagents = nullptr;
677 std::vector<SpellReagentsCurrencyEntry const*> ReagentsCurrency;
678 SpellScalingEntry const* Scaling = nullptr;
681 SpellTotemsEntry const* Totems = nullptr;
682 std::vector<SpellXSpellVisualEntry const*> Visuals; // only to group visuals when parsing sSpellXSpellVisualStore, not for loading
683};
684
685typedef std::map<std::pair<uint32 /*SpellId*/, uint8 /*RaceId*/>, uint32 /*DisplayId*/> SpellTotemModelMap;
686
688{
689 // Constructors
690 private:
691 SpellMgr();
692 ~SpellMgr();
693
694 // Accessors (const or static functions)
695 public:
696 SpellMgr(SpellMgr const& right) = delete;
697 SpellMgr(SpellMgr&& right) = delete;
698 SpellMgr& operator=(SpellMgr const& right) = delete;
699 SpellMgr& operator=(SpellMgr&& right) = delete;
700
701 static SpellMgr* instance();
702
703 // Spell correctness for client using
704 static bool IsSpellValid(SpellInfo const* spellInfo, Player* player = nullptr, bool msg = true);
705
706 // Spell Ranks table
707 SpellChainNode const* GetSpellChainNode(uint32 spell_id) const;
708 uint32 GetFirstSpellInChain(uint32 spell_id) const;
709 uint32 GetLastSpellInChain(uint32 spell_id) const;
710 uint32 GetNextSpellInChain(uint32 spell_id) const;
711 uint32 GetPrevSpellInChain(uint32 spell_id) const;
712 uint8 GetSpellRank(uint32 spell_id) const;
713 // not strict check returns provided spell if rank not avalible
714 uint32 GetSpellWithRank(uint32 spell_id, uint32 rank, bool strict = false) const;
715
716 // Spell Required table
717 Trinity::IteratorPair<SpellRequiredMap::const_iterator> GetSpellsRequiredForSpellBounds(uint32 spell_id) const;
718 SpellsRequiringSpellMapBounds GetSpellsRequiringSpellBounds(uint32 spell_id) const;
719 bool IsSpellRequiringSpell(uint32 spellid, uint32 req_spellid) const;
720
721 // Spell learning
722 SpellLearnSkillNode const* GetSpellLearnSkill(uint32 spell_id) const;
723 SpellLearnSpellMapBounds GetSpellLearnSpellMapBounds(uint32 spell_id) const;
724 bool IsSpellLearnSpell(uint32 spell_id) const;
725 bool IsSpellLearnToSpell(uint32 spell_id1, uint32 spell_id2) const;
726
727 // Spell target coordinates
728 SpellTargetPosition const* GetSpellTargetPosition(uint32 spell_id, SpellEffIndex effIndex) const;
729
730 // Spell Groups table
731 SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const;
732 bool IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const;
733
734 SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const;
735 void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const;
736 void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const;
737
738 // Spell Group Stack Rules table
739 bool AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, uint32 auraType, int32 amount, std::map<SpellGroup, int32>& groups) const;
740 SpellGroupStackRule CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const;
741 SpellGroupStackRule GetSpellGroupStackRule(SpellGroup groupid) const;
742
743 // Spell proc table
744 SpellProcEntry const* GetSpellProcEntry(SpellInfo const* spellInfo) const;
745 static bool CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo);
746
747 // Spell threat table
748 SpellThreatEntry const* GetSpellThreatEntry(uint32 spellID) const;
749
750 SkillLineAbilityMapBounds GetSkillLineAbilityMapBounds(uint32 spell_id) const;
751
752 PetAura const* GetPetAura(uint32 spell_id, uint8 eff) const;
753
754 SpellEnchantProcEntry const* GetSpellEnchantProcEvent(uint32 enchId) const;
755 bool IsArenaAllowedEnchancment(uint32 ench_id) const;
756
757 std::vector<int32> const* GetSpellLinked(SpellLinkedType type, uint32 spell_id) const;
758
759 PetLevelupSpellSet const* GetPetLevelupSpellList(uint32 petFamily) const;
760 PetDefaultSpellsEntry const* GetPetDefaultSpellsEntry(int32 id) const;
761
762 // Spell area
763 SpellAreaMapBounds GetSpellAreaMapBounds(uint32 spell_id) const;
764 SpellAreaForQuestMapBounds GetSpellAreaForQuestMapBounds(uint32 quest_id) const;
765 SpellAreaForQuestMapBounds GetSpellAreaForQuestEndMapBounds(uint32 quest_id) const;
766 SpellAreaForAuraMapBounds GetSpellAreaForAuraMapBounds(uint32 spell_id) const;
767 SpellAreaForAreaMapBounds GetSpellAreaForAreaMapBounds(uint32 area_id) const;
768
769 // Immunities
770 static CreatureImmunities const* GetCreatureImmunities(int32 creatureImmunitiesId);
771
772 // SpellInfo object management
773 SpellInfo const* GetSpellInfo(uint32 spellId, Difficulty difficulty) const;
774
775 // Use this only with 100% valid spellIds
776 SpellInfo const* AssertSpellInfo(uint32 spellId, Difficulty difficulty) const
777 {
778 SpellInfo const* spellInfo = GetSpellInfo(spellId, difficulty);
779 ASSERT(spellInfo);
780 return spellInfo;
781 }
782
783 void ForEachSpellInfo(std::function<void(SpellInfo const*)> callback);
784 void ForEachSpellInfoDifficulty(uint32 spellId, std::function<void(SpellInfo const*)> callback);
785
786 void LoadPetFamilySpellsStore();
787
788 uint32 GetModelForTotem(uint32 spellId, uint8 race) const;
789
790 // Modifiers
791 public:
792
793 // Loading data at server startup
794 void UnloadSpellInfoChains();
795 void LoadSpellRanks();
796 void LoadSpellRequired();
797 void LoadSpellLearnSkills();
798 void LoadSpellLearnSpells();
799 void LoadSpellTargetPositions();
800 void LoadSpellGroups();
801 void LoadSpellGroupStackRules();
802 void LoadSpellProcs();
803 void LoadSpellThreats();
804 void LoadSkillLineAbilityMap();
805 void LoadSpellPetAuras();
806 void LoadSpellEnchantProcData();
807 void LoadSpellLinked();
808 void LoadPetLevelupSpellMap();
809 void LoadPetDefaultSpells();
810 void LoadSpellAreas();
811 void LoadSpellInfoStore();
812 void UnloadSpellInfoStore();
813 void UnloadSpellInfoImplicitTargetConditionLists();
814 void LoadSpellInfoServerside();
815 void LoadSpellInfoCustomAttributes();
816 void LoadSpellInfoCorrections();
817 void LoadSpellInfoSpellSpecificAndAuraState();
818 void LoadSpellInfoDiminishing();
819 void LoadSpellInfoImmunities();
820 void LoadSpellTotemModel();
821
822 private:
845 PetDefaultSpellsMap mPetDefaultSpellsMap; // only spells not listed in related mPetLevelupSpellMap entry
847};
848
849#define sSpellMgr SpellMgr::instance()
850
851#endif
Difficulty
Definition: DBCEnums.h:873
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint16_t uint16
Definition: Define.h:143
uint32_t uint32
Definition: Define.h:142
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
#define ASSERT
Definition: Errors.h:68
SpellEffIndex
Definition: SharedDefines.h:29
Gender
Powers
@ SKILL_COOKING
@ SKILL_FISHING
@ SKILL_RIDING
AuraType
std::multimap< uint32, SpellLearnSpellNode > SpellLearnSpellMap
Definition: SpellMgr.h:617
bool IsPrimaryProfessionSkill(uint32 skill)
Definition: SpellMgr.cpp:106
bool IsPartOfSkillLine(uint32 skillId, uint32 spellId)
Definition: SpellMgr.cpp:118
std::unordered_map< uint32, SpellEnchantProcEntry > SpellEnchantProcEventMap
Definition: SpellMgr.h:347
std::multimap< uint32, SpellArea const * > SpellAreaForAuraMap
Definition: SpellMgr.h:552
std::unordered_map< SpellGroup, std::unordered_set< uint32 > > SameEffectStackMap
Definition: SpellMgr.h:393
bool IsProfessionOrRidingSkill(uint32 skill)
Definition: SpellMgr.h:652
DEFINE_ENUM_FLAG(ProcFlags)
std::unordered_multimap< SpellGroup, int32 > SpellGroupSpellMap
Definition: SpellMgr.h:378
std::pair< SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator > SpellsRequiringSpellMapBounds
Definition: SpellMgr.h:577
SpellFamilyFlag
Definition: SpellMgr.h:82
@ SPELLFAMILYFLAG_SHAMAN_MANA_SPRING
Definition: SpellMgr.h:112
@ SPELLFAMILYFLAG_WARLOCK_LIFETAP
Definition: SpellMgr.h:101
@ SPELLFAMILYFLAG_WARRIOR_CONCUSSION_BLOW
Definition: SpellMgr.h:98
@ SPELLFAMILYFLAG1_ROGUE_SHADOWSTEP
Definition: SpellMgr.h:90
@ SPELLFAMILYFLAG_WARRIOR_EXECUTE
Definition: SpellMgr.h:97
@ SPELLFAMILYFLAG2_SHAMAN_LAVA_LASH
Definition: SpellMgr.h:113
@ SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS
Definition: SpellMgr.h:121
@ SPELLFAMILYFLAG_DK_DEATH_COIL
Definition: SpellMgr.h:118
@ SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK
Definition: SpellMgr.h:110
@ SPELLFAMILYFLAG_WARRIOR_SLAM
Definition: SpellMgr.h:96
@ SPELLFAMILYFLAG2_DRUID_STARFALL
Definition: SpellMgr.h:104
@ SPELLFAMILYFLAG0_ROGUE_VAN_SPRINT
Definition: SpellMgr.h:89
@ SPELLFAMILYFLAG1_PALADIN_DIVINESTORM
Definition: SpellMgr.h:107
@ SPELLFAMILYFLAG1_ROGUE_DISMANTLE_SMOKE_BOMB
Definition: SpellMgr.h:92
@ SPELLFAMILYFLAG_WARRIOR_CHARGE
Definition: SpellMgr.h:95
@ SPELLFAMILYFLAG_DK_DEATH_STRIKE
Definition: SpellMgr.h:117
@ SPELLFAMILYFLAG_SHAMAN_HEALING_STREAM
Definition: SpellMgr.h:111
@ SPELLFAMILYFLAG0_ROGUE_KICK
Definition: SpellMgr.h:91
@ SPELLFAMILYFLAG0_ROGUE_VANISH
Definition: SpellMgr.h:88
@ SPELLFAMILYFLAG_SHAMAN_FIRE_NOVA
Definition: SpellMgr.h:114
std::map< std::pair< uint32, SpellEffIndex >, SpellTargetPosition > SpellTargetPositionMap
Definition: SpellMgr.h:414
std::pair< SpellSpellGroupMap::const_iterator, SpellSpellGroupMap::const_iterator > SpellSpellGroupMapBounds
Definition: SpellMgr.h:375
bool IsProfessionSkill(uint32 skill)
Definition: SpellMgr.h:647
bool IsWeaponSkill(uint32 skill)
Definition: SpellMgr.cpp:112
std::multimap< uint32, SpellArea > SpellAreaMap
Definition: SpellMgr.h:550
std::pair< SpellAreaMap::const_iterator, SpellAreaMap::const_iterator > SpellAreaMapBounds
Definition: SpellMgr.h:554
std::map< uint32, uint32 > SpellDifficultySearcherMap
Definition: SpellMgr.h:629
SpellGroup
Definition: SpellMgr.h:350
@ SPELL_GROUP_ELIXIR_SHATTRATH
Definition: SpellMgr.h:355
@ SPELL_GROUP_NONE
Definition: SpellMgr.h:351
@ SPELL_GROUP_CORE_RANGE_MAX
Definition: SpellMgr.h:356
@ SPELL_GROUP_ELIXIR_BATTLE
Definition: SpellMgr.h:352
@ SPELL_GROUP_ELIXIR_GUARDIAN
Definition: SpellMgr.h:353
@ SPELL_GROUP_ELIXIR_UNSTABLE
Definition: SpellMgr.h:354
ProcAttributes
Definition: SpellMgr.h:295
@ PROC_ATTR_NONE
Definition: SpellMgr.h:296
@ PROC_ATTR_CANT_PROC_FROM_ITEM_CAST
Definition: SpellMgr.h:304
@ PROC_ATTR_USE_STACKS_FOR_CHARGES
Definition: SpellMgr.h:301
@ PROC_ATTR_REDUCE_PROC_60
Definition: SpellMgr.h:303
@ PROC_ATTR_REQ_EXP_OR_HONOR
Definition: SpellMgr.h:297
@ PROC_ATTR_TRIGGERED_CAN_PROC
Definition: SpellMgr.h:298
@ PROC_ATTR_REQ_SPELLMOD
Definition: SpellMgr.h:300
@ PROC_ATTR_REQ_POWER_COST
Definition: SpellMgr.h:299
std::pair< SpellAreaForAreaMap::const_iterator, SpellAreaForAreaMap::const_iterator > SpellAreaForAreaMapBounds
Definition: SpellMgr.h:557
std::unordered_map< uint32, SpellChainNode > SpellChainMap
Definition: SpellMgr.h:569
ProcFlagsSpellPhase
Definition: SpellMgr.h:261
@ PROC_SPELL_PHASE_FINISH
Definition: SpellMgr.h:265
@ PROC_SPELL_PHASE_NONE
Definition: SpellMgr.h:262
@ PROC_SPELL_PHASE_CAST
Definition: SpellMgr.h:263
@ PROC_SPELL_PHASE_HIT
Definition: SpellMgr.h:264
@ PROC_SPELL_PHASE_MASK_ALL
Definition: SpellMgr.h:266
std::multimap< uint32, SpellArea const * > SpellAreaForAreaMap
Definition: SpellMgr.h:553
std::unordered_map< uint32, SpellThreatEntry > SpellThreatMap
Definition: SpellMgr.h:402
#define MAX_CREATURE_SPELL_DATA_SLOT
Definition: SpellMgr.h:631
SpellGroupStackRule
Definition: SpellMgr.h:382
@ SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER
Definition: SpellMgr.h:385
@ SPELL_GROUP_STACK_RULE_EXCLUSIVE
Definition: SpellMgr.h:384
@ SPELL_GROUP_STACK_RULE_DEFAULT
Definition: SpellMgr.h:383
@ SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT
Definition: SpellMgr.h:386
@ SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST
Definition: SpellMgr.h:387
@ SPELL_GROUP_STACK_RULE_MAX
Definition: SpellMgr.h:388
std::unordered_multimap< uint32, SpellGroup > SpellSpellGroupMap
Definition: SpellMgr.h:374
std::pair< SpellRequiredMap::const_iterator, SpellRequiredMap::const_iterator > SpellRequiredMapBounds
Definition: SpellMgr.h:573
std::multimap< uint32, SkillLineAbilityEntry const * > SkillLineAbilityMap
Definition: SpellMgr.h:620
std::map< uint32, PetAura > SpellPetAuraMap
Definition: SpellMgr.h:524
std::unordered_map< std::pair< SpellLinkedType, uint32 >, std::vector< int32 > > SpellLinkedMap
Definition: SpellMgr.h:641
std::multimap< uint32, SpellArea const * > SpellAreaForQuestMap
Definition: SpellMgr.h:551
std::map< int32, PetDefaultSpellsEntry > PetDefaultSpellsMap
Definition: SpellMgr.h:639
ProcFlagsSpellType
Definition: SpellMgr.h:250
@ PROC_SPELL_TYPE_NONE
Definition: SpellMgr.h:251
@ PROC_SPELL_TYPE_HEAL
Definition: SpellMgr.h:253
@ PROC_SPELL_TYPE_MASK_ALL
Definition: SpellMgr.h:255
@ PROC_SPELL_TYPE_DAMAGE
Definition: SpellMgr.h:252
@ PROC_SPELL_TYPE_NO_DMG_HEAL
Definition: SpellMgr.h:254
SpellLinkedType
Definition: SpellMgr.h:125
@ SPELL_LINK_HIT
Definition: SpellMgr.h:127
@ SPELL_LINK_CAST
Definition: SpellMgr.h:126
@ SPELL_LINK_AURA
Definition: SpellMgr.h:128
@ SPELL_LINK_REMOVE
Definition: SpellMgr.h:129
SpellCategories
Definition: SpellMgr.h:72
@ SPELLCATEGORY_DRINK
Definition: SpellMgr.h:77
@ SPELLCATEGORY_DEVOUR_MAGIC
Definition: SpellMgr.h:74
@ SPELLCATEGORY_HEALTH_MANA_POTIONS
Definition: SpellMgr.h:73
@ SPELLCATEGORY_FOOD
Definition: SpellMgr.h:76
@ SPELLCATEGORY_JUDGEMENT
Definition: SpellMgr.h:75
std::pair< SpellGroupSpellMap::const_iterator, SpellGroupSpellMap::const_iterator > SpellGroupSpellMapBounds
Definition: SpellMgr.h:379
TC_GAME_API PetFamilySpellsStore sPetFamilySpellsStore
Definition: SpellMgr.cpp:104
SpellAreaFlag
Definition: SpellMgr.h:527
@ SPELL_AREA_FLAG_AUTOREMOVE
Definition: SpellMgr.h:529
@ SPELL_AREA_FLAG_IGNORE_AUTOCAST_ON_QUEST_STATUS_CHANGE
Definition: SpellMgr.h:530
@ SPELL_AREA_FLAG_AUTOCAST
Definition: SpellMgr.h:528
std::unordered_map< uint32, SpellLearnSkillNode > SpellLearnSkillMap
Definition: SpellMgr.h:588
std::pair< SpellAreaForAuraMap::const_iterator, SpellAreaForAuraMap::const_iterator > SpellAreaForAuraMapBounds
Definition: SpellMgr.h:556
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
Definition: SpellMgr.h:621
ProcFlags
Definition: SpellMgr.h:134
@ PROC_FLAG_PROC_CLONE_SPELL
Definition: SpellMgr.h:178
@ PROC_FLAG_DEAL_MELEE_ABILITY
Definition: SpellMgr.h:143
@ PROC_FLAG_TAKE_HARMFUL_PERIODIC
Definition: SpellMgr.h:165
@ PROC_FLAG_MAIN_HAND_WEAPON_SWING
Definition: SpellMgr.h:171
@ PROC_FLAG_TAKE_MELEE_SWING
Definition: SpellMgr.h:141
@ MELEE_PROC_FLAG_MASK
Definition: SpellMgr.h:194
@ PROC_FLAG_TAKE_ANY_DAMAGE
Definition: SpellMgr.h:167
@ PROC_FLAG_LOOTED
Definition: SpellMgr.h:186
@ PROC_FLAG_CAST_ENDED
Definition: SpellMgr.h:184
@ AUTO_ATTACK_PROC_FLAG_MASK
Definition: SpellMgr.h:191
@ PROC_FLAG_TAKE_HELPFUL_ABILITY
Definition: SpellMgr.h:153
@ PROC_FLAG_DEAL_RANGED_ABILITY
Definition: SpellMgr.h:149
@ PROC_FLAG_ENCOUNTER_START
Definition: SpellMgr.h:182
@ PROC_FLAG_DEAL_MELEE_SWING
Definition: SpellMgr.h:140
@ TAKEN_HIT_PROC_FLAG_MASK
Definition: SpellMgr.h:218
@ PROC_FLAG_TAKE_HELPFUL_SPELL
Definition: SpellMgr.h:159
@ PROC_FLAG_JUMP
Definition: SpellMgr.h:176
@ PROC_FLAG_DEAL_HELPFUL_ABILITY
Definition: SpellMgr.h:152
@ PROC_FLAG_HEARTBEAT
Definition: SpellMgr.h:137
@ PROC_FLAG_DEAL_RANGED_ATTACK
Definition: SpellMgr.h:146
@ PROC_FLAG_TAKE_HARMFUL_SPELL
Definition: SpellMgr.h:162
@ PROC_FLAG_TAKE_MELEE_ABILITY
Definition: SpellMgr.h:144
@ PROC_FLAG_DEATH
Definition: SpellMgr.h:174
@ PROC_FLAG_DEAL_HARMFUL_ABILITY
Definition: SpellMgr.h:155
@ PROC_FLAG_DEAL_HARMFUL_PERIODIC
Definition: SpellMgr.h:164
@ REQ_SPELL_PHASE_PROC_FLAG_MASK
Definition: SpellMgr.h:225
@ PROC_FLAG_OFF_HAND_WEAPON_SWING
Definition: SpellMgr.h:172
@ PROC_FLAG_ENTER_COMBAT
Definition: SpellMgr.h:180
@ PROC_FLAG_KILL
Definition: SpellMgr.h:138
@ PROC_FLAG_DEAL_HELPFUL_SPELL
Definition: SpellMgr.h:158
@ RANGED_PROC_FLAG_MASK
Definition: SpellMgr.h:198
@ PROC_FLAG_DEAL_HELPFUL_PERIODIC
Definition: SpellMgr.h:169
@ PROC_FLAG_DEAL_HARMFUL_SPELL
Definition: SpellMgr.h:161
@ SPELL_PROC_FLAG_MASK
Definition: SpellMgr.h:201
@ PROC_FLAG_TAKE_RANGED_ABILITY
Definition: SpellMgr.h:150
@ DONE_HIT_PROC_FLAG_MASK
Definition: SpellMgr.h:211
@ PROC_FLAG_TAKE_HELPFUL_PERIODIC
Definition: SpellMgr.h:188
@ PROC_FLAG_TAKE_RANGED_ATTACK
Definition: SpellMgr.h:147
@ PROC_FLAG_NONE
Definition: SpellMgr.h:135
@ PROC_FLAG_TAKE_HARMFUL_ABILITY
Definition: SpellMgr.h:156
std::map< uint32, PetLevelupSpellSet > PetLevelupSpellMap
Definition: SpellMgr.h:627
std::set< uint32 > PetFamilySpellsSet
Definition: SpellMgr.h:623
EffectRadiusIndex
Definition: SpellMgr.h:418
@ EFFECT_RADIUS_14_YARDS
Definition: SpellMgr.h:471
@ EFFECT_RADIUS_500_YARDS
Definition: SpellMgr.h:442
@ EFFECT_RADIUS_13_YARDS
Definition: SpellMgr.h:429
@ EFFECT_RADIUS_7_YARDS
Definition: SpellMgr.h:448
@ EFFECT_RADIUS_100_YARDS
Definition: SpellMgr.h:424
@ EFFECT_RADIUS_45_YARDS_2
Definition: SpellMgr.h:468
@ EFFECT_RADIUS_80_YARDS
Definition: SpellMgr.h:443
@ EFFECT_RADIUS_20_YARDS
Definition: SpellMgr.h:421
@ EFFECT_RADIUS_60_YARDS_2
Definition: SpellMgr.h:462
@ EFFECT_RADIUS_8_YARDS
Definition: SpellMgr.h:426
@ EFFECT_RADIUS_34_YARDS
Definition: SpellMgr.h:450
@ EFFECT_RADIUS_45_YARDS
Definition: SpellMgr.h:423
@ EFFECT_RADIUS_2_YARDS
Definition: SpellMgr.h:419
@ EFFECT_RADIUS_50000_YARDS_2
Definition: SpellMgr.h:465
@ EFFECT_RADIUS_44_YARDS
Definition: SpellMgr.h:470
@ EFFECT_RADIUS_5_YARDS_3
Definition: SpellMgr.h:463
@ EFFECT_RADIUS_15_YARDS
Definition: SpellMgr.h:430
@ EFFECT_RADIUS_23_YARDS
Definition: SpellMgr.h:473
@ EFFECT_RADIUS_55_YARDS
Definition: SpellMgr.h:446
@ EFFECT_RADIUS_65_YARDS
Definition: SpellMgr.h:436
@ EFFECT_RADIUS_32_YARDS
Definition: SpellMgr.h:469
@ EFFECT_RADIUS_30_YARDS
Definition: SpellMgr.h:422
@ EFFECT_RADIUS_1_YARD
Definition: SpellMgr.h:428
@ EFFECT_RADIUS_9_YARDS
Definition: SpellMgr.h:451
@ EFFECT_RADIUS_16_YARDS
Definition: SpellMgr.h:454
@ EFFECT_RADIUS_60_YARDS
Definition: SpellMgr.h:459
@ EFFECT_RADIUS_90_YARDS
Definition: SpellMgr.h:460
@ EFFECT_RADIUS_130_YARDS
Definition: SpellMgr.h:466
@ EFFECT_RADIUS_4_YARDS
Definition: SpellMgr.h:438
@ EFFECT_RADIUS_25_YARDS
Definition: SpellMgr.h:432
@ EFFECT_RADIUS_10_YARDS_2
Definition: SpellMgr.h:456
@ EFFECT_RADIUS_15_YARDS_2
Definition: SpellMgr.h:458
@ EFFECT_RADIUS_5_YARDS
Definition: SpellMgr.h:420
@ EFFECT_RADIUS_40_YARDS
Definition: SpellMgr.h:435
@ EFFECT_RADIUS_70_YARDS
Definition: SpellMgr.h:437
@ EFFECT_RADIUS_5_YARDS_2
Definition: SpellMgr.h:457
@ EFFECT_RADIUS_3_YARDS
Definition: SpellMgr.h:427
@ EFFECT_RADIUS_38_YARDS
Definition: SpellMgr.h:467
@ EFFECT_RADIUS_21_YARDS
Definition: SpellMgr.h:449
@ EFFECT_RADIUS_50_YARDS
Definition: SpellMgr.h:439
@ EFFECT_RADIUS_50000_YARDS
Definition: SpellMgr.h:440
@ EFFECT_RADIUS_60_YARDS_3
Definition: SpellMgr.h:464
@ EFFECT_RADIUS_18_YARDS
Definition: SpellMgr.h:431
@ EFFECT_RADIUS_200_YARDS
Definition: SpellMgr.h:434
@ EFFECT_RADIUS_12_YARDS
Definition: SpellMgr.h:444
@ EFFECT_RADIUS_10_YARDS
Definition: SpellMgr.h:425
@ EFFECT_RADIUS_0_YARDS
Definition: SpellMgr.h:447
@ EFFECT_RADIUS_3_5_YARDS
Definition: SpellMgr.h:474
@ EFFECT_RADIUS_150_YARDS
Definition: SpellMgr.h:452
@ EFFECT_RADIUS_80_YARDS_2
Definition: SpellMgr.h:475
@ EFFECT_RADIUS_35_YARDS
Definition: SpellMgr.h:433
@ EFFECT_RADIUS_47_YARDS
Definition: SpellMgr.h:472
@ EFFECT_RADIUS_6_YARDS
Definition: SpellMgr.h:441
@ EFFECT_RADIUS_11_YARDS
Definition: SpellMgr.h:453
@ EFFECT_RADIUS_15_YARDS_3
Definition: SpellMgr.h:461
@ EFFECT_RADIUS_0_5_YARDS
Definition: SpellMgr.h:455
@ EFFECT_RADIUS_99_YARDS
Definition: SpellMgr.h:445
ProcFlags2
Definition: SpellMgr.h:231
@ PROC_FLAG_2_TARGET_DIES
Definition: SpellMgr.h:233
@ PROC_FLAG_2_NONE
Definition: SpellMgr.h:232
@ PROC_FLAG_2_KNOCKBACK
Definition: SpellMgr.h:234
@ PROC_FLAG_2_CAST_SUCCESSFUL
Definition: SpellMgr.h:235
std::multimap< uint32, uint32 > SpellsRequiringSpellMap
Definition: SpellMgr.h:576
EnchantProcAttributes
Definition: SpellMgr.h:334
@ ENCHANT_PROC_ATTR_LIMIT_60
Definition: SpellMgr.h:336
@ ENCHANT_PROC_ATTR_WHITE_HIT
Definition: SpellMgr.h:335
ProcFlagsHit
Definition: SpellMgr.h:272
@ PROC_HIT_BLOCK
Definition: SpellMgr.h:280
@ PROC_HIT_FULL_RESIST
Definition: SpellMgr.h:277
@ PROC_HIT_FULL_BLOCK
Definition: SpellMgr.h:287
@ PROC_HIT_MISS
Definition: SpellMgr.h:276
@ PROC_HIT_DISPEL
Definition: SpellMgr.h:288
@ PROC_HIT_INTERRUPT
Definition: SpellMgr.h:286
@ PROC_HIT_NONE
Definition: SpellMgr.h:273
@ PROC_HIT_DEFLECT
Definition: SpellMgr.h:283
@ PROC_HIT_EVADE
Definition: SpellMgr.h:281
@ PROC_HIT_DODGE
Definition: SpellMgr.h:278
@ PROC_HIT_IMMUNE
Definition: SpellMgr.h:282
@ PROC_HIT_ABSORB
Definition: SpellMgr.h:284
@ PROC_HIT_PARRY
Definition: SpellMgr.h:279
@ PROC_HIT_MASK_ALL
Definition: SpellMgr.h:289
@ PROC_HIT_CRITICAL
Definition: SpellMgr.h:275
@ PROC_HIT_NORMAL
Definition: SpellMgr.h:274
@ PROC_HIT_REFLECT
Definition: SpellMgr.h:285
std::multimap< uint32, uint32 > SpellRequiredMap
Definition: SpellMgr.h:572
SpellOtherImmunity
Definition: SpellMgr.h:599
std::map< uint32, PetFamilySpellsSet > PetFamilySpellsStore
Definition: SpellMgr.h:624
std::map< std::pair< uint32, uint8 >, uint32 > SpellTotemModelMap
Definition: SpellMgr.h:685
std::pair< SpellAreaForQuestMap::const_iterator, SpellAreaForQuestMap::const_iterator > SpellAreaForQuestMapBounds
Definition: SpellMgr.h:555
std::unordered_map< SpellGroup, SpellGroupStackRule > SpellGroupStackMap
Definition: SpellMgr.h:391
std::pair< SpellLearnSpellMap::const_iterator, SpellLearnSpellMap::const_iterator > SpellLearnSpellMapBounds
Definition: SpellMgr.h:618
std::multimap< uint32, uint32 > PetLevelupSpellSet
Definition: SpellMgr.h:626
int32 damage
Definition: SpellMgr.h:522
int32 GetDamage() const
Definition: SpellMgr.h:514
std::unordered_map< uint32, uint32 > PetAuraMap
Definition: SpellMgr.h:482
uint32 GetAura(uint32 petEntry) const
Definition: SpellMgr.h:493
PetAura(uint32 petEntry, uint32 aura, bool _removeOnChangePet, int _damage)
Definition: SpellMgr.h:487
PetAura()
Definition: SpellMgr.h:485
bool removeOnChangePet
Definition: SpellMgr.h:521
PetAuraMap auras
Definition: SpellMgr.h:520
bool IsRemovedOnChangePet() const
Definition: SpellMgr.h:509
void AddAura(uint32 petEntry, uint32 aura)
Definition: SpellMgr.h:504
SpellRequiredMap mSpellReq
Definition: SpellMgr.h:826
SpellLinkedMap mSpellLinkedMap
Definition: SpellMgr.h:836
SpellMgr(SpellMgr const &right)=delete
SpellMgr(SpellMgr &&right)=delete
SkillLineAbilityMap mSkillLineAbilityMap
Definition: SpellMgr.h:843
SpellAreaForAuraMap mSpellAreaForAuraMap
Definition: SpellMgr.h:841
SpellChainMap mSpellChains
Definition: SpellMgr.h:824
SpellMgr & operator=(SpellMgr &&right)=delete
SpellPetAuraMap mSpellPetAuraMap
Definition: SpellMgr.h:835
SpellLearnSkillMap mSpellLearnSkills
Definition: SpellMgr.h:827
SpellAreaForQuestMap mSpellAreaForQuestEndMap
Definition: SpellMgr.h:840
PetDefaultSpellsMap mPetDefaultSpellsMap
Definition: SpellMgr.h:845
SpellDifficultySearcherMap mSpellDifficultySearcherMap
Definition: SpellMgr.h:823
SpellTotemModelMap mSpellTotemModel
Definition: SpellMgr.h:846
SpellGroupStackMap mSpellGroupStack
Definition: SpellMgr.h:832
SpellEnchantProcEventMap mSpellEnchantProcEventMap
Definition: SpellMgr.h:837
PetLevelupSpellMap mPetLevelupSpellMap
Definition: SpellMgr.h:844
SpellsRequiringSpellMap mSpellsReqSpell
Definition: SpellMgr.h:825
SpellTargetPositionMap mSpellTargetPositions
Definition: SpellMgr.h:829
SpellGroupSpellMap mSpellGroupSpell
Definition: SpellMgr.h:831
SameEffectStackMap mSpellSameEffectStack
Definition: SpellMgr.h:833
SpellAreaForAreaMap mSpellAreaForAreaMap
Definition: SpellMgr.h:842
SpellAreaMap mSpellAreaMap
Definition: SpellMgr.h:838
SpellInfo const * AssertSpellInfo(uint32 spellId, Difficulty difficulty) const
Definition: SpellMgr.h:776
SpellLearnSpellMap mSpellLearnSpells
Definition: SpellMgr.h:828
SpellSpellGroupMap mSpellSpellGroup
Definition: SpellMgr.h:830
SpellThreatMap mSpellThreatMap
Definition: SpellMgr.h:834
SpellAreaForQuestMap mSpellAreaForQuestMap
Definition: SpellMgr.h:839
SpellMgr & operator=(SpellMgr const &right)=delete
Utility class to enable range for loop syntax for multimap.equal_range uses.
Definition: IteratorPair.h:32
Definition: Unit.h:627
STL namespace.
std::bitset< MAX_MECHANIC > Mechanic
Definition: SpellMgr.h:611
std::vector< SpellEffectName > Effect
Definition: SpellMgr.h:612
std::bitset< MAX_SPELL_SCHOOL > School
Definition: SpellMgr.h:609
std::bitset< DISPEL_MAX > DispelType
Definition: SpellMgr.h:610
std::vector< AuraType > Aura
Definition: SpellMgr.h:613
uint32 spellid[MAX_CREATURE_SPELL_DATA_SLOT]
Definition: SpellMgr.h:635
uint32 questEnd
Definition: SpellMgr.h:538
uint8 flags
Definition: SpellMgr.h:544
uint32 questStartStatus
Definition: SpellMgr.h:542
uint32 spellId
Definition: SpellMgr.h:535
uint32 questEndStatus
Definition: SpellMgr.h:543
int32 auraSpell
Definition: SpellMgr.h:539
Trinity::RaceMask< uint64 > raceMask
Definition: SpellMgr.h:540
Gender gender
Definition: SpellMgr.h:541
uint32 areaId
Definition: SpellMgr.h:536
uint32 questStart
Definition: SpellMgr.h:537
SpellInfo const * last
Definition: SpellMgr.h:565
SpellInfo const * next
Definition: SpellMgr.h:563
SpellInfo const * first
Definition: SpellMgr.h:564
SpellInfo const * prev
Definition: SpellMgr.h:562
SpellCastingRequirementsEntry const * CastingRequirements
Definition: SpellMgr.h:665
SpellReagentsEntry const * Reagents
Definition: SpellMgr.h:676
std::vector< SpellXSpellVisualEntry const * > Visuals
Definition: SpellMgr.h:682
SpellTargetRestrictionsEntry const * TargetRestrictions
Definition: SpellMgr.h:680
std::vector< SpellLabelEntry const * > Labels
Definition: SpellMgr.h:672
SpellTotemsEntry const * Totems
Definition: SpellMgr.h:681
SpellAuraRestrictionsEntry const * AuraRestrictions
Definition: SpellMgr.h:664
SpellScalingEntry const * Scaling
Definition: SpellMgr.h:678
SpellInterruptsEntry const * Interrupts
Definition: SpellMgr.h:671
SpellCategoriesEntry const * Categories
Definition: SpellMgr.h:666
SpellEquippedItemsEntry const * EquippedItems
Definition: SpellMgr.h:670
SpellShapeshiftEntry const * Shapeshift
Definition: SpellMgr.h:679
SpellAuraOptionsEntry const * AuraOptions
Definition: SpellMgr.h:663
std::array< SpellEffectEntry const *, MAX_SPELL_EFFECTS > Effects
Definition: SpellMgr.h:669
SpellClassOptionsEntry const * ClassOptions
Definition: SpellMgr.h:667
std::vector< SpellReagentsCurrencyEntry const * > ReagentsCurrency
Definition: SpellMgr.h:677
SpellCooldownsEntry const * Cooldowns
Definition: SpellMgr.h:668
SpellLevelsEntry const * Levels
Definition: SpellMgr.h:673
uint32 OverridesSpell
Definition: SpellMgr.h:593
uint32 SpellFamilyName
Definition: SpellMgr.h:319
ProcFlagsHit HitMask
Definition: SpellMgr.h:324
float ProcsPerMinute
Definition: SpellMgr.h:327
Milliseconds Cooldown
Definition: SpellMgr.h:329
uint32 Charges
Definition: SpellMgr.h:330
ProcFlagsSpellPhase SpellPhaseMask
Definition: SpellMgr.h:323
flag128 SpellFamilyMask
Definition: SpellMgr.h:320
uint32 SchoolMask
Definition: SpellMgr.h:318
ProcFlagsSpellType SpellTypeMask
Definition: SpellMgr.h:322
uint32 DisableEffectsMask
Definition: SpellMgr.h:326
ProcFlagsInit ProcFlags
Definition: SpellMgr.h:321
float Chance
Definition: SpellMgr.h:328
ProcAttributes AttributesMask
Definition: SpellMgr.h:325
float target_Orientation
Definition: SpellMgr.h:411
size_t operator()(SpellGroup const &group) const noexcept
Definition: SpellMgr.h:364