Change safe_load to allow varargs for LoadProfile

This commit is contained in:
Flamanis
2022-04-01 15:27:55 -05:00
committed by GitHub
parent 0d8b09ffb7
commit 9a63dc12e0
+3 -3
View File
@@ -203,8 +203,8 @@ function _detalhes:CreatePanicWarning()
_detalhes.instance_load_failed:SetPoint ("topright", UIParent, "topright", 0, -250)
end
local safe_load = function (func, param1, param2)
local okey, errortext = pcall (func, param1, param2)
local safe_load = function (func, param1, ...)
local okey, errortext = pcall (func, param1, ...)
if (not okey) then
if (not _detalhes.instance_load_failed) then
_detalhes:CreatePanicWarning()
@@ -359,7 +359,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
--> load data saved for this character only
instance:LoadLocalInstanceConfig()
if (skin.__was_opened) then
if (not safe_load (_detalhes.AtivarInstancia, instance)) then
if (not safe_load (_detalhes.AtivarInstancia, instance, nil, true)) then
return
end
else