mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
fix nampower error
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user