fix issue with LOWEST_HP and improve melee spell failure checks

This commit is contained in:
pepopo978
2025-04-04 07:32:21 -07:00
parent a91086a15c
commit cb86e3cc92
3 changed files with 39 additions and 20 deletions
+5 -3
View File
@@ -419,9 +419,11 @@ local function pickTarget(selectedPriority, spellNameNoRank, checkRange, options
primaryValue = UnitHealth(guid) or 0
end
if selectedPriority == PRIORITY_LOWEST_HP and primaryValue < highestPrimaryValue then
highestPrimaryValue = primaryValue
targetedGuid = guid
if selectedPriority == PRIORITY_LOWEST_HP then
if primaryValue < highestPrimaryValue then
highestPrimaryValue = primaryValue
targetedGuid = guid
end
elseif primaryValue > highestPrimaryValue then
highestPrimaryValue = primaryValue
highestSecondaryValue = secondaryValue