/* 文件名:ObjectConvert.nut 路径:Project/CustomPlugins/lulu/ObjectConvert.nut 创建日期:2026-02-09 23:33 文件用途: */ function sq_GetCNRDObjectToPassiveObject(obj) { return L_Sq_ObjectAddressToSqrObject(L_Sq_GetObjectAddress(obj), "CNRDPassiveObject", 0); } function sq_GetCNRDObjectToSQRPassiveObject(obj) { return L_Sq_ObjectAddressToSqrObject(L_Sq_GetObjectAddress(obj), "CNSquirrelPassiveObject", 0); } function sq_GetObjectAbilityInteger(obj, ObjectAddressOffset) { return NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).readInt(); } function sq_SetObjectAbilityInteger(obj, ObjectAddressOffset, Value) { NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).writeInt(Value); } function sq_GetObjectAbilityFloat(obj, ObjectAddressOffset) { return NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).readFloat(); } function sq_SetObjectAbilityFloat(obj, ObjectAddressOffset, Value) { NativePointer(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset).writeFloat(Value); } function sq_GetObjectAbilityIntegerWithDecrypt(obj, ObjectAddressOffset) { return MemoryTool.DecodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset); } function sq_SetObjectAbilityIntegerWithDecrypt(obj, ObjectAddressOffset, Value) { MemoryTool.EncodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset, Value); } function sq_GetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset) { local Res = MemoryTool.DecodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset); local B = blob(); B.writen(Res, 'i'); return B.readn('f'); } function sq_SetObjectAbilityFloatWithDecrypt(obj, ObjectAddressOffset, Value) { local B = blob(); B.writen(Value, 'f'); MemoryTool.EncodeMemoryData(L_Sq_GetObjectAddress(obj) + ObjectAddressOffset, B.readn('i')); }