fix nampower error

This commit is contained in:
Jrc13245
2025-12-26 13:41:14 -05:00
parent d819db51e5
commit d6144a7e83
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -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)
+4 -1
View File
@@ -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
--------------------------------------------------------------------------------