refresh buff durations on player

This commit is contained in:
Brues
2026-05-21 02:35:46 -05:00
parent b7a0912e07
commit b18e6ffa67
16 changed files with 128 additions and 76 deletions
+5 -5
View File
@@ -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