From f18d73299141848585cb5b7143fac5045d3119cf Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Wed, 18 Feb 2026 13:52:34 +0100 Subject: [PATCH] fixed a missing guid check fixed a missing guid check --- libs/libcast.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/libs/libcast.lua b/libs/libcast.lua index 51a1ba96..2c148dad 100644 --- a/libs/libcast.lua +++ b/libs/libcast.lua @@ -60,9 +60,14 @@ UnitChannelInfo = function(unit) -- convert to name if unitstring was given local unitName = pfValidUnits[unit] and UnitName(unit) or unit - -- Get GUID if Nampower is available AND unit is a valid unit token + -- Get GUID if Nampower is available local guid = nil - if pfValidUnits[unit] and UnitExists then + + -- Check if unit itself is a GUID (starts with "0x") + if type(unit) == "string" and string.sub(unit, 1, 2) == "0x" then + guid = unit -- unit IS the GUID + elseif pfValidUnits[unit] and UnitExists then + -- unit is a token like "target" - get GUID from it local _, unitGuid = UnitExists(unit) guid = unitGuid end @@ -154,9 +159,14 @@ UnitCastingInfo = function(unit) -- convert to name if unitstring was given local unitName = pfValidUnits[unit] and UnitName(unit) or unit - -- Get GUID if Nampower is available AND unit is a valid unit token + -- Get GUID if Nampower is available local guid = nil - if pfValidUnits[unit] and UnitExists then + + -- Check if unit itself is a GUID (starts with "0x") + if type(unit) == "string" and string.sub(unit, 1, 2) == "0x" then + guid = unit -- unit IS the GUID + elseif pfValidUnits[unit] and UnitExists then + -- unit is a token like "target" - get GUID from it local _, unitGuid = UnitExists(unit) guid = unitGuid end