露露插件

This commit is contained in:
Lenheart 2026-03-11 01:06:17 +08:00
parent f7d6d34c46
commit 85b66c2cb1
1 changed files with 16 additions and 16 deletions

View File

@ -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'));
}