mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
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
(cherry picked from commit bea0c01964)
This commit is contained in:
@@ -1196,15 +1196,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;
|
||||
}
|
||||
|
||||
@@ -1717,6 +1717,14 @@ uint32 Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& even
|
||||
if (!sSpellMgr->CanSpellTriggerProcOnEvent(*procEntry, eventInfo))
|
||||
return 0;
|
||||
|
||||
// check don't break stealth attr present
|
||||
if (m_spellInfo->HasAura(DIFFICULTY_NONE, 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())
|
||||
|
||||
@@ -2610,12 +2610,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
|
||||
|
||||
Reference in New Issue
Block a user