mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
update nampower for copy use in cached table references
This commit is contained in:
+12
-2
@@ -439,7 +439,12 @@ function API.GetSpellRecord(spellId, copy)
|
||||
end
|
||||
|
||||
-- Copy parameter requires v2.20+
|
||||
local useCopy = copy and API.features.hasCopyParameter and copy or nil
|
||||
-- When caching (not copy), also request copy=1 if available for safe storage
|
||||
-- This prevents issues with Nampower's table reuse
|
||||
local useCopy = nil
|
||||
if API.features.hasCopyParameter then
|
||||
useCopy = copy or 1 -- Use caller's copy value, or 1 for caching
|
||||
end
|
||||
|
||||
-- Use native function
|
||||
if GetSpellRec then
|
||||
@@ -710,7 +715,12 @@ function API.GetItemRecord(itemId, copy)
|
||||
end
|
||||
|
||||
-- Copy parameter requires v2.20+
|
||||
local useCopy = copy and API.features.hasCopyParameter and copy or nil
|
||||
-- When caching (not copy), also request copy=1 if available for safe storage
|
||||
-- This prevents issues with Nampower's table reuse
|
||||
local useCopy = nil
|
||||
if API.features.hasCopyParameter then
|
||||
useCopy = copy or 1 -- Use caller's copy value, or 1 for caching
|
||||
end
|
||||
|
||||
-- Use native function
|
||||
if GetItemStats then
|
||||
|
||||
Reference in New Issue
Block a user