mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Spells: fix issues with delayed spells and auras (#22382)
* Core/Spells: fix issues with delayed spells and auras
* Make Travis Happy
(cherry picked from commit a0999744ef)
This commit is contained in:
@@ -2841,14 +2841,7 @@ void Spell::DoSpellEffectHit(Unit* unit, SpellEffectInfo const& spellEffectInfo,
|
||||
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->HasHitDelay() && !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->HasHitDelay() && !m_spellInfo->IsChanneled()))
|
||||
{
|
||||
bool const resetPeriodicTimer = !(_triggeredCastFlags & TRIGGERED_DONT_RESET_PERIODIC_TIMER);
|
||||
uint32 const allAuraEffectMask = Aura::BuildEffectMaskForOwner(m_spellInfo, MAX_EFFECT_MASK, unit);
|
||||
|
||||
Reference in New Issue
Block a user