diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index a1f9eacfef..6c07070cfe 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -327,7 +327,7 @@ enum TriggerCastFlags : uint32 TRIGGERED_IGNORE_CASTER_AURASTATE = 0x00000800, //! Will ignore caster aura states including combat requirements and death state TRIGGERED_DISALLOW_PROC_EVENTS = 0x00001000, //! Disallows proc events from triggered spell (default) TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE = 0x00002000, //! Will ignore mounted/on vehicle restrictions - // reuse = 0x00004000, + TRIGGERED_IGNORE_BLOCKED_SPELL_FAMILY = 0x00004000, //! Will ignore blocked casts of SPELL_AURA_BLOCK_SPELL_FAMILY // reuse = 0x00008000, TRIGGERED_IGNORE_CASTER_AURAS = 0x00010000, //! Will ignore caster aura restrictions or requirements TRIGGERED_DONT_RESET_PERIODIC_TIMER = 0x00020000, //! Will allow periodic aura timers to keep ticking (instead of resetting) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index dc9081c7da..ca9e421774 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5360,10 +5360,10 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint } } - Unit::AuraEffectList const& blockSpells = m_caster->GetAuraEffectsByType(SPELL_AURA_BLOCK_SPELL_FAMILY); - for (Unit::AuraEffectList::const_iterator blockItr = blockSpells.begin(); blockItr != blockSpells.end(); ++blockItr) - if (uint32((*blockItr)->GetMiscValue()) == m_spellInfo->SpellFamilyName) - return SPELL_FAILED_SPELL_UNAVAILABLE; + if (!(_triggeredCastFlags & TRIGGERED_IGNORE_BLOCKED_SPELL_FAMILY)) + for (AuraEffect const* blocked : m_caster->GetAuraEffectsByType(SPELL_AURA_BLOCK_SPELL_FAMILY)) + if (!blocked->GetMiscValue() || uint32(blocked->GetMiscValue()) == m_spellInfo->SpellFamilyName) + return SPELL_FAILED_SPELL_UNAVAILABLE; bool reqCombat = true; Unit::AuraEffectList const& stateAuras = m_caster->GetAuraEffectsByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);