Skip to content

Commit

Permalink
Core/Spells: fix spell effect charge (The-Legion-Preservation-Project…
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongdove authored Nov 15, 2024
1 parent fdd43f8 commit f9a6ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit f9a6ab9

Please sign in to comment.