mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 05:55:07 +00:00
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)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user