diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-01-30 21:29:55 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-01-30 21:29:55 +0100 |
commit | f70a5817e1c07891185d716611d45f50b1c73b78 (patch) | |
tree | 6d08eeee3021a72e0742fd82d836696556a57f96 /src/server/game/Spells/SpellMgr.h | |
parent | 9e13fee4a6374680e99ab4407fed73940954ea91 (diff) |
Core/Creatures: Move immunities to separate table and implemented setting immunties to dispel, spell effects, aura types, aoe and chain targeting
Diffstat (limited to 'src/server/game/Spells/SpellMgr.h')
-rw-r--r-- | src/server/game/Spells/SpellMgr.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index b547c154c79..95f67f2cdaa 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -30,7 +30,7 @@ #include "RaceMask.h" #include "SharedDefines.h" #include "SpellDefines.h" - +#include <bitset> #include <functional> #include <map> #include <set> @@ -64,6 +64,7 @@ struct SpellShapeshiftEntry; struct SpellTargetRestrictionsEntry; struct SpellTotemsEntry; struct SpellXSpellVisualEntry; +enum AuraType : uint32; // only used in code enum SpellCategories @@ -593,6 +594,17 @@ struct SpellLearnSpellNode bool AutoLearned; // This marks the spell as automatically learned from another source that - will only be used for unlearning }; +struct CreatureImmunities +{ + std::bitset<MAX_SPELL_SCHOOL> School; + std::bitset<DISPEL_MAX> DispelType; + std::bitset<MAX_MECHANIC> Mechanic; + std::vector<SpellEffectName> Effect; + std::vector<AuraType> Aura; + bool ImmuneAoE = false; // NYI + bool ImmuneChain = false; // NYI +}; + typedef std::multimap<uint32, SpellLearnSpellNode> SpellLearnSpellMap; typedef std::pair<SpellLearnSpellMap::const_iterator, SpellLearnSpellMap::const_iterator> SpellLearnSpellMapBounds; @@ -745,6 +757,9 @@ class TC_GAME_API SpellMgr SpellAreaForAuraMapBounds GetSpellAreaForAuraMapBounds(uint32 spell_id) const; SpellAreaForAreaMapBounds GetSpellAreaForAreaMapBounds(uint32 area_id) const; + // Immunities + static CreatureImmunities const* GetCreatureImmunities(int32 creatureImmunitiesId); + // SpellInfo object management SpellInfo const* GetSpellInfo(uint32 spellId, Difficulty difficulty) const; |