From f9a6ab991c2efade8a62315a37d19c99530de181 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:46:58 -0600 Subject: [PATCH] Core/Spells: fix spell effect charge (#160) --- src/server/game/Spells/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 1f823804..5cfcf149 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -6827,7 +6827,7 @@ void Spell::EffectCharge(SpellEffIndex effIndex) } // Spell is not using explicit target - no generated path - if (m_preGeneratedPath->GetPathType() == PATHFIND_BLANK) + if (!m_preGeneratedPath || m_preGeneratedPath->GetPathType() == PATHFIND_BLANK) { Position pos = unitTarget->GetFirstCollisionPosition(unitTarget->GetObjectSize(), unitTarget->GetRelativeAngle(m_caster)); m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed, EVENT_CHARGE, false, unitTarget, std::to_address(spellEffectExtraData));