diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-05-03 16:19:19 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-05-03 16:19:19 +0200 |
commit | 829cf38c67a70c1e0ec9886562e7ae7ae4fda17d (patch) | |
tree | 72ed1f1a2c511eed218933c8ec67c700c1871288 /src | |
parent | ecac9d79e359f24c7f45d71abd2ae15bf9c07682 (diff) |
Core/Spells: Relaxed aura exclusivity check to allow casting spells that have other, non-aura effects even if aura will not be applied
Closes #24553
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 6263e039ec0..f7ad49513af 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3499,13 +3499,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(), 1, SPELL_FAILED_AURA_BOUNCED); - } - aura->Remove(); return; } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 877c25f9698..fec0e81fc11 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5410,6 +5410,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint } uint8 approximateAuraEffectMask = 0; + uint8 nonAuraEffectMask = 0; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { // for effects of spells that have only one target @@ -5831,6 +5832,8 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint if (m_spellInfo->Effects[i].IsAura()) approximateAuraEffectMask |= 1 << i; + else if (m_spellInfo->Effects[i].IsEffect()) + nonAuraEffectMask |= 1 << i; } for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -5960,7 +5963,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint } // check if target already has the same type, but more powerful aura - if (!m_spellInfo->IsTargetingArea()) + if (!nonAuraEffectMask && (approximateAuraEffectMask & (1 << i)) && !m_spellInfo->IsTargetingArea()) if (Unit* target = m_targets.GetUnitTarget()) if (!target->IsHighestExclusiveAuraEffect(m_spellInfo, AuraType(m_spellInfo->Effects[i].ApplyAuraName), m_spellInfo->Effects[i].CalcValue(m_caster, m_spellValue->EffectBasePoints), approximateAuraEffectMask, false)) |