fix(Core/Spells): Fix Vanish/Shadowmeld not absorbing spells via Sanctuary (#24937)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: linencloth <none@none>
This commit is contained in:
@@ -2559,11 +2559,15 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
|||||||
if (effectUnit->IsAlive() != target->alive)
|
if (effectUnit->IsAlive() != target->alive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Xinef: absorb delayed projectiles for 500ms
|
// Absorb delayed projectiles launched before Sanctuary (e.g. Vanish dodging a Frostbolt in flight)
|
||||||
if (getState() == SPELL_STATE_DELAYED && !m_spellInfo->IsTargetingArea() && !m_spellInfo->IsPositive() &&
|
if (getState() == SPELL_STATE_DELAYED && !m_spellInfo->IsPositive() &&
|
||||||
(GameTime::GetGameTimeMS().count() - target->timeDelay) <= effectUnit->m_lastSanctuaryTime && GameTime::GetGameTimeMS().count() < (effectUnit->m_lastSanctuaryTime + 500) &&
|
(GameTime::GetGameTimeMS().count() - target->timeDelay) <= effectUnit->m_lastSanctuaryTime)
|
||||||
effectUnit->FindMap() && !effectUnit->FindMap()->IsDungeon()
|
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
|
return; // No missinfo in that case
|
||||||
|
|
||||||
// Get original caster (if exist) and calculate damage/healing from him data
|
// Get original caster (if exist) and calculate damage/healing from him data
|
||||||
|
|||||||
Reference in New Issue
Block a user