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 --------------------------------------------------------------------------------