Skip to content

Commit

Permalink
fix min range check
Browse files Browse the repository at this point in the history
  • Loading branch information
hatersgit committed Feb 22, 2024
1 parent ac0a406 commit 27787b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11955,6 +11955,11 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
return spellInfo->GetMinRange();
}

if (!target)
{
return spellInfo->GetMinRange(true);
}

return spellInfo->GetMinRange(!IsHostileTo(target));
}

Expand Down

0 comments on commit 27787b5

Please sign in to comment.