fix: DebugLog hooks, works now
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
<ClCompile Include="user\hooks\hooks.cpp" />
|
||||
<ClCompile Include="user\main.cpp" />
|
||||
<ClCompile Include="user\settings\settings.cpp" />
|
||||
<ClCompile Include="user\utils\utils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="appdata\il2cpp-api-functions.h" />
|
||||
@@ -91,6 +92,7 @@
|
||||
<ClInclude Include="user\hooks\hooks.hpp" />
|
||||
<ClInclude Include="user\main.h" />
|
||||
<ClInclude Include="user\settings\settings.hpp" />
|
||||
<ClInclude Include="user\utils\utils.hpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<!--<VCProjectVersion>16.0</VCProjectVersion>-->
|
||||
|
||||
@@ -67,6 +67,9 @@
|
||||
<ClCompile Include="lib\ClientHelper.cpp">
|
||||
<Filter>lib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="user\utils\utils.cpp">
|
||||
<Filter>user\utils</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="user\main.h">
|
||||
@@ -168,6 +171,9 @@
|
||||
<ClInclude Include="lib\ClientHelper.h">
|
||||
<Filter>lib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="user\utils\utils.hpp">
|
||||
<Filter>user\utils</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="appdata">
|
||||
@@ -200,5 +206,8 @@
|
||||
<Filter Include="user\settings">
|
||||
<UniqueIdentifier>{64867ae6-a574-4a01-ac5f-22a732ca25e0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="user\utils">
|
||||
<UniqueIdentifier>{05b8437a-8e9b-425b-acbc-3dd8bca051c3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Hooks.hpp"
|
||||
#include "../features/menu.hpp"
|
||||
#include "../main.h"
|
||||
#include "../utils/utils.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include "helpers.h"
|
||||
@@ -39,8 +40,7 @@ TDebug_2_Log oDebug_2_Log = NULL;
|
||||
TDebug_2_Log oDebug_2_Warning = NULL;
|
||||
TDebug_2_Log oDebug_2_Error = NULL;
|
||||
void __stdcall hDebug_Log(app::Object* message, MethodInfo* method) {
|
||||
std::string log = il2cppi_to_string(app::Object_ToString(message, nullptr));
|
||||
std::cout << log << "\n";
|
||||
std::cout << ToString(message) << std::endl;
|
||||
}
|
||||
|
||||
void CreateHooks() {
|
||||
|
||||
12
user/utils/utils.cpp
Normal file
12
user/utils/utils.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "pch-il2cpp.h"
|
||||
#include "utils.hpp"
|
||||
#include "helpers.h"
|
||||
|
||||
std::string ToString(app::Object* object) {
|
||||
std::string type = il2cppi_to_string(app::Object_ToString(object, NULL));
|
||||
if (type == "System.String") {
|
||||
return il2cppi_to_string((app::String*)object);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
4
user/utils/utils.hpp
Normal file
4
user/utils/utils.hpp
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
std::string ToString(app::Object* object);
|
||||
Reference in New Issue
Block a user