diff --git a/cheat-library/src/appdata/il2cpp-functions.h b/cheat-library/src/appdata/il2cpp-functions.h index 69c5738..7c41d66 100644 --- a/cheat-library/src/appdata/il2cpp-functions.h +++ b/cheat-library/src/appdata/il2cpp-functions.h @@ -361,6 +361,8 @@ DO_APP_FUNC(0x03066EB0, void, LevelTimeManager_SetInternalTimeOfDay, (/*LevelTim // Open team immediately // F3 0F 10 83 ?? ?? ?? ?? 0F 29 74 24 30 F3 0F 10 B3 ?? ?? ?? ?? DO_APP_FUNC(0x01387C20, bool, MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext, (InLevelMainPageContext_DoTeamCountDown_Iterator* __this, MethodInfo* method)); +DO_APP_FUNC(0x00A1CE40, void, MoleMole_InLevelPlayerProfilePageContext_SetupView, (/*MoleMole_InLevelPlayerProfilePageContext*/void* __this, MethodInfo* method)); +DO_APP_FUNC(0x00A15420, void, MoleMole_InLevelPlayerProfilePageContext_ClearView, (/*MoleMole_InLevelPlayerProfilePageContext*/void* __this, MethodInfo* method)); // Singletons diff --git a/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp b/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp index e66e52f..46a7758 100644 --- a/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp +++ b/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp @@ -6,11 +6,17 @@ namespace cheat::feature { static bool MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook(app::InLevelMainPageContext_DoTeamCountDown_Iterator* __this, MethodInfo* method); + static void MoleMole_InLevelPlayerProfilePageContext_ClearView_Hook(void* __this, MethodInfo* method); + static void MoleMole_InLevelPlayerProfilePageContext_SetupView_Hook(void* __this, MethodInfo* method); + OpenTeamImmediately::OpenTeamImmediately() : Feature(), - NF(f_Enabled, "Enable Open Team Immediately", "Open Team", false) + NF(f_Enabled, "Enable Open Team Immediately", "Open Team", false), + InLevelPlayerProfilePageContext(nullptr) { HookManager::install(app::MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext, MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook); + HookManager::install(app::MoleMole_InLevelPlayerProfilePageContext_ClearView, MoleMole_InLevelPlayerProfilePageContext_ClearView_Hook); + HookManager::install(app::MoleMole_InLevelPlayerProfilePageContext_SetupView, MoleMole_InLevelPlayerProfilePageContext_SetupView_Hook); } const FeatureGUIInfo& OpenTeamImmediately::GetGUIInfo() const @@ -43,10 +49,26 @@ namespace cheat::feature static bool MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook(app::InLevelMainPageContext_DoTeamCountDown_Iterator* __this, MethodInfo* method) { auto& openTeamImmediately = OpenTeamImmediately::GetInstance(); - if (openTeamImmediately.f_Enabled) + + // if paimon menu open, team ui will not open + if (openTeamImmediately.f_Enabled && !openTeamImmediately.InLevelPlayerProfilePageContext) { __this->fields._levelMainPageContext->fields._countDownTime = __this->fields._levelMainPageContext->fields.EnterCountDown + 1.f; } return CALL_ORIGIN(MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook, __this, method); } + + static void MoleMole_InLevelPlayerProfilePageContext_SetupView_Hook(void* __this, MethodInfo* method) + { + auto& openTeamImmediately = OpenTeamImmediately::GetInstance(); + openTeamImmediately.InLevelPlayerProfilePageContext = __this; + CALL_ORIGIN(MoleMole_InLevelPlayerProfilePageContext_SetupView_Hook, __this, method); + } + + static void MoleMole_InLevelPlayerProfilePageContext_ClearView_Hook(void* __this, MethodInfo* method) + { + auto& openTeamImmediately = OpenTeamImmediately::GetInstance(); + CALL_ORIGIN(MoleMole_InLevelPlayerProfilePageContext_ClearView_Hook, __this, method); + openTeamImmediately.InLevelPlayerProfilePageContext = nullptr; + } } \ No newline at end of file diff --git a/cheat-library/src/user/cheat/world/OpenTeamImmediately.h b/cheat-library/src/user/cheat/world/OpenTeamImmediately.h index 26bfa8f..ee6f8d4 100644 --- a/cheat-library/src/user/cheat/world/OpenTeamImmediately.h +++ b/cheat-library/src/user/cheat/world/OpenTeamImmediately.h @@ -8,6 +8,8 @@ namespace cheat::feature { public: config::Field> f_Enabled; + //MoleMole_InLevelPlayerProfilePageContext* + void* InLevelPlayerProfilePageContext; static OpenTeamImmediately& GetInstance();