fix(Core/Spells): Chain heal shoudln't jump to other players who are at full hp. (#21387)

This commit is contained in:
Mykhailo Redko 2025-02-15 23:47:22 +02:00 committed by GitHub
parent 61f04f69db
commit c96ff8a6dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2256,7 +2256,7 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
if (Unit* unit = (*itr)->ToUnit())
{
uint32 deficit = unit->GetMaxHealth() - unit->GetHealth();
if ((deficit > maxHPDeficit || foundItr == tempTargets.end()) && target->IsWithinDist(unit, jumpRadius) && target->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::M2))
if (deficit > maxHPDeficit && target->IsWithinDist(unit, jumpRadius) && target->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::M2))
{
foundItr = itr;
maxHPDeficit = deficit;