/* 文件名: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(ObjectAddress) { return NativePointer(ObjectAddress).readInt(); } function sq_SetObjectAbilityInteger(ObjectAddress, Value) { NativePointer(ObjectAddress).writeInt(Value); } function sq_GetObjectAbilityFloat(ObjectAddress) { return NativePointer(ObjectAddress).readFloat(); } function sq_SetObjectAbilityFloat(ObjectAddress, Value) { NativePointer(ObjectAddress).writeFloat(Value); } function sq_GetObjectAbilityIntegerWithDecrypt(ObjectAddress) { return MemoryTool.DecodeMemoryData(ObjectAddress); } function sq_SetObjectAbilityIntegerWithDecrypt(ObjectAddress, Value) { MemoryTool.EncodeMemoryData(ObjectAddress, Value); } function sq_GetObjectAbilityFloatWithDecrypt(ObjectAddress) { local Res = MemoryTool.DecodeMemoryData(ObjectAddress); local B = blob(); B.writen(Res, 'i'); return B.readn('f'); } function sq_SetObjectAbilityFloatWithDecrypt(ObjectAddress, Value) { local B = blob(); B.writen(Value, 'f'); MemoryTool.EncodeMemoryData(ObjectAddress, B.readn('i')); }