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:
@@ -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())
|
if (missInfo != SPELL_MISS_EVADE && effectUnit != m_caster && m_caster->IsFriendlyTo(effectUnit) && m_spellInfo->IsPositive() && effectUnit->IsInCombat())
|
||||||
m_caster->SetInCombatWith(effectUnit);
|
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)
|
if (spellHitTarget)
|
||||||
{
|
{
|
||||||
//AI functions
|
//AI functions
|
||||||
|
|||||||
@@ -234,6 +234,8 @@ struct ChannelTargetData
|
|||||||
SpellDestination spellDst;
|
SpellDestination spellDst;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const uint32 SPELL_INTERRUPT_NONPLAYER = 32747;
|
||||||
|
|
||||||
class Spell
|
class Spell
|
||||||
{
|
{
|
||||||
friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
|
friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
|
||||||
|
|||||||
@@ -6363,6 +6363,14 @@ void SpellMgr::LoadDbcDataCorrections()
|
|||||||
spellInfo->EffectImplicitTargetA[EFFECT_1] = TARGET_UNIT_TARGET_ANY;
|
spellInfo->EffectImplicitTargetA[EFFECT_1] = TARGET_UNIT_TARGET_ANY;
|
||||||
spellInfo->EffectImplicitTargetA[EFFECT_2] = TARGET_UNIT_TARGET_ANY;
|
spellInfo->EffectImplicitTargetA[EFFECT_2] = TARGET_UNIT_TARGET_ANY;
|
||||||
break;
|
break;
|
||||||
|
// Check for SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER
|
||||||
|
case 47476: // Deathknight - Strangulate
|
||||||
|
case 15487: // Priest - Silence
|
||||||
|
case 5211: // Druid - Bash - R1
|
||||||
|
case 6798: // Druid - Bash - R2
|
||||||
|
case 8983: // Druid - Bash - R3
|
||||||
|
spellInfo->AttributesEx7 |= SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (spellInfo->SpellFamilyName)
|
switch (spellInfo->SpellFamilyName)
|
||||||
|
|||||||
Reference in New Issue
Block a user