From 85b66c2cb14497d97adb2b316ae4e52cdff46162 Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Wed, 11 Mar 2026 01:06:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=B2=E9=9C=B2=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/CustomPlugins/lulu/ObjectConvert.nut | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Project/CustomPlugins/lulu/ObjectConvert.nut b/Project/CustomPlugins/lulu/ObjectConvert.nut index 3d2e796..fabf0a5 100644 --- a/Project/CustomPlugins/lulu/ObjectConvert.nut +++ b/Project/CustomPlugins/lulu/ObjectConvert.nut @@ -14,47 +14,47 @@ function sq_GetCNRDObjectToSQRPassiveObject(obj) { return L_Sq_ObjectAddressToSqrObject(L_Sq_GetObjectAddress(obj), "CNSquirrelPassiveObject", 0); } -function sq_GetObjectAbilityInteger(ObjectAddress) +function sq_GetObjectAbilityInteger(obj, ObjectAddressOffset) { - return NativePointer(ObjectAddress).readInt(); + return NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).readInt(); } -function sq_SetObjectAbilityInteger(ObjectAddress, Value) +function sq_SetObjectAbilityInteger(obj, ObjectAddressOffset, Value) { - NativePointer(ObjectAddress).writeInt(Value); + NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).writeInt(Value); } -function sq_GetObjectAbilityFloat(ObjectAddress) +function sq_GetObjectAbilityFloat(obj, ObjectAddressOffset) { - return NativePointer(ObjectAddress).readFloat(); + return NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).readFloat(); } -function sq_SetObjectAbilityFloat(ObjectAddress, Value) +function sq_SetObjectAbilityFloat(obj, ObjectAddressOffset, Value) { - NativePointer(ObjectAddress).writeFloat(Value); + NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).writeFloat(Value); } -function sq_GetObjectAbilityIntegerWithDecrypt(ObjectAddress) +function sq_GetObjectAbilityIntegerWithDecrypt(obj, ObjectAddressOffset) { - return MemoryTool.DecodeMemoryData(ObjectAddress); + return MemoryTool.DecodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset); } -function sq_SetObjectAbilityIntegerWithDecrypt(ObjectAddress, Value) +function sq_SetObjectAbilityIntegerWithDecrypt(obj, ObjectAddressOffset, Value) { - MemoryTool.EncodeMemoryData(ObjectAddress, Value); + MemoryTool.EncodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset, Value); } -function sq_GetObjectAbilityFloatWithDecrypt(ObjectAddress) +function sq_GetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset) { - local Res = MemoryTool.DecodeMemoryData(ObjectAddress); + local Res = MemoryTool.DecodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset); local B = blob(); B.writen(Res, 'i'); return B.readn('f'); } -function sq_SetObjectAbilityFloatWithDecrypt(ObjectAddress, Value) +function sq_SetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset, Value) { local B = blob(); B.writen(Value, 'f'); - MemoryTool.EncodeMemoryData(ObjectAddress, B.readn('i')); + MemoryTool.EncodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset, B.readn('i')); } \ No newline at end of file