fix(Core/Spells): Chain heal shoudln't jump to other players who are at full hp. (#21387)
This commit is contained in:
@@ -2256,7 +2256,7 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
|
|||||||
if (Unit* unit = (*itr)->ToUnit())
|
if (Unit* unit = (*itr)->ToUnit())
|
||||||
{
|
{
|
||||||
uint32 deficit = unit->GetMaxHealth() - unit->GetHealth();
|
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;
|
foundItr = itr;
|
||||||
maxHPDeficit = deficit;
|
maxHPDeficit = deficit;
|
||||||
|
|||||||
Reference in New Issue
Block a user