remove superwow requirement by using nampower, update nampower support to 3_1_0

This commit is contained in:
Jrc13245
2026-03-02 19:55:53 -05:00
parent 6fa4e28318
commit 82b2ab889f
5 changed files with 70 additions and 14 deletions
+15 -2
View File
@@ -313,13 +313,26 @@ do
local function apply(unit)
if _G.SetMouseoverUnit then
local resolved = unit
-- "focus" is not a valid unit token in 1.12.1; resolve to real token
if unit == "focus" then
if pfUI and pfUI.uf and pfUI.uf.focus and pfUI.uf.focus.label and pfUI.uf.focus.id
and UnitExists(pfUI.uf.focus.label .. pfUI.uf.focus.id) then
resolved = pfUI.uf.focus.label .. pfUI.uf.focus.id
else
-- No resolvable unit token; use fallback path
CleveRoids.mouseoverUnit = unit
if CleveRoids.QueueActionUpdate then CleveRoids.QueueActionUpdate() end
return
end
end
-- Available via SuperWoW or Nampower v2.37+
-- Set flag so UPDATE_MOUSEOVER_UNIT handler knows we triggered this
CleveRoids.__mo.selfTriggered = true
-- Use empty string instead of nil to properly clear mouseover.
-- SetMouseoverUnit(nil) doesn't properly clear the game's internal state,
-- causing UnitIsPlayer("mouseover") to return stale data (TurtleRP bug).
_G.SetMouseoverUnit(unit or "")
_G.SetMouseoverUnit(resolved or "")
else
CleveRoids.mouseoverUnit = unit
end
@@ -8783,7 +8796,7 @@ local function ProcessSpellMissSelf(spellId, targetGuid, missInfo)
end
-- Resolve spell name
local spellName = GetSpellRecField and GetSpellRecField(spellId, "name")
local spellName = GetSpellRecField and type(spellId) == "number" and spellId > 0 and GetSpellRecField(spellId, "name")
local baseName = spellName and string.gsub(spellName, "%s*%(.-%)%s*$", "") or nil
-- ========================================================================