diff --git a/Base/_ENUM/_ENUM_.nut b/Base/_ENUM/_ENUM_.nut index 0aadf47..ff3cd5e 100644 --- a/Base/_ENUM/_ENUM_.nut +++ b/Base/_ENUM/_ENUM_.nut @@ -385,23 +385,23 @@ function deepcopy(obj) { function _deepcopy(obj, copies) { local type = typeof obj; - + // 处理基本类型 if (type != "table" && type != "array" && type != "class" && type != "instance") { return obj; } - + // 处理循环引用 if (obj in copies) { return copies[obj]; } - + // 创建新容器 local newObj; if (type == "array") { newObj = array(obj.len()); copies[obj] <- newObj; // 在拷贝前记录 - + for (local i = 0; i < obj.len(); i++) { newObj[i] = _deepcopy(obj[i], copies); } @@ -409,7 +409,7 @@ function _deepcopy(obj, copies) { else if (type == "table") { newObj = {}; copies[obj] <- newObj; // 在拷贝前记录 - + foreach(key, val in obj) { // 键也需要深拷贝 local newKey = _deepcopy(key, copies); @@ -421,6 +421,10 @@ function _deepcopy(obj, copies) { newObj = obj; copies[obj] <- newObj; } - + return newObj; +} + +function sq_GetCharacterAttribute(address){ + return L_sq_GetCharacterAttribute(address); } \ No newline at end of file