From 8298e730575747d6ba266517c6caa6c17897998c Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Sat, 28 Feb 2026 11:46:56 -0600 Subject: [PATCH] fix(Core/Spells): Fix Vanish/Shadowmeld not absorbing spells via Sanctuary (#24937) Co-authored-by: blinkysc Co-authored-by: linencloth --- src/server/game/Spells/Spell.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 6202acbb3..4306c1efb 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2559,11 +2559,15 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) if (effectUnit->IsAlive() != target->alive) return; - // Xinef: absorb delayed projectiles for 500ms - if (getState() == SPELL_STATE_DELAYED && !m_spellInfo->IsTargetingArea() && !m_spellInfo->IsPositive() && - (GameTime::GetGameTimeMS().count() - target->timeDelay) <= effectUnit->m_lastSanctuaryTime && GameTime::GetGameTimeMS().count() < (effectUnit->m_lastSanctuaryTime + 500) && - effectUnit->FindMap() && !effectUnit->FindMap()->IsDungeon() - ) + // Absorb delayed projectiles launched before Sanctuary (e.g. Vanish dodging a Frostbolt in flight) + if (getState() == SPELL_STATE_DELAYED && !m_spellInfo->IsPositive() && + (GameTime::GetGameTimeMS().count() - target->timeDelay) <= effectUnit->m_lastSanctuaryTime) + return; // No missinfo in that case + + // Absorb instant hostile spells on application within brief window after Sanctuary + if (getState() != SPELL_STATE_DELAYED && !m_spellInfo->IsPositive() && + effectUnit->m_lastSanctuaryTime && + GameTime::GetGameTimeMS().count() <= (effectUnit->m_lastSanctuaryTime + 400)) return; // No missinfo in that case // Get original caster (if exist) and calculate damage/healing from him data