From c476f90d5d9850d238028d6c3d3111a4732fc3f7 Mon Sep 17 00:00:00 2001 From: RyujinZX Date: Tue, 31 May 2022 18:27:06 +0300 Subject: [PATCH] fix 2.7 NoFog - fix SetFPS - fix NoCD - fix --- cheat-library/src/appdata/il2cpp-functions.h | 6 +++--- cheat-library/src/user/cheat/player/NoCD.cpp | 12 ++++++------ cheat-library/src/user/cheat/visuals/FPSUnlock.cpp | 6 +++--- cheat-library/src/user/cheat/visuals/NoFog.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cheat-library/src/appdata/il2cpp-functions.h b/cheat-library/src/appdata/il2cpp-functions.h index f7ec3b0..d6b8994 100644 --- a/cheat-library/src/appdata/il2cpp-functions.h +++ b/cheat-library/src/appdata/il2cpp-functions.h @@ -239,9 +239,9 @@ DO_APP_FUNC(0x00A8D650, float, MoleMole_InLevelMainPageContext_get_miniMapScale, // UnityEngine -DO_APP_FUNC(0x065ECB70, void, RenderSettings_set_fog, (void* __this, bool value, MethodInfo* method)); -DO_APP_FUNC(0x06621FF0, void, Application_set_targetFrameRate, (void* __this, int32_t value, MethodInfo* method)); -DO_APP_FUNC(0x06621D80, int32_t, Application_get_targetFrameRate, (void* __this, MethodInfo* method)); +DO_APP_FUNC(0x065ECB70, void, RenderSettings_set_fog, (bool value, MethodInfo* method)); +DO_APP_FUNC(0x06621FF0, void, Application_set_targetFrameRate, (int32_t value, MethodInfo* method)); +DO_APP_FUNC(0x06621D80, int32_t, Application_get_targetFrameRate, (MethodInfo* method)); DO_APP_FUNC(0x06678780, bool, RectTransformUtility_ScreenPointToLocalPointInRectangle, (void* rect, Vector2 screenPoint, void* cam, Vector2* localPoint, MethodInfo* method)); diff --git a/cheat-library/src/user/cheat/player/NoCD.cpp b/cheat-library/src/user/cheat/player/NoCD.cpp index ed1d9e4..926be06 100644 --- a/cheat-library/src/user/cheat/player/NoCD.cpp +++ b/cheat-library/src/user/cheat/player/NoCD.cpp @@ -44,9 +44,9 @@ namespace cheat::feature "(Energy bubble may appear incomplete but still usable.)"); ConfigWidget("## AbilityReduce", f_AbilityReduce); ImGui::SameLine(); - ConfigWidget("Reduce Skill/Burst Cooldown", f_TimerReduce, 0.05f, 0.0f, 1.0f, + ConfigWidget("Reduce Skill/Burst Cooldown", f_TimerReduce, 1.f, 1.f, 6.0f, "Reduce cooldowns of elemental skills and bursts.\n"\ - "0.0 - no CD, 1.0 - default CD."); + "1.0 - no CD, 2.0 and higher - increases the timer value."); ConfigWidget(f_Sprint, "Removes delay in-between sprints."); @@ -128,12 +128,12 @@ namespace cheat::feature NoCD& noCD = NoCD::GetInstance(); if (noCD.f_AbilityReduce) { - auto cdTimer = app::MoleMole_SafeFloat_get_Value(skillInfo->fields.cdTimer, nullptr); + auto cdTimer = app::MoleMole_SafeFloat_get_Value(skillInfo->fields.cdTimer, nullptr); // Timer start value in the game - if (cdTimer > noCD.f_TimerReduce * 5.0f) + if (cdTimer > noCD.f_TimerReduce) { - struct app::SafeFloat MyValueProtect = app::MoleMole_SafeFloat_set_Value(noCD.f_TimerReduce * 5.0f, nullptr); - skillInfo->fields.cdTimer = MyValueProtect; + struct app::SafeFloat MyValueProtect = app::MoleMole_SafeFloat_set_Value(noCD.f_TimerReduce - 1.0f, nullptr); // Subtract -1 from the current timer value + skillInfo->fields.cdTimer = MyValueProtect; } } return CALL_ORIGIN(LCAvatarCombat_IsSkillInCD_1, __this, skillInfo, method); diff --git a/cheat-library/src/user/cheat/visuals/FPSUnlock.cpp b/cheat-library/src/user/cheat/visuals/FPSUnlock.cpp index 10fcf64..49cfc82 100644 --- a/cheat-library/src/user/cheat/visuals/FPSUnlock.cpp +++ b/cheat-library/src/user/cheat/visuals/FPSUnlock.cpp @@ -47,15 +47,15 @@ namespace cheat::feature static int _originFPS = 30; if (_lastEnabledStatus && !f_Enabled) { - app::Application_set_targetFrameRate(nullptr, _originFPS, nullptr); + app::Application_set_targetFrameRate(_originFPS, nullptr); } else if (!_lastEnabledStatus && f_Enabled) { - _originFPS = app::Application_get_targetFrameRate(nullptr, nullptr); + _originFPS = app::Application_get_targetFrameRate(nullptr); } _lastEnabledStatus = f_Enabled; if (f_Enabled) - app::Application_set_targetFrameRate(nullptr, f_Fps, nullptr); + app::Application_set_targetFrameRate(f_Fps, nullptr); } } \ No newline at end of file diff --git a/cheat-library/src/user/cheat/visuals/NoFog.cpp b/cheat-library/src/user/cheat/visuals/NoFog.cpp index 5f7bd4e..3add9f9 100644 --- a/cheat-library/src/user/cheat/visuals/NoFog.cpp +++ b/cheat-library/src/user/cheat/visuals/NoFog.cpp @@ -44,7 +44,7 @@ namespace cheat::feature { if (_prevEnabledState != f_Enabled) { - app::RenderSettings_set_fog(nullptr, !f_Enabled, nullptr); + app::RenderSettings_set_fog(!f_Enabled, nullptr); _prevEnabledState = f_Enabled; } }