mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
remove superwow requirement by using nampower, update nampower support to 3_1_0
This commit is contained in:
+15
-2
@@ -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
|
||||
|
||||
-- ========================================================================
|
||||
|
||||
Reference in New Issue
Block a user