This commit is contained in:
lenheart
2024-11-15 19:53:44 +08:00
parent 6c71c79563
commit 9d84fe256d
17 changed files with 1042 additions and 106 deletions

View File

@@ -145,6 +145,19 @@ class GameManager extends Base_C_Object {
Sq_WriteByteArr(S_Ptr("0x86464CE"), Arr);
}
//+13免刷新
function Fix_13Upgrade() {
Haker.LoadHook("0x080FC850", ["pointer", "pointer", "pointer", "int", "void"],
function(args) {
return null;
},
function(args) {
local Pos = NativePointer(args[2]).add(27).readU16();
local SUser = User(args[1]);
SUser.SendUpdateItemList(1, 0, Pos);
return null;
});
}
}
//热重载
function _Reload_List_Write_(Path) {

View File

@@ -23,6 +23,7 @@ class _Hacker {
}
local Controler = Sq_HookFunc(S_Ptr(AddressStr), ArgumentArr, EnterFunc, LeaveFunc);
print(Controler);
HookTable.rawset(AddressStr, Controler);
}
}

View File

@@ -37,29 +37,3 @@ class Http {
return Request("GET", Url, Content);
}
}
Timer.SetTimeOut(function() {
// local Dio = Http("192.168.200.189", "45123");
// local Jso = {
// a = 1,
// b = 4.8,
// c = "测试"
// }
// local JsonStr = Json.Encode(Jso);
// local Res = Dio.Post("/", JsonStr);
// print(Res);
// local NowTimesstamp = Sq_GetTimestampString();
// print(NowTimesstamp);
// local Trad = Sq_Conversion("這是繁體語句", 0);
// local Simple = Sq_Conversion("这是简体语句", 1);
// print(Trad);
// print(Simple);
}, 0);
// local Dio = Http("myip.ipip.net", "443");
// local Res = Dio.Get("/", "");
// print(Res);

View File

@@ -18,10 +18,6 @@ class IO extends Base_C_Object {
_Rewind_Address = Module.getExportByName(null, "rewind");
_Flush_Address = Module.getExportByName(null, "fflush");
Pos = 0;
constructor(FileName, Modes) {
local FileObj = Sq_CallFunc(_Fopen_Address, "pointer", ["pointer", "pointer"], Str_Ptr(FileName), Str_Ptr(Modes));
if (FileObj) {

View File

@@ -13,6 +13,16 @@ class Memory {
function allocUtf8String(Str) {
return NativePointer(Str_Ptr(Str));
}
function copy(P1, P2, Size) {
local WriteArr = Sq_ReadByteArr(P2.C_Object, Size);
P1.writeByteArray(WriteArr);
}
function reset(P1, Size) {
local WriteArr = array(Size, 0);
P1.writeByteArray(WriteArr);
}
}
class NativePointer extends Base_C_Object {
@@ -41,13 +51,11 @@ class NativePointer extends Base_C_Object {
}
function add(intoffset) {
this.C_Object = Sq_PointerOperation(this.C_Object, intoffset, "+");
return this;
return NativePointer(Sq_PointerOperation(this.C_Object, intoffset, "+"));
}
function sub(intoffset) {
this.C_Object = Sq_PointerOperation(this.C_Object, intoffset, "-");
return this;
return NativePointer(Sq_PointerOperation(this.C_Object, intoffset, "-"));
}
function writeByteArray(arr) {