mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 06:25:55 +00:00
fix(Core/Spells): cache reflection target information for reflected thunderstorm direction (#23762)
This commit is contained in:
@@ -5013,7 +5013,24 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
float x, y;
|
||||
if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_KNOCK_BACK_DEST)
|
||||
Unit* reflectionSource = m_reflectionTarget;
|
||||
|
||||
if (!reflectionSource && !m_reflectionTargetGuid.IsEmpty())
|
||||
{
|
||||
if (Unit* resolvedSource = ObjectAccessor::GetUnit(*m_caster, m_reflectionTargetGuid))
|
||||
reflectionSource = resolvedSource;
|
||||
}
|
||||
|
||||
if (reflectionSource)
|
||||
{
|
||||
reflectionSource->GetPosition(x, y);
|
||||
}
|
||||
else if (!m_reflectionTargetGuid.IsEmpty())
|
||||
{
|
||||
x = m_reflectionTargetPosition.GetPositionX();
|
||||
y = m_reflectionTargetPosition.GetPositionY();
|
||||
}
|
||||
else if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_KNOCK_BACK_DEST)
|
||||
{
|
||||
if (m_targets.HasDst())
|
||||
destTarget->GetPosition(x, y);
|
||||
|
||||
Reference in New Issue
Block a user