Merge pull request #504 from hellomykami/OpenTeamImmediately

add open team immediately
This commit is contained in:
Taiga 2022-08-25 17:22:41 -06:00 committed by GitHub
commit f1be68bebf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 104 additions and 0 deletions

View File

@ -102,6 +102,7 @@
<ClInclude Include="src\user\cheat\world\FreezeEnemies.h" /> <ClInclude Include="src\user\cheat\world\FreezeEnemies.h" />
<ClInclude Include="src\user\cheat\world\KillAura.h" /> <ClInclude Include="src\user\cheat\world\KillAura.h" />
<ClInclude Include="src\user\cheat\world\MobVacuum.h" /> <ClInclude Include="src\user\cheat\world\MobVacuum.h" />
<ClInclude Include="src\user\cheat\world\OpenTeamImmediately.h" />
<ClInclude Include="src\user\cheat\world\VacuumLoot.h" /> <ClInclude Include="src\user\cheat\world\VacuumLoot.h" />
<ClInclude Include="src\user\main.h" /> <ClInclude Include="src\user\main.h" />
</ItemGroup> </ItemGroup>
@ -194,6 +195,7 @@
<ClCompile Include="src\user\cheat\world\FreezeEnemies.cpp" /> <ClCompile Include="src\user\cheat\world\FreezeEnemies.cpp" />
<ClCompile Include="src\user\cheat\world\KillAura.cpp" /> <ClCompile Include="src\user\cheat\world\KillAura.cpp" />
<ClCompile Include="src\user\cheat\world\MobVacuum.cpp" /> <ClCompile Include="src\user\cheat\world\MobVacuum.cpp" />
<ClCompile Include="src\user\cheat\world\OpenTeamImmediately.cpp" />
<ClCompile Include="src\user\cheat\world\VacuumLoot.cpp" /> <ClCompile Include="src\user\cheat\world\VacuumLoot.cpp" />
<ClCompile Include="src\user\main.cpp" /> <ClCompile Include="src\user\main.cpp" />
</ItemGroup> </ItemGroup>

View File

@ -261,6 +261,9 @@
<ClInclude Include="src\user\cheat\world\AutoChallenge.h"> <ClInclude Include="src\user\cheat\world\AutoChallenge.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\user\cheat\world\OpenTeamImmediately.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Font Include="res\Ruda-Bold.ttf" /> <Font Include="res\Ruda-Bold.ttf" />
@ -480,6 +483,9 @@
<ClCompile Include="src\user\cheat\world\AutoChallenge.cpp"> <ClCompile Include="src\user\cheat\world\AutoChallenge.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\user\cheat\world\OpenTeamImmediately.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="res\res.rc"> <ResourceCompile Include="res\res.rc">

View File

@ -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)); 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 // Singletons
DO_APP_FUNC(0x061A8830, void*, Singleton_GetInstance, (MethodInfo* method)); DO_APP_FUNC(0x061A8830, void*, Singleton_GetInstance, (MethodInfo* method));

View File

@ -10544,6 +10544,20 @@ namespace app {
struct IGKEDHHIDMA__Fields fields; 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 MonoMiniMap__Fields {
struct MonoBehaviour__Fields _; struct MonoBehaviour__Fields _;
struct Button* _actionButton; struct Button* _actionButton;

View File

@ -44,6 +44,7 @@
#include <cheat/world/AutoCook.h> #include <cheat/world/AutoCook.h>
#include <cheat/world/AutoChallenge.h> #include <cheat/world/AutoChallenge.h>
#include <cheat/world/CustomWeather.h> #include <cheat/world/CustomWeather.h>
#include <cheat/world/OpenTeamImmediately.h>
#include <cheat/visuals/NoFog.h> #include <cheat/visuals/NoFog.h>
#include <cheat/visuals/FPSUnlock.h> #include <cheat/visuals/FPSUnlock.h>
@ -94,6 +95,7 @@ namespace cheat
FEAT_INST(AutoTreeFarm), FEAT_INST(AutoTreeFarm),
FEAT_INST(AutoDestroy), FEAT_INST(AutoDestroy),
FEAT_INST(AutoSeelie), FEAT_INST(AutoSeelie),
FEAT_INST(OpenTeamImmediately),
FEAT_INST(VacuumLoot), FEAT_INST(VacuumLoot),
FEAT_INST(DialogSkip), FEAT_INST(DialogSkip),
FEAT_INST(DumbEnemies), FEAT_INST(DumbEnemies),

View File

@ -0,0 +1,52 @@
#include "pch-il2cpp.h"
#include "OpenTeamImmediately.h"
#include <helpers.h>
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);
}
}

View File

@ -0,0 +1,24 @@
#include <cheat-base/cheat/Feature.h>
#include <cheat-base/config/config.h>
namespace cheat::feature
{
class OpenTeamImmediately : public Feature
{
public:
config::Field<config::Toggle<Hotkey>> f_Enabled;
static OpenTeamImmediately& GetInstance();
const FeatureGUIInfo& GetGUIInfo() const override;
void DrawMain() override;
virtual bool NeedStatusDraw() const override;
void DrawStatus() override;
private:
OpenTeamImmediately();
};
}