diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-10-26 03:10:55 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-10-15 16:59:54 +0200 |
commit | 54c0a01062d5fd41e608fd05e2afd4145fdf06a6 (patch) | |
tree | 17521fe45fabe903013c6ef7d6bac1b97bd70b8f | |
parent | 662c98456d9fde38ccf62882895385fb7ce44dbc (diff) |
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 bea0c019644b06a06ab07f150de87a1496898459)
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 13 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 8 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 5 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 4328b051623..501383c4261 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -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; } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 8fc56f81a05..7cd36c6b1fb 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -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()) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 64e2a2814c9..a9d2d27b9b0 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -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 |