Core/Spells: moved handling of SPELL_ATTR0_CU_DONT_BREAK_STEALTH inside proc system.

Fixes additional issues with spells that shouldn't be breaking stealth and had this attribute
This commit is contained in:
ariel- authored and roc13x committed 2017-05-04 01:01:24 +01:00
1 parent b3eb7c121f
commit 21ac6296be
3 files changed
+13 -13

No files matched your search

@@ -1085,15 +1085,12 @@ bool AuraEffect::CheckEffectProc(AuraApplication* aurApp, ProcEventInfo& eventIn
return false;
// Spell own damage at apply won't break CC
if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
if (spellInfo && spellInfo == GetSpellInfo())
{
if (spellInfo == GetSpellInfo())
{
Aura* aura = GetBase();
// called from spellcast, should not have ticked yet
if (aura->GetDuration() == aura->GetMaxDuration())
return false;
}
Aura* aura = GetBase();
// called from spellcast, should not have ticked yet
if (aura->GetDuration() == aura->GetMaxDuration())
return false;
}
break;
}
@@ -1756,6 +1756,14 @@ uint8 Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& event
if (!sSpellMgr->CanSpellTriggerProcOnEvent(*procEntry, eventInfo))
return 0;
// check don't break stealth attr present
if (m_spellInfo->HasAura(SPELL_AURA_MOD_STEALTH))
{
if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_DONT_BREAK_STEALTH))
return 0;
}
// check if aura can proc when spell is triggered (exception for hunter auto shot & wands)
if (!(procEntry->AttributesMask & PROC_ATTR_TRIGGERED_CAN_PROC) && !(eventInfo.GetTypeMask() & AUTO_ATTACK_PROC_FLAG_MASK))
if (Spell const* spell = eventInfo.GetProcSpell())
-5
View File
@@ -2580,12 +2580,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
return SPELL_MISS_EVADE;
if (m_caster->_IsValidAttackTarget(unit, m_spellInfo))
{
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
if (!m_spellInfo->HasAttribute(SPELL_ATTR0_CU_DONT_BREAK_STEALTH))
unit->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
}
else if (m_caster->IsFriendlyTo(unit))
{
// for delayed spells ignore negative spells (after duel end) for friendly targets