diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 158b9d05e1f..a603303bf5e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3385,13 +3385,6 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura) if (!IsHighestExclusiveAura(aura)) { - if (!aura->GetSpellInfo()->IsAffectingArea()) - { - Unit* caster = aura->GetCaster(); - if (caster && caster->GetTypeId() == TYPEID_PLAYER) - Spell::SendCastResult(caster->ToPlayer(), aura->GetSpellInfo(), aura->GetSpellVisual(), aura->GetCastId(), SPELL_FAILED_AURA_BOUNCED); - } - aura->Remove(); return; } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 01cccc16af3..5e0227891c8 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5574,6 +5574,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32 return castResult; uint32 approximateAuraEffectMask = 0; + uint32 nonAuraEffectMask = 0; for (SpellEffectInfo const& spellEffectInfo : m_spellInfo->GetEffects()) { // for effects of spells that have only one target @@ -6134,6 +6135,8 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32 if (spellEffectInfo.IsAura()) approximateAuraEffectMask |= 1 << spellEffectInfo.EffectIndex; + else if (spellEffectInfo.IsEffect()) + nonAuraEffectMask |= 1 << spellEffectInfo.EffectIndex; } for (SpellEffectInfo const& spellEffectInfo : m_spellInfo->GetEffects()) @@ -6255,7 +6258,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32 } // check if target already has the same type, but more powerful aura - if (!m_spellInfo->IsTargetingArea()) + if (!nonAuraEffectMask && (approximateAuraEffectMask & (1 << spellEffectInfo.EffectIndex)) && !m_spellInfo->IsTargetingArea()) if (Unit* target = m_targets.GetUnitTarget()) if (!target->IsHighestExclusiveAuraEffect(m_spellInfo, spellEffectInfo.ApplyAuraName, spellEffectInfo.CalcValue(m_caster, &m_spellValue->EffectBasePoints[spellEffectInfo.EffectIndex], nullptr, nullptr, m_castItemEntry, m_castItemLevel), |
