露露插件
This commit is contained in:
parent
9902eaa818
commit
f7d6d34c46
|
|
@ -154,6 +154,12 @@ class NativePointer {
|
||||||
}
|
}
|
||||||
|
|
||||||
function readInt() {
|
function readInt() {
|
||||||
|
// if(L_sq_P2I(this.C_Object) < 0x7FFFFFFF && L_sq_P2I(this.C_Object) > 0x400000 && L_sq_P2I(this.C_Object) % 4 == 0) {
|
||||||
|
// if(L_sq_Test(L_sq_P2I(this.C_Object))){
|
||||||
|
// return read('i');
|
||||||
|
// }
|
||||||
|
// return 0;
|
||||||
|
|
||||||
return read('i');
|
return read('i');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,49 @@ function sq_GetCNRDObjectToPassiveObject(obj) {
|
||||||
|
|
||||||
function sq_GetCNRDObjectToSQRPassiveObject(obj) {
|
function sq_GetCNRDObjectToSQRPassiveObject(obj) {
|
||||||
return L_Sq_ObjectAddressToSqrObject(L_Sq_GetObjectAddress(obj), "CNSquirrelPassiveObject", 0);
|
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'));
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue