Temporary MusicEvent cheese

This commit is contained in:
Joaquin 2022-06-18 18:08:33 -06:00
parent 4d6cd985b7
commit f70d515295
7 changed files with 374 additions and 2 deletions

View File

@ -122,6 +122,7 @@
<ClInclude Include="src\user\cheat\world\DumbEnemies.h" /> <ClInclude Include="src\user\cheat\world\DumbEnemies.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\MusicEvent.h" />
<ClInclude Include="src\user\main.h" /> <ClInclude Include="src\user\main.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -233,6 +234,7 @@
<ClCompile Include="src\user\cheat\world\DumbEnemies.cpp" /> <ClCompile Include="src\user\cheat\world\DumbEnemies.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\MusicEvent.cpp" />
<ClCompile Include="src\user\main.cpp" /> <ClCompile Include="src\user\main.cpp" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
@ -925,8 +927,7 @@
</Command> </Command>
</PostBuildEvent> </PostBuildEvent>
<CustomBuildStep> <CustomBuildStep>
<Command>"$(OutDir)injector.exe" <Command>"$(OutDir)injector.exe" powershell -nop -c "&amp;amp; {sleep 15}"</Command>
powershell -nop -c "&amp; {sleep 15}"</Command>
<Outputs>$(OutDir)_noexist.nope;%(Outputs)</Outputs> <Outputs>$(OutDir)_noexist.nope;%(Outputs)</Outputs>
<Inputs>$(TargetPath);%(Inputs)</Inputs> <Inputs>$(TargetPath);%(Inputs)</Inputs>
</CustomBuildStep> </CustomBuildStep>

View File

@ -237,6 +237,9 @@
<ClInclude Include="src\user\cheat\visuals\Browser.h"> <ClInclude Include="src\user\cheat\visuals\Browser.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\user\cheat\world\MusicEvent.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Font Include="res\Ruda-Bold.ttf" /> <Font Include="res\Ruda-Bold.ttf" />
@ -432,6 +435,9 @@
<ClCompile Include="src\user\cheat\visuals\Browser.cpp"> <ClCompile Include="src\user\cheat\visuals\Browser.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\user\cheat\world\MusicEvent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="res\res.rc"> <ResourceCompile Include="res\res.rc">

View File

@ -164,6 +164,15 @@ DO_APP_FUNC(0x065546E0, Transform*, Transform_GetChild, (Transform* __this, int3
DO_APP_FUNC(0x0652EA10, Component_1*, Component_1_GetComponent_1, (Component_1* __this, String* type, MethodInfo* method)); DO_APP_FUNC(0x0652EA10, Component_1*, Component_1_GetComponent_1, (Component_1* __this, String* type, MethodInfo* method));
DO_APP_FUNC(0x0662F520, void, GameObject_SetActive, (GameObject* __this, bool value, MethodInfo* method)); DO_APP_FUNC(0x0662F520, void, GameObject_SetActive, (GameObject* __this, bool value, MethodInfo* method));
DO_APP_FUNC(0x0418FEB0, Camera*, Component_1_GetComponent_17, (Component_1* __this, MethodInfo* method));
DO_APP_FUNC(0x041A7D40, Camera*, GameObject_AddComponent_24, (GameObject* __this, MethodInfo* method));
DO_APP_FUNC(0x041A8080, CinemachineBrain*, GameObject_GetComponent_189, (GameObject* __this, MethodInfo* method));
DO_APP_FUNC(0x041A8080, CinemachineExternalCamera*, GameObject_GetComponent_741, (GameObject* __this, MethodInfo* method));
DO_APP_FUNC(0x06550C00, Object_1*, Object_1_Instantiate_2, (Object_1* original, MethodInfo* method));
DO_APP_FUNC(0x041B0BB0, Object*, Object_1_Instantiate_5, (Object* original, MethodInfo* method));
DO_APP_FUNC(0x041B0BB0, GameObject*, Object_1_Instantiate_11, (GameObject* original, MethodInfo* method));
// Browser // Browser
DO_APP_FUNC(0x0662F100, GameObject*, GameObject_CreatePrimitive, (PrimitiveType__Enum type, MethodInfo* method)); DO_APP_FUNC(0x0662F100, GameObject*, GameObject_CreatePrimitive, (PrimitiveType__Enum type, MethodInfo* method));
DO_APP_FUNC(0x0662F700, Transform*, GameObject_get_transform, (GameObject* __this, MethodInfo* method)); DO_APP_FUNC(0x0662F700, Transform*, GameObject_get_transform, (GameObject* __this, MethodInfo* method));
@ -184,6 +193,20 @@ DO_APP_FUNC(0x06550910, void, Object_1_Destroy_1, (Object_1* obj, MethodInfo* me
DO_APP_FUNC(0x0662F0A0, Component_1*, GameObject_AddComponent, (GameObject* __this, Type* componentType, MethodInfo* method)); DO_APP_FUNC(0x0662F0A0, Component_1*, GameObject_AddComponent, (GameObject* __this, Type* componentType, MethodInfo* method));
DO_APP_FUNC(0x065508C0, void, Object_1_DestroyImmediate_1, (Object_1* obj, MethodInfo* method)); DO_APP_FUNC(0x065508C0, void, Object_1_DestroyImmediate_1, (Object_1* obj, MethodInfo* method));
// Music game event
DO_APP_FUNC(0x00FFE490, void, MusicGamePlayComponent_OnPlayerUpdate, (MusicGamePlayComponent* __this, MethodInfo* method));
DO_APP_FUNC(0x00FFE600, void, MusicGamePlayComponent_OnStart, (MusicGamePlayComponent* __this, BeatMapData* beatMapData, MusicMetaInfo* musicMetaInfo, MethodInfo* method));
DO_APP_FUNC(0x00FFE310, void, MusicGamePlayComponent_OnMiss, (MusicGamePlayComponent* __this, MethodInfo* method));
DO_APP_FUNC(0x00FFEE40, void, MusicGamePlayComponent_set_combo, (MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method));
DO_APP_FUNC(0x00FFF050, void, MusicGamePlayComponent_set_score, (MusicGamePlayComponent* __this, float value, MethodInfo* method));
DO_APP_FUNC(0x01B5AEB0, void, MusicGamePlayComponent_set_maxCombo, (MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method));
DO_APP_FUNC(0x02C749E0, void, MusicGamePlayComponent_set_perfectCnt, (MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method));
DO_APP_FUNC(0x035C4E50, void, MusicGamePlayComponent_set_greatCnt, (MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method));
DO_APP_FUNC(0x017A31C0, void, MusicGamePlayComponent_set_missCnt, (MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method));
DO_APP_FUNC(0x00FFDE90, void, MusicGamePlayComponent_OnHit, (MusicGamePlayComponent* __this, float score, MethodInfo* method));
// Utility // Utility
DO_APP_FUNC(0x03551B60, String*, Text_get_text, (Text* __this, MethodInfo* method)); DO_APP_FUNC(0x03551B60, String*, Text_get_text, (Text* __this, MethodInfo* method));
DO_APP_FUNC(0x06568060, void, Text_set_text, (Text* __this, String* value, MethodInfo* method)); DO_APP_FUNC(0x06568060, void, Text_set_text, (Text* __this, String* value, MethodInfo* method));

View File

@ -11651,6 +11651,169 @@ namespace app {
struct Browser__Fields fields; struct Browser__Fields fields;
}; };
enum class CinemachineBrain_UpdateMethod__Enum : int32_t {
FixedUpdate = 0x00000000,
LateUpdate = 0x00000001,
SmartUpdate = 0x00000002,
};
struct CameraState_CustomBlendable {
struct Object_1* m_Custom;
float m_Weight;
};
struct CinemachineBlenderSettings__Fields {
void* _;
struct CinemachineBlenderSettings_CustomBlend__Array* m_CustomBlends;
};
struct CinemachineBlenderSettings {
struct CinemachineBlenderSettings__Class* klass;
MonitorData* monitor;
struct CinemachineBlenderSettings__Fields fields;
};
struct LensSettings {
float FieldOfView;
float OrthographicSize;
float NearClipPlane;
float FarClipPlane;
float Dutch;
bool _Orthographic_k__BackingField;
float _Aspect_k__BackingField;
};
struct CameraState {
struct LensSettings _Lens_k__BackingField;
struct Vector3 _ReferenceUp_k__BackingField;
struct Vector3 _ReferenceLookAt_k__BackingField;
struct Vector3 _RawPosition_k__BackingField;
struct Quaternion _RawOrientation_k__BackingField;
struct Vector3 _PositionDampingBypass_k__BackingField;
float _ShotQuality_k__BackingField;
struct Vector3 _PositionCorrection_k__BackingField;
struct Quaternion _OrientationCorrection_k__BackingField;
struct CameraState_CustomBlendable mCustom0;
struct CameraState_CustomBlendable mCustom1;
struct CameraState_CustomBlendable mCustom2;
struct CameraState_CustomBlendable mCustom3;
struct List_1_Cinemachine_CameraState_CustomBlendable_* m_CustomOverflow;
int32_t _NumCustomBlendables_k__BackingField;
};
enum class CinemachineBlendDefinition_Style__Enum : int32_t {
Cut = 0x00000000,
EaseInOut = 0x00000001,
EaseIn = 0x00000002,
EaseOut = 0x00000003,
HardIn = 0x00000004,
HardOut = 0x00000005,
Linear = 0x00000006,
Spherical_Linear = 0x00000007,
};
struct CinemachineBlendDefinition {
CinemachineBlendDefinition_Style__Enum m_Style;
float m_Time;
struct AnimationCurve* m_BlendCurve;
};
struct CinemachineBrain__Fields {
struct MonoBehaviour__Fields _;
bool m_SelfUpdate;
bool m_ShowDebugText;
bool m_ShowCameraFrustum;
bool m_IgnoreTimeScale;
struct Transform* m_WorldUpOverride;
CinemachineBrain_UpdateMethod__Enum m_UpdateMethod;
struct CinemachineBlendDefinition m_DefaultBlend;
struct CinemachineBlenderSettings* m_CustomBlends;
struct Camera* m_OutputCamera;
float mFieldOfView;
float mNearClipPlane;
float mDutch;
float mOrthographicSize;
struct Vector3 mFinalPosition;
struct Quaternion mOrientationWithoutDutch;
struct Quaternion mFinalOrientation;
struct CinemachineBrain_BrainEvent* m_CameraCutEvent;
struct CinemachineBrain_VcamEvent* m_CameraActivatedEvent;
struct CinemachineBrain_BlendEvent* m_CameraBlendCompeleteEvent;
struct Component_1* _PostProcessingComponent_k__BackingField;
struct ICinemachineCamera* mActiveCameraPreviousFrame;
struct ICinemachineCamera* mOutgoingCameraPreviousFrame;
struct CinemachineBlend* mActiveBlend;
bool mPreviousFrameWasOverride;
struct List_1_Cinemachine_CinemachineBrain_OverrideStackFrame_* mOverrideStack;
int32_t mNextOverrideId;
struct CinemachineBrain_OverrideStackFrame* mOverrideBlendFromNothing;
struct WaitForFixedUpdate* mWaitForFixedUpdate;
struct CameraState _CurrentCameraState_k__BackingField;
};
struct CinemachineBrain {
struct CinemachineBrain__Class* klass;
MonitorData* monitor;
struct CinemachineBrain__Fields fields;
};
struct CinemachineExternalCamera__Fields {
void* _;
struct Transform* m_LookAt;
struct Camera* m_Camera;
struct CameraState m_State;
struct Transform* _Follow_k__BackingField;
};
struct CinemachineExternalCamera {
struct CinemachineExternalCamera__Class* klass;
MonitorData* monitor;
struct CinemachineExternalCamera__Fields fields;
};
struct MusicGamePlayComponent__Fields {
void* _;
uint32_t _combo;
float _score_k__BackingField;
uint32_t _maxCombo_k__BackingField;
uint32_t _perfectCnt_k__BackingField;
uint32_t _greatCnt_k__BackingField;
uint32_t _missCnt_k__BackingField;
};
struct MusicGamePlayComponent {
struct MusicGamePlayComponent__Class* klass;
MonitorData* monitor;
struct MusicGamePlayComponent__Fields fields;
};
struct __declspec(align(8)) BeatMapData__Fields {
struct List_1_MoleMole_MusicGame_TrackData_* trackDatas;
struct POLBDGNBFKM* config;
};
struct BeatMapData {
struct BeatMapData__Class* klass;
MonitorData* monitor;
struct BeatMapData__Fields fields;
};
struct __declspec(align(8)) MusicMetaInfo__Fields {
struct BpmInfo* bpmInfo;
struct List_1_System_Single_* simpleBeatHintTimeMsList;
struct List_1_System_Single_* complexBeatHintTimeMsList;
struct CGDACGGKKNJ* musicConfig;
struct PMIELLLMJKA* musicInfoConfig;
struct POLBDGNBFKM* beatMapConfig;
struct JNEKHDKOKGL* musicInstrumentConfig;
};
struct MusicMetaInfo {
struct MusicMetaInfo__Class* klass;
MonitorData* monitor;
struct MusicMetaInfo__Fields fields;
};
#if !defined(_GHIDRA_) && !defined(_IDA_) #if !defined(_GHIDRA_) && !defined(_IDA_)
} }
#endif #endif

View File

@ -37,6 +37,7 @@
#include <cheat/world/AutoFish.h> #include <cheat/world/AutoFish.h>
#include <cheat/world/AutoCook.h> #include <cheat/world/AutoCook.h>
#include <cheat/world/MusicEvent.h>
#include <cheat/visuals/NoFog.h> #include <cheat/visuals/NoFog.h>
#include <cheat/visuals/FPSUnlock.h> #include <cheat/visuals/FPSUnlock.h>
@ -95,6 +96,7 @@ namespace cheat
FEAT_INST(AutoFish), FEAT_INST(AutoFish),
FEAT_INST(AutoCook), FEAT_INST(AutoCook),
FEAT_INST(MusicEvent),
FEAT_INST(NoFog), FEAT_INST(NoFog),
FEAT_INST(FPSUnlock), FEAT_INST(FPSUnlock),

View File

@ -0,0 +1,152 @@
#include "pch-il2cpp.h"
#include "MusicEvent.h"
#include <helpers.h>
#include <cheat/events.h>
namespace cheat::feature
{
static void MusicGamePlayComponent_OnStart_Hook(app::MusicGamePlayComponent* __this, app::BeatMapData* beatMapData, app::MusicMetaInfo* musicMetaInfo, MethodInfo* method);
static void MusicGamePlayComponent_OnMiss_Hook(app::MusicGamePlayComponent* __this, MethodInfo* method);
static void MusicGamePlayComponent_set_combo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method);
static void MusicGamePlayComponent_set_score_Hook(app::MusicGamePlayComponent* __this, float value, MethodInfo* method);
static void MusicGamePlayComponent_set_maxCombo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method);
static void MusicGamePlayComponent_set_perfectCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method);
static void MusicGamePlayComponent_set_greatCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method);
static void MusicGamePlayComponent_set_missCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method);
static void MusicGamePlayComponent_OnHit_Hook(app::MusicGamePlayComponent* __this, float score, MethodInfo* method);
MusicEvent::MusicEvent() : Feature(),
NF(f_Enabled, "Music Event", "MusicEvent", false)
{
//HookManager::install(app::MusicGamePlayComponent_OnStart, MusicGamePlayComponent_OnStart_Hook);
HookManager::install(app::MusicGamePlayComponent_OnMiss, MusicGamePlayComponent_OnMiss_Hook);
HookManager::install(app::MusicGamePlayComponent_set_combo, MusicGamePlayComponent_set_combo_Hook);
HookManager::install(app::MusicGamePlayComponent_set_score, MusicGamePlayComponent_set_score_Hook);
HookManager::install(app::MusicGamePlayComponent_set_maxCombo, MusicGamePlayComponent_set_maxCombo_Hook);
HookManager::install(app::MusicGamePlayComponent_set_perfectCnt, MusicGamePlayComponent_set_perfectCnt_Hook);
HookManager::install(app::MusicGamePlayComponent_set_greatCnt, MusicGamePlayComponent_set_greatCnt_Hook);
HookManager::install(app::MusicGamePlayComponent_set_missCnt, MusicGamePlayComponent_set_missCnt_Hook);
HookManager::install(app::MusicGamePlayComponent_OnHit, MusicGamePlayComponent_OnHit_Hook);
}
const FeatureGUIInfo& MusicEvent::GetGUIInfo() const
{
static const FeatureGUIInfo info{ "", "World", false };
return info;
}
void MusicEvent::DrawMain()
{
ConfigWidget(f_Enabled, "Enemies don't attack or use abilities against player. \n"
"May not work with some enemies or enemy abilites.");
}
bool MusicEvent::NeedStatusDraw() const
{
return f_Enabled;
}
void MusicEvent::DrawStatus()
{
ImGui::Text("Music Event");
}
MusicEvent& MusicEvent::GetInstance()
{
static MusicEvent instance;
return instance;
}
static void MusicGamePlayComponent_OnStart_Hook(app::MusicGamePlayComponent * __this, app::BeatMapData* beatMapData, app::MusicMetaInfo* musicMetaInfo, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
__this->fields._combo = 9999999;
__this->fields._score_k__BackingField = 9999999;
__this->fields._maxCombo_k__BackingField = 9999999;
__this->fields._perfectCnt_k__BackingField = 9999999;
__this->fields._greatCnt_k__BackingField = 9999999;
__this->fields._missCnt_k__BackingField = 0;
}
CALL_ORIGIN(MusicGamePlayComponent_OnStart_Hook, __this, beatMapData, musicMetaInfo, method);
}
static void MusicGamePlayComponent_OnMiss_Hook(app::MusicGamePlayComponent* __this, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
return;
}
CALL_ORIGIN(MusicGamePlayComponent_OnMiss_Hook, __this, method);
}
static void MusicGamePlayComponent_set_combo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
value = 999999999;
}
CALL_ORIGIN(MusicGamePlayComponent_set_combo_Hook, __this, value, method);
}
static void MusicGamePlayComponent_set_score_Hook(app::MusicGamePlayComponent* __this, float value, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
value = 999999999;
}
CALL_ORIGIN(MusicGamePlayComponent_set_score_Hook, __this, value, method);
}
static void MusicGamePlayComponent_set_maxCombo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
value = 999999999;
}
CALL_ORIGIN(MusicGamePlayComponent_set_maxCombo_Hook, __this, value, method);
}
static void MusicGamePlayComponent_set_perfectCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
value = 999999999;
}
CALL_ORIGIN(MusicGamePlayComponent_set_perfectCnt_Hook, __this, value, method);
}
static void MusicGamePlayComponent_set_greatCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
value = 999999999;
}
CALL_ORIGIN(MusicGamePlayComponent_set_greatCnt_Hook, __this, value, method);
}
static void MusicGamePlayComponent_set_missCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
value = 0;
}
CALL_ORIGIN(MusicGamePlayComponent_set_missCnt_Hook, __this, value, method);
}
static void MusicGamePlayComponent_OnHit_Hook(app::MusicGamePlayComponent* __this, float score, MethodInfo* method)
{
MusicEvent& MusicEvent = MusicEvent::GetInstance();
if (MusicEvent.f_Enabled)
{
score = 999999999;
}
CALL_ORIGIN(MusicGamePlayComponent_OnHit_Hook, __this, score, method);
}
}

View File

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