From d6144a7e83ef501d709f1a0e1c59aea86c7b1cd1 Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Fri, 26 Dec 2025 13:41:14 -0500 Subject: [PATCH] fix nampower error --- Core.lua | 3 ++- NampowerAPI.lua | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core.lua b/Core.lua index a56c65f..022f332 100644 --- a/Core.lua +++ b/Core.lua @@ -2776,7 +2776,8 @@ function CleveRoids.EquipBagItem(msg, offhand) local API = CleveRoids.NampowerAPI -- v2.18+: Use native fast lookup for item ID or name - if API and API.features and API.features.hasFindPlayerItemSlot then + -- Guard against API being a function instead of table (addon conflict protection) + if type(API) == "table" and type(API.features) == "table" and API.features.hasFindPlayerItemSlot then local searchTerm = msg local itemId = tonumber(msg) diff --git a/NampowerAPI.lua b/NampowerAPI.lua index e165656..66adce9 100644 --- a/NampowerAPI.lua +++ b/NampowerAPI.lua @@ -41,7 +41,10 @@ local _G = _G or getfenv(0) local CleveRoids = _G.CleveRoids -- Nampower API namespace -CleveRoids.NampowerAPI = CleveRoids.NampowerAPI or {} +-- Force table creation if not already a table (guards against addon conflicts) +if type(CleveRoids.NampowerAPI) ~= "table" then + CleveRoids.NampowerAPI = {} +end local API = CleveRoids.NampowerAPI --------------------------------------------------------------------------------