From 9596af580e8117d8b75fb7c8610abc6410f6d628 Mon Sep 17 00:00:00 2001 From: Miya Date: Thu, 25 Aug 2022 12:16:29 +0800 Subject: [PATCH 1/3] add open team immediately open team without waiting --- cheat-library/cheat-library.vcxproj | 2 + cheat-library/cheat-library.vcxproj.filters | 6 +++ cheat-library/src/appdata/il2cpp-functions.h | 4 ++ cheat-library/src/appdata/il2cpp-types.h | 14 +++++ cheat-library/src/user/cheat/cheat.cpp | 2 + .../user/cheat/world/OpenTeamImmediately.cpp | 52 +++++++++++++++++++ .../user/cheat/world/OpenTeamImmediately.h | 24 +++++++++ 7 files changed, 104 insertions(+) create mode 100644 cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp create mode 100644 cheat-library/src/user/cheat/world/OpenTeamImmediately.h diff --git a/cheat-library/cheat-library.vcxproj b/cheat-library/cheat-library.vcxproj index 2ad8cae..21e443c 100644 --- a/cheat-library/cheat-library.vcxproj +++ b/cheat-library/cheat-library.vcxproj @@ -102,6 +102,7 @@ + @@ -194,6 +195,7 @@ + diff --git a/cheat-library/cheat-library.vcxproj.filters b/cheat-library/cheat-library.vcxproj.filters index 4e297a7..d10f161 100644 --- a/cheat-library/cheat-library.vcxproj.filters +++ b/cheat-library/cheat-library.vcxproj.filters @@ -261,6 +261,9 @@ Header Files + + Header Files + @@ -480,6 +483,9 @@ Source Files + + Source Files + diff --git a/cheat-library/src/appdata/il2cpp-functions.h b/cheat-library/src/appdata/il2cpp-functions.h index a9c51d3..69c5738 100644 --- a/cheat-library/src/appdata/il2cpp-functions.h +++ b/cheat-library/src/appdata/il2cpp-functions.h @@ -358,6 +358,10 @@ DO_APP_FUNC(0x05C8B870, float, Canvas_get_scaleFactor, (/*Canvas**/void* __this, DO_APP_FUNC(0x03066EB0, void, LevelTimeManager_SetInternalTimeOfDay, (/*LevelTimeManager**/void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method)); +// 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)); + // Singletons DO_APP_FUNC(0x061A8830, void*, Singleton_GetInstance, (MethodInfo* method)); diff --git a/cheat-library/src/appdata/il2cpp-types.h b/cheat-library/src/appdata/il2cpp-types.h index a928806..2cb7dc2 100644 --- a/cheat-library/src/appdata/il2cpp-types.h +++ b/cheat-library/src/appdata/il2cpp-types.h @@ -10544,6 +10544,20 @@ namespace app { struct IGKEDHHIDMA__Fields fields; }; + struct __declspec(align(8)) InLevelMainPageContext_DoTeamCountDown_Iterator__Fields + { + int32_t HGCHJINEMCM; + struct Object* KOBKOALABHL; + struct InLevelMainPageContext* _levelMainPageContext; + }; + + struct InLevelMainPageContext_DoTeamCountDown_Iterator + { + struct InLevelMainPageContext_DoTeamCountDown_Iterator__Class* klass; + MonitorData* monitor; + struct InLevelMainPageContext_DoTeamCountDown_Iterator__Fields fields; + }; + struct MonoMiniMap__Fields { struct MonoBehaviour__Fields _; struct Button* _actionButton; diff --git a/cheat-library/src/user/cheat/cheat.cpp b/cheat-library/src/user/cheat/cheat.cpp index 58f6614..4c1adfd 100644 --- a/cheat-library/src/user/cheat/cheat.cpp +++ b/cheat-library/src/user/cheat/cheat.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,7 @@ namespace cheat FEAT_INST(AutoTreeFarm), FEAT_INST(AutoDestroy), FEAT_INST(AutoSeelie), + FEAT_INST(OpenTeamImmediately), FEAT_INST(VacuumLoot), FEAT_INST(DialogSkip), FEAT_INST(DumbEnemies), diff --git a/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp b/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp new file mode 100644 index 0000000..e66e52f --- /dev/null +++ b/cheat-library/src/user/cheat/world/OpenTeamImmediately.cpp @@ -0,0 +1,52 @@ +#include "pch-il2cpp.h" +#include "OpenTeamImmediately.h" + +#include + +namespace cheat::feature +{ + static bool MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook(app::InLevelMainPageContext_DoTeamCountDown_Iterator* __this, MethodInfo* method); + + OpenTeamImmediately::OpenTeamImmediately() : Feature(), + NF(f_Enabled, "Enable Open Team Immediately", "Open Team", false) + { + HookManager::install(app::MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext, MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook); + } + + const FeatureGUIInfo& OpenTeamImmediately::GetGUIInfo() const + { + static const FeatureGUIInfo info{ "", "World", false }; + return info; + } + + void OpenTeamImmediately::DrawMain() + { + ConfigWidget("Open Team Immediately", f_Enabled, "Open team immediately without waiting for count down."); + } + + bool OpenTeamImmediately::NeedStatusDraw() const + { + return f_Enabled; + } + + void OpenTeamImmediately::DrawStatus() + { + ImGui::Text("OpenTeamImmediately"); + } + + OpenTeamImmediately& OpenTeamImmediately::GetInstance() + { + static OpenTeamImmediately instance; + return instance; + } + + static bool MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook(app::InLevelMainPageContext_DoTeamCountDown_Iterator* __this, MethodInfo* method) + { + auto& openTeamImmediately = OpenTeamImmediately::GetInstance(); + if (openTeamImmediately.f_Enabled) + { + __this->fields._levelMainPageContext->fields._countDownTime = __this->fields._levelMainPageContext->fields.EnterCountDown + 1.f; + } + return CALL_ORIGIN(MoleMole_InLevelMainPageContext_DoTeamCountDown_c_Iterator0__MoveNext_Hook, __this, method); + } +} \ 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 new file mode 100644 index 0000000..26bfa8f --- /dev/null +++ b/cheat-library/src/user/cheat/world/OpenTeamImmediately.h @@ -0,0 +1,24 @@ +#include +#include + +namespace cheat::feature +{ + + class OpenTeamImmediately : public Feature + { + public: + config::Field> f_Enabled; + + static OpenTeamImmediately& GetInstance(); + + const FeatureGUIInfo& GetGUIInfo() const override; + void DrawMain() override; + + virtual bool NeedStatusDraw() const override; + void DrawStatus() override; + + private: + OpenTeamImmediately(); + }; +} + From 1ce0c0617afd532c9be458e509376fe58571b0cc Mon Sep 17 00:00:00 2001 From: gawgua Date: Thu, 25 Aug 2022 21:00:34 +0700 Subject: [PATCH 2/3] Fix swapped type of RishbolandTiger and ShaggySumpterBeast Why? --- cheat-library/src/user/cheat/game/filters.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index ecd88e6..d67b1ce 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -225,8 +225,8 @@ namespace cheat::game::filters SimpleFilter Cicin = { EntityType__Enum_1::Monster, "_Cicin" }; SimpleFilter Beisht = { EntityType__Enum_1::Monster, "_Eldritch" }; SimpleFilter JadeplumeTerrorshroom = { EntityType__Enum_1::Monster, "Fungus_Raptor" }; - SimpleFilter RishbolandTiger = { EntityType__Enum_1::Monster, "_Megamoth_" }; - SimpleFilter ShaggySumpterBeast = { EntityType__Enum_1::Monster, "_Panther" }; + SimpleFilter RishbolandTiger = { EntityType__Enum_1::Monster, "_Panther" }; + SimpleFilter ShaggySumpterBeast = { EntityType__Enum_1::Monster, "_Megamoth_" }; SimpleFilter Spincrocodile = { EntityType__Enum_1::Monster, "_Gator" }; SimpleFilter SentryTurrets = { EntityType__Enum_1::Field, "SentryTurrets_" }; } From 06ddbc256307fdd086e0b2448955cb1917ad3655 Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:28:07 -0600 Subject: [PATCH 3/3] fixed #505 --- cheat-library/src/user/cheat/game/filters.cpp | 2 +- cheat-library/src/user/cheat/world/AutoSeelie.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index d67b1ce..ceab856 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -310,7 +310,7 @@ namespace cheat::game::filters SimpleFilter PirateHelm = { EntityType__Enum_1::Field, "_PirateHelm" }; WhitelistFilter PressurePlate = { {EntityType__Enum_1::Field, EntityType__Enum_1::Gadget }, {"Gear_Gravity", "_LitPathPlate" } }; SimpleFilter SealLocations = { EntityType__Enum_1::Gadget, "_RunesKey" }; - SimpleFilter SeelieLamp = { EntityType__Enum_1::Field, "Gear_SeeliaLamp" }; + SimpleFilter SeelieLamp = { EntityType__Enum_1::Field, {"Gear_SeeliaLamp", "LifeSeelieBase"} }; SimpleFilter Seelie = { EntityType__Enum_1::Platform, "Gear_Seelie" }; SimpleFilter SmallRockPile = { EntityType__Enum_1::Gadget, "_StonePile_01" }; SimpleFilter StormBarrier = { EntityType__Enum_1::Field, "_WindField_PushField" }; diff --git a/cheat-library/src/user/cheat/world/AutoSeelie.cpp b/cheat-library/src/user/cheat/world/AutoSeelie.cpp index 482bfbb..1200718 100644 --- a/cheat-library/src/user/cheat/world/AutoSeelie.cpp +++ b/cheat-library/src/user/cheat/world/AutoSeelie.cpp @@ -59,7 +59,7 @@ namespace cheat::feature auto distance = manager.avatar()->distance(entity); float radius = 100.0f; - if (entity->name().find("Seelie") != std::string::npos) + if (entity->name().find("_Seelie") != std::string::npos) { if (entity->name().find("ElectricSeelie") != std::string::npos) {