aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-12-17 16:45:50 +0100
committerShauren <shauren.trinity@gmail.com>2017-12-17 16:45:50 +0100
commite86a2c439aa2a032ce338d974dae1e5311bcb18f (patch)
treef48cc15721978fdd2722f266a5884e0c0202e657 /src/server/game/Spells/SpellInfo.cpp
parente573607ccd01e3e4ae2142f8ef56cce66b173b8a (diff)
Core/Auras: Implemented using all aura interrupt flag fields
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 1de54909348..bda28f6f3ef 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1103,11 +1103,18 @@ SpellInfo::SpellInfo(SpellInfoLoadHelper const& data, SpellEffectEntryMap const&
EquippedItemInventoryTypeMask = _equipped ? _equipped->EquippedItemInventoryTypeMask : -1;
// SpellInterruptsEntry
- SpellInterruptsEntry const* _interrupt = data.Interrupts;
- InterruptFlags = _interrupt ? _interrupt->InterruptFlags : 0;
- // TODO: 6.x these flags have 2 parts
- AuraInterruptFlags = _interrupt ? _interrupt->AuraInterruptFlags[0] : 0;
- ChannelInterruptFlags = _interrupt ? _interrupt->ChannelInterruptFlags[0] : 0;
+ if (SpellInterruptsEntry const* _interrupt = data.Interrupts)
+ {
+ InterruptFlags = _interrupt->InterruptFlags;
+ std::copy(std::begin(_interrupt->AuraInterruptFlags), std::end(_interrupt->AuraInterruptFlags), AuraInterruptFlags.begin());
+ std::copy(std::begin(_interrupt->ChannelInterruptFlags), std::end(_interrupt->ChannelInterruptFlags), ChannelInterruptFlags.begin());
+ }
+ else
+ {
+ InterruptFlags = 0;
+ AuraInterruptFlags.fill(0);
+ ChannelInterruptFlags.fill(0);
+ }
// SpellLevelsEntry
SpellLevelsEntry const* _levels = data.Levels;
@@ -2294,7 +2301,7 @@ void SpellInfo::_LoadSpellSpecific()
case SPELLFAMILY_GENERIC:
{
// Food / Drinks (mostly)
- if (AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED)
+ if (HasAuraInterruptFlag(AURA_INTERRUPT_FLAG_NOT_SEATED))
{
bool food = false;
bool drink = false;