更新获取属性
This commit is contained in:
parent
e1407d010f
commit
80694fa19f
|
|
@ -376,10 +376,10 @@ function Rindro_GetEquAddr(addr) {
|
|||
}
|
||||
|
||||
//本地模式
|
||||
if(!getroottable().rawin("RINDROLOCAL"))RINDROLOCAL <- false;
|
||||
if (!getroottable().rawin("RINDROLOCAL")) RINDROLOCAL <- false;
|
||||
|
||||
function deepcopy(obj) {
|
||||
local copies = {}; // 用于跟踪已拷贝对象的表
|
||||
local copies = {}; // 用于跟踪已拷贝对象的表
|
||||
return _deepcopy(obj, copies);
|
||||
}
|
||||
|
||||
|
|
@ -400,15 +400,14 @@ function _deepcopy(obj, copies) {
|
|||
local newObj;
|
||||
if (type == "array") {
|
||||
newObj = array(obj.len());
|
||||
copies[obj] <- newObj; // 在拷贝前记录
|
||||
copies[obj] <- newObj; // 在拷贝前记录
|
||||
|
||||
for (local i = 0; i < obj.len(); i++) {
|
||||
for (local i = 0; i< obj.len(); i++) {
|
||||
newObj[i] = _deepcopy(obj[i], copies);
|
||||
}
|
||||
}
|
||||
else if (type == "table") {
|
||||
} else if (type == "table") {
|
||||
newObj = {};
|
||||
copies[obj] <- newObj; // 在拷贝前记录
|
||||
copies[obj] <- newObj; // 在拷贝前记录
|
||||
|
||||
foreach(key, val in obj) {
|
||||
// 键也需要深拷贝
|
||||
|
|
@ -416,8 +415,7 @@ function _deepcopy(obj, copies) {
|
|||
local newVal = _deepcopy(val, copies);
|
||||
newObj[newKey] <- newVal;
|
||||
}
|
||||
}
|
||||
else { // 类和实例(浅拷贝)
|
||||
} else { // 类和实例(浅拷贝)
|
||||
newObj = obj;
|
||||
copies[obj] <- newObj;
|
||||
}
|
||||
|
|
@ -425,6 +423,10 @@ function _deepcopy(obj, copies) {
|
|||
return newObj;
|
||||
}
|
||||
|
||||
function sq_GetCharacterAttribute(address){
|
||||
function sq_GetCharacterAttribute(address) {
|
||||
return L_sq_GetCharacterAttribute(address);
|
||||
}
|
||||
|
||||
function sq_GetCharacterEquipAttribute(offest, Slot) {
|
||||
return L_sq_GetCharacterAttribute(offest, Slot);
|
||||
}
|
||||
Loading…
Reference in New Issue