castspellbyname unit

castspellbyname unit
This commit is contained in:
Meow
2026-02-17 16:59:30 +01:00
parent a2d449cd59
commit c99a35eb82
+4 -7
View File
@@ -51,13 +51,10 @@ pfUI:RegisterModule("mouseover", "vanilla", function ()
end
-- Nampower: CastSpellByName supports a second unit parameter directly.
-- Use it when available to avoid a target switch entirely.
-- unit is already resolved to "mouseover", "target" or "player" at this point.
if not func and GetNampowerVersion then
local resolvedUnit = GetUnitString(unit)
if resolvedUnit then
CastSpellByName(msg, resolvedUnit)
return
end
CastSpellByName(msg, unit)
return
end
-- If target and mouseover are friendly units, we can't use spell target as it
@@ -100,4 +97,4 @@ pfUI:RegisterModule("mouseover", "vanilla", function ()
TargetLastTarget()
end
end
end)
end)