-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path!skip_intro_logos.lua
More file actions
53 lines (42 loc) · 2.01 KB
/
!skip_intro_logos.lua
File metadata and controls
53 lines (42 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
local Constants = _G.require("Constants/Constants");
local hook = Constants.hook;
local find_type_definition = Constants.find_type_definition;
local set_native_field = Constants.set_native_field;
local get_hook_storage = Constants.get_hook_storage;
local getObject = Constants.getObject;
local getThisPtr = Constants.getThisPtr;
local GUI010001_type_def = find_type_definition("app.GUI010001");
local Flow_field = GUI010001_type_def:get_field("_Flow");
local Skip_field = GUI010001_type_def:get_field("_Skip");
local EnableSkip_field = GUI010001_type_def:get_field("_EnableSkip");
local lastFlow = nil;
do
for _, v in Constants.ipairs(Flow_field:get_type():get_fields()) do
if v:is_static() then
local enum_value = v:get_data(nil);
if lastFlow == nil or enum_value > lastFlow then
lastFlow = enum_value;
end
end
end
end
local GUI010100_type_def = find_type_definition("app.GUI010100");
local Input_field = GUI010100_type_def:get_field("_Input");
local requestCallTrigger_method = Constants.requestCallTrigger_method;
local TITLE_START = Constants.GUIFunc_TYPE_type_def:get_field("TITLE_START"):get_data(nil);
hook(GUI010001_type_def:get_method("guiVisibleUpdate"), getThisPtr, function()
local this_ptr = get_hook_storage().this_ptr;
if Flow_field:get_data(this_ptr) < lastFlow then
set_native_field(this_ptr, GUI010001_type_def, "_Flow", lastFlow);
end
if EnableSkip_field:get_data(this_ptr) and Skip_field:get_data(this_ptr) == false then
set_native_field(this_ptr, GUI010001_type_def, "_Skip", true);
end
end);
hook(find_type_definition("app.GUI010002"):get_method("onOpen"), getObject, function()
local this = get_hook_storage().this;
this:write_float(0x220, this:read_float(0x224));
end);
hook(GUI010100_type_def:get_method("guiVisibleUpdate"), getThisPtr, function()
requestCallTrigger_method:call(Input_field:get_data(get_hook_storage().this_ptr), TITLE_START);
end);