mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
refresh buff durations on player
This commit is contained in:
+5
-5
@@ -55,7 +55,7 @@ function SlashCmdList.PFFOCUS(msg)
|
||||
if msg ~= "" then
|
||||
-- Try to resolve GUID via short target swap
|
||||
if UnitExists then
|
||||
local prevGUID = GetUnitGUID("target")
|
||||
local prevGUID = UnitGUID("target")
|
||||
local prevPlayer = UnitIsUnit("target", "player")
|
||||
|
||||
-- Suppress "Unknown unit" errors during targeting attempts (fired async)
|
||||
@@ -63,7 +63,7 @@ function SlashCmdList.PFFOCUS(msg)
|
||||
|
||||
-- Try exact match first, then prefix match via /tar
|
||||
TargetByName(msg, true)
|
||||
local guid = GetUnitGUID("target")
|
||||
local guid = UnitGUID("target")
|
||||
|
||||
if not guid or guid == "0x0000000000000000" then
|
||||
-- Fallback: prefix match (like /tar storm -> Stormwind Guard)
|
||||
@@ -98,7 +98,7 @@ function SlashCmdList.PFFOCUS(msg)
|
||||
else
|
||||
-- No msg: use current target
|
||||
if UnitExists then
|
||||
local guid = GetUnitGUID("target")
|
||||
local guid = UnitGUID("target")
|
||||
if guid and guid ~= "0x0000000000000000" then
|
||||
SetFocusByGUID(guid)
|
||||
return
|
||||
@@ -149,11 +149,11 @@ function SlashCmdList.PFCASTFOCUS(msg)
|
||||
|
||||
-- For lua functions with GUID: short target swap via GUID
|
||||
if hasGUID and func then
|
||||
local currentGUID = GetUnitGUID("target")
|
||||
local currentGUID = UnitGUID("target")
|
||||
local isPlayer = UnitIsUnit("target", "player")
|
||||
|
||||
TargetUnit(focusGUID)
|
||||
local newGUID = GetUnitGUID("target")
|
||||
local newGUID = UnitGUID("target")
|
||||
|
||||
if newGUID ~= focusGUID then
|
||||
-- Could not target focus, restore and fail
|
||||
|
||||
Reference in New Issue
Block a user