add pcall to more nampower functions

This commit is contained in:
Jrc13245
2025-12-28 11:41:45 -05:00
parent 83cdecdb29
commit 5b6d8268e0
3 changed files with 13 additions and 9 deletions
+5 -1
View File
@@ -1177,7 +1177,11 @@ end
function API.GetCastInfo()
-- Use native function if available (v2.18+)
if GetCastInfo then
return GetCastInfo()
local ok, result = pcall(GetCastInfo)
if ok then
return result
end
-- If pcall failed, fall through to fallback
end
-- Fallback: use GetCurrentCastingInfo (less detailed)