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