fix(Core/Spells): Implement SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER. (#3313)

Co-authored-by: HeartWell <moki.play@mail.ru>
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
Petric
2020-09-03 11:02:00 +01:00
committed by GitHub
parent a51c865a40
commit 15cc6fe0b6
3 changed files with 14 additions and 0 deletions

View File

@@ -2861,6 +2861,10 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
if (missInfo != SPELL_MISS_EVADE && effectUnit != m_caster && m_caster->IsFriendlyTo(effectUnit) && m_spellInfo->IsPositive() && effectUnit->IsInCombat())
m_caster->SetInCombatWith(effectUnit);
// Check for SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER
if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER) && effectUnit->GetTypeId() != TYPEID_PLAYER)
caster->CastSpell(effectUnit, SPELL_INTERRUPT_NONPLAYER, true);
if (spellHitTarget)
{
//AI functions