Core/Spells: fix issues with delayed spells and auras

This commit is contained in:
PolarCookie authored and Ovahlord committed 2022-09-12 09:15:20 +02:00
1 parent 1d013e5d3f
commit b4b8fffa22
1 file changed
+1 -8
+1 -8
View File
@@ -2959,14 +2959,7 @@ void Spell::DoSpellEffectHit(Unit* unit, uint8 effIndex, TargetInfo& hitInfo)
bool refresh = false;
// delayed spells with multiple targets need to create a new aura object, otherwise we'll access a deleted aura
if (m_spellInfo->Speed > 0.0f && !m_spellInfo->IsChanneled())
{
_spellAura = nullptr;
if (Aura* aura = unit->GetAura(m_spellInfo->Id, caster->GetGUID(), m_CastItem ? m_CastItem->GetGUID() : ObjectGuid::Empty, aura_effmask))
_spellAura = aura->ToUnitAura();
}
if (!_spellAura)
if (!_spellAura || (m_spellInfo->Speed > 0.0f && !m_spellInfo->IsChanneled()))
{
uint8 const allAuraEffectMask = Aura::BuildEffectMaskForOwner(hitInfo.AuraSpellInfo, MAX_EFFECT_MASK, unit);
int32 const* bp = hitInfo.AuraBasePoints;