aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellMgr.cpp
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-11-12 17:58:00 -0300
committerariel- <ariel-@users.noreply.github.com>2016-11-12 17:58:00 -0300
commit50a3ce5703bdaa4fe16e2e773eabafa9a4818083 (patch)
tree40baf288a3eb5a323c9183ba3e834dec5e9de771 /src/server/game/Spells/SpellMgr.cpp
parent5cb8409f1ee57e8dccb63cd11ce241b7a853379c (diff)
Core/Spell: revamp of immunities system
- Spell attributes research - Container optimization - Do not skip damage immunity checks on SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY present - Added additonal arguments support to SendCastResult / CheckCast, spells can now send proper error messages - Loads spell immune masks/states/effects at startup. - This cached info is used whenever a spell cast requires immunities to be known beforehand (to see if an aura could be applied for example) Closes #16658 Closes #16901 Closes #18114
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 1d3e51fe805..d034c744cc1 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2985,9 +2985,6 @@ void SpellMgr::LoadSpellInfoCorrections()
case 71839: // Drain Life - Bryntroll Heroic
spellInfo->AttributesEx2 |= SPELL_ATTR2_CANT_CRIT;
break;
- case 34471: // The Beast Within
- spellInfo->AttributesEx5 |= SPELL_ATTR5_USABLE_WHILE_CONFUSED | SPELL_ATTR5_USABLE_WHILE_FEARED | SPELL_ATTR5_USABLE_WHILE_STUNNED;
- break;
case 56606: // Ride Jokkum
case 61791: // Ride Vehicle (Yogg-Saron)
/// @todo: remove this when basepoints of all Ride Vehicle auras are calculated correctly
@@ -3527,3 +3524,18 @@ void SpellMgr::LoadSpellInfoDiminishing()
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo diminishing infos in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
+
+void SpellMgr::LoadSpellInfoImmunities()
+{
+ uint32 oldMSTime = getMSTime();
+
+ for (SpellInfo* spellInfo : mSpellInfoMap)
+ {
+ if (!spellInfo)
+ continue;
+
+ spellInfo->_LoadImmunityInfo();
+ }
+
+ TC_LOG_INFO("server.loading", ">> Loaded SpellInfo immunity infos in %u ms", GetMSTimeDiffToNow(oldMSTime));
+}