aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-10-25 22:10:55 -0300
committerariel- <ariel-@users.noreply.github.com>2016-10-25 22:10:55 -0300
commitbea0c019644b06a06ab07f150de87a1496898459 (patch)
treeff5871151526a0b60853f4d9930aedfd7fcc4189 /src
parentde22843bcbe13ea2ba1ef89605a96aaaac6a3587 (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
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp13
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp8
-rw-r--r--src/server/game/Spells/Spell.cpp5
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 997c2904e9e..fabdbe44334 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -976,15 +976,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 970bb93b271..2d8916463a4 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1892,6 +1892,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())
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index b67a488624f..b86f0b20d68 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2563,12 +2563,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