From c6cda847d161a48464f17a2ae2e1c5e0efe4dfa8 Mon Sep 17 00:00:00 2001 From: Nagataka Date: Wed, 3 Apr 2024 11:53:30 +0700 Subject: [PATCH 1/2] Add No Cooldown Summon Shadow And Bypass Limit Summon --- src/game/appdata/il2cpp-functions.h | 5 +++ src/game/appdata/il2cpp-types.h | 56 ++++++++++++++++++++++++++ src/game/cheat/features/NoCooldown.cpp | 11 +++++ src/game/cheat/features/NoCooldown.h | 1 + 4 files changed, 73 insertions(+) diff --git a/src/game/appdata/il2cpp-functions.h b/src/game/appdata/il2cpp-functions.h index b62da75..000e7b0 100644 --- a/src/game/appdata/il2cpp-functions.h +++ b/src/game/appdata/il2cpp-functions.h @@ -8,6 +8,7 @@ using namespace app; DO_APP_FUNC(0x00454960, void, GameFrameWork_Update, (GameFrameWork* __this, MethodInfo* method)); + DO_APP_FUNC(0x0202DAF0, String*, Marshal_PtrToStringAnsi, (void* ptr, MethodInfo* method)); DO_APP_FUNC(0x0202DB10, String*, Marshal_PtrToStringUni, (void* ptr, MethodInfo* method)); @@ -45,10 +46,14 @@ DO_APP_FUNC(0x00998A00, bool, PCILGJOEPJM_PPAKPBOJLIP, (ENNEJEPMJLJ* IGBKKNODEGM // Mission Time DO_APP_FUNC(0x00D87DD0, void, StageReadyPage_EnterUI, (StageReadyPage* __this, MethodInfo* method)); +DO_APP_FUNC(0x00D8BA20, void, StoryQuestChapterPage_EnterUI, (StoryQuestChapterPage* __this,MethodInfo* method)); // Intro Movie DO_APP_FUNC(0x00A9AE20, void, GameMovie_Update, (GameMovie* __this, MethodInfo* method)); DO_APP_FUNC(0x00A9C720, void, IntroMovie_Update, (IntroMovie* __this, MethodInfo* method)); +//Shadow Cooldown And Limit +DO_APP_FUNC(0x009A41E0, void, JLLMICINIDA__LFCGJLAFFOM, (JLLMICINIDA* __this, MethodInfo* method)); + // Singletons DO_APP_FUNC(0x00344840, void*, TSingleton_GetInstance, (MethodInfo* method)); // Search for this in IDA // DO_APP_FUNC_METHODINFO(0x0403AC70, TSingleton_1_PJKMAOEINNH__get_Instance__MethodInfo); // Probably EntityManager or something similar \ No newline at end of file diff --git a/src/game/appdata/il2cpp-types.h b/src/game/appdata/il2cpp-types.h index 5adffc4..e9e82bb 100644 --- a/src/game/appdata/il2cpp-types.h +++ b/src/game/appdata/il2cpp-types.h @@ -3470,6 +3470,29 @@ namespace app struct KAAIFMKPKAG__Fields fields; }; + struct __declspec(align(8)) PHAMLKDDCGJ_Fields { + struct UnityEngine_GameObject_o* GDIOINPJJPJ; + struct System_Collections_Generic_List_ENNEJEPMJLJ__o* NHLIIJEJNHK; + struct System_Collections_Generic_List_PHAMLKDDCGJ__o* LFCGEIMEIPH; + struct System_Collections_Generic_List_ENNEJEPMJLJ__o* LJLCMHCDIFM; + struct System_Collections_Generic_List_Collider__o* EMAMJGPHNBN; + }; + + struct JLLMICINIDA_Fields : PHAMLKDDCGJ_Fields { + float DGPHADJBCDJ; + bool DONILLPJMFC; + int32_t KBDEBMKCNPD; + int32_t KKEDBBAMIJL; + float _HGHNGDFFJBD_k__BackingField; + }; + + struct JLLMICINIDA + { + struct JLLMICINIDA__Class* klass; + MonitorData* monitor; + struct JLLMICINIDA_Fields fields; + }; + struct __declspec(align(8)) PJKMAOEINNH__Fields { bool FAGLAHOBJPM; @@ -4543,6 +4566,39 @@ namespace app struct StageReadyPage__Fields fields; }; + struct StoryQuestChapterPage_Fields { + struct UIPage__Fields _; + struct UIContentsUnlockItem_o* ContentsUnlockItem; + struct UIGraph_o* HLMFGMDDAKK; + struct StoryQuestChapterListItem* FCBKMDAAGJM; + struct StoryQuestChapterListItem* OGKFCDNBFKF; + struct StoryQuestChapterListItem* ScrollListNoticeChapterItem; + struct StoryQuestDifficultyTypeGroup* HPGPMDGOBDH; + struct UI_Button* HEIJCLLJFPG; + struct UI_Button* BtnProgressFocus; + struct UIMusicPlayer_array* MusicPlayerList; + struct StoryQuestChpaterModeInfo* NCHNBMHIPEJ; + uint8_t KELBEBBNPDA; uint8_t PGNMMGJMGPI; + struct ContentMenuTabGroup* m_ContentMenuTabGroup; + struct UI_Image_array* backGroundImages; + struct PGCIJEIMPKB_o* DKDPEDKNJHN; + struct PHFECEJNAML_o* NLBDIENNAEJ; + bool NKBDMIPCCPA; + struct Vector3 FLCIAGINIBG; + struct Coroutine* PMNPICKHKKK; + struct RectTransform_o* CFPOEKLCAFD; + struct AnimationCurve_o* focusSpeedCurve; + struct RectTransform_o* MHODEEBGDDA; + }; + + + struct StoryQuestChapterPage + { + struct StoryQuestChapterPage__Class* klass; + MonitorData* monitor; + struct StoryQuestChapterPage_Fields fields; + }; + enum class GameMovie_PHMCJCHPFEF__Enum : int32_t { INIT = 0x00000000, diff --git a/src/game/cheat/features/NoCooldown.cpp b/src/game/cheat/features/NoCooldown.cpp index a654907..88841e9 100644 --- a/src/game/cheat/features/NoCooldown.cpp +++ b/src/game/cheat/features/NoCooldown.cpp @@ -6,6 +6,17 @@ namespace Cheat::Features NoCooldown::NoCooldown() { HookManager::install(app::KAAIFMKPKAG_IOFMGMJCCFO, KAAIFMKPKAG_IOFMGMJCCFO_Hook); + HookManager::install(app::JLLMICINIDA__LFCGJLAFFOM, JLLMICINIDA__LFCGJLAFFOM_Hook); + } + + void NoCooldown::JLLMICINIDA__LFCGJLAFFOM_Hook(app::JLLMICINIDA* __this, MethodInfo* method) + { + if (vars.b_NoCooldown && __this) + { + __this->fields.DGPHADJBCDJ = 0.0f; + __this->fields.KKEDBBAMIJL = 1; + } + return CALL_ORIGIN(JLLMICINIDA__LFCGJLAFFOM_Hook, __this, method); } void* NoCooldown::KAAIFMKPKAG_IOFMGMJCCFO_Hook(app::KAAIFMKPKAG* __this, bool DEJNILEHENL, MethodInfo* method) diff --git a/src/game/cheat/features/NoCooldown.h b/src/game/cheat/features/NoCooldown.h index 9e1f7a6..5cc8923 100644 --- a/src/game/cheat/features/NoCooldown.h +++ b/src/game/cheat/features/NoCooldown.h @@ -11,5 +11,6 @@ namespace Cheat::Features private: static void* KAAIFMKPKAG_IOFMGMJCCFO_Hook(app::KAAIFMKPKAG* __this, bool DEJNILEHENL, MethodInfo* method); + static void JLLMICINIDA__LFCGJLAFFOM_Hook(app::JLLMICINIDA* __this, MethodInfo* method); }; } From 6e28e013dc504db4d5a3e3717bbae6f61fea087a Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Wed, 3 Apr 2024 00:01:14 -0600 Subject: [PATCH 2/2] clean up --- src/game/appdata/il2cpp-functions.h | 5 +- src/game/appdata/il2cpp-types.h | 77 ++++++++++++++++++-------- src/game/cheat/features/NoCooldown.cpp | 11 ++-- src/game/cheat/features/NoCooldown.h | 2 +- 4 files changed, 64 insertions(+), 31 deletions(-) diff --git a/src/game/appdata/il2cpp-functions.h b/src/game/appdata/il2cpp-functions.h index e2e0a46..d051d26 100644 --- a/src/game/appdata/il2cpp-functions.h +++ b/src/game/appdata/il2cpp-functions.h @@ -8,7 +8,6 @@ using namespace app; DO_APP_FUNC(0x00454960, void, GameFrameWork_Update, (GameFrameWork* __this, MethodInfo* method)); - DO_APP_FUNC(0x0202DAF0, String*, Marshal_PtrToStringAnsi, (void* ptr, MethodInfo* method)); DO_APP_FUNC(0x0202DB10, String*, Marshal_PtrToStringUni, (void* ptr, MethodInfo* method)); @@ -64,8 +63,8 @@ DO_APP_FUNC(0x00837510, void, JIBDAHKJHOG_HLLNLMAECBD, (JIBDAHKJHOG* __this, voi DO_APP_FUNC(0x00836650, void, JIBDAHKJHOG_EJLDBPGJGPN, (JIBDAHKJHOG* __this, MethodInfo* method)); // NextStageBattle DO_APP_FUNC(0x00836410, void, JIBDAHKJHOG_COLDHPFDOHG, (JIBDAHKJHOG* __this, MethodInfo* method)); // StageStart -//Shadow Cooldown And Limit -DO_APP_FUNC(0x009A41E0, void, JLLMICINIDA__LFCGJLAFFOM, (JLLMICINIDA* __this, MethodInfo* method)); +// Shadow Cooldown And Limit +DO_APP_FUNC(0x009A41E0, void, JLLMICINIDA_LFCGJLAFFOM, (JLLMICINIDA* __this, MethodInfo* method)); // Singletons DO_APP_FUNC(0x00344840, void*, TSingleton_GetInstance, (MethodInfo* method)); // Search for this in IDA diff --git a/src/game/appdata/il2cpp-types.h b/src/game/appdata/il2cpp-types.h index e103250..ec3595b 100644 --- a/src/game/appdata/il2cpp-types.h +++ b/src/game/appdata/il2cpp-types.h @@ -3470,15 +3470,25 @@ namespace app struct KAAIFMKPKAG__Fields fields; }; - struct __declspec(align(8)) PHAMLKDDCGJ_Fields { - struct UnityEngine_GameObject_o* GDIOINPJJPJ; - struct System_Collections_Generic_List_ENNEJEPMJLJ__o* NHLIIJEJNHK; - struct System_Collections_Generic_List_PHAMLKDDCGJ__o* LFCGEIMEIPH; - struct System_Collections_Generic_List_ENNEJEPMJLJ__o* LJLCMHCDIFM; - struct System_Collections_Generic_List_Collider__o* EMAMJGPHNBN; + struct __declspec(align(8)) PHAMLKDDCGJ__Fields + { + struct GameObject* GDIOINPJJPJ; + struct List_1_ENNEJEPMJLJ_* NHLIIJEJNHK; + struct List_1_PHAMLKDDCGJ_* LFCGEIMEIPH; + struct List_1_ENNEJEPMJLJ_* LJLCMHCDIFM; + struct List_1_UnityEngine_Collider_* EMAMJGPHNBN; + }; + + struct PHAMLKDDCGJ + { + struct PHAMLKDDCGJ__Class* klass; + MonitorData* monitor; + struct PHAMLKDDCGJ__Fields fields; }; - struct JLLMICINIDA_Fields : PHAMLKDDCGJ_Fields { + struct JLLMICINIDA__Fields + { + struct PHAMLKDDCGJ__Fields _; float DGPHADJBCDJ; bool DONILLPJMFC; int32_t KBDEBMKCNPD; @@ -3490,7 +3500,7 @@ namespace app { struct JLLMICINIDA__Class* klass; MonitorData* monitor; - struct JLLMICINIDA_Fields fields; + struct JLLMICINIDA__Fields fields; }; struct __declspec(align(8)) PJKMAOEINNH__Fields @@ -4566,37 +4576,58 @@ namespace app struct StageReadyPage__Fields fields; }; - struct StoryQuestChapterPage_Fields { + enum class EQuestStoryModeType__Enum : uint8_t + { + None = 0x00, + Default = 0x01, + Reverse = 0x02, + Max = 0x03, + }; + + enum class EQuestStoryDifficultyType__Enum : uint8_t + { + None = 0x00, + Normal = 0x01, + Hard = 0x02, + VeryHard = 0x03, + Reverse = 0x04, + ReverseHard = 0x05, + ReverseVeryHard = 0x06, + Max = 0x07, + }; + + struct StoryQuestChapterPage__Fields + { struct UIPage__Fields _; - struct UIContentsUnlockItem_o* ContentsUnlockItem; - struct UIGraph_o* HLMFGMDDAKK; + struct UIContentsUnlockItem* ContentsUnlockItem; + struct UIGraph* HLMFGMDDAKK; struct StoryQuestChapterListItem* FCBKMDAAGJM; struct StoryQuestChapterListItem* OGKFCDNBFKF; struct StoryQuestChapterListItem* ScrollListNoticeChapterItem; struct StoryQuestDifficultyTypeGroup* HPGPMDGOBDH; - struct UI_Button* HEIJCLLJFPG; - struct UI_Button* BtnProgressFocus; - struct UIMusicPlayer_array* MusicPlayerList; + struct Button* HEIJCLLJFPG; + struct Button* BtnProgressFocus; + struct UIMusicPlayer__Array* MusicPlayerList; struct StoryQuestChpaterModeInfo* NCHNBMHIPEJ; - uint8_t KELBEBBNPDA; uint8_t PGNMMGJMGPI; + EQuestStoryModeType__Enum KELBEBBNPDA; + EQuestStoryDifficultyType__Enum PGNMMGJMGPI; struct ContentMenuTabGroup* m_ContentMenuTabGroup; - struct UI_Image_array* backGroundImages; - struct PGCIJEIMPKB_o* DKDPEDKNJHN; - struct PHFECEJNAML_o* NLBDIENNAEJ; + struct Image__Array* backGroundImages; + struct PGCIJEIMPKB* DKDPEDKNJHN; + struct PHFECEJNAML* NLBDIENNAEJ; bool NKBDMIPCCPA; struct Vector3 FLCIAGINIBG; struct Coroutine* PMNPICKHKKK; - struct RectTransform_o* CFPOEKLCAFD; - struct AnimationCurve_o* focusSpeedCurve; - struct RectTransform_o* MHODEEBGDDA; + struct RectTransform* CFPOEKLCAFD; + struct AnimationCurve* focusSpeedCurve; + struct RectTransform* MHODEEBGDDA; }; - struct StoryQuestChapterPage { struct StoryQuestChapterPage__Class* klass; MonitorData* monitor; - struct StoryQuestChapterPage_Fields fields; + struct StoryQuestChapterPage__Fields fields; }; enum class GameMovie_PHMCJCHPFEF__Enum : int32_t diff --git a/src/game/cheat/features/NoCooldown.cpp b/src/game/cheat/features/NoCooldown.cpp index 8281d62..4154609 100644 --- a/src/game/cheat/features/NoCooldown.cpp +++ b/src/game/cheat/features/NoCooldown.cpp @@ -6,17 +6,20 @@ namespace Cheat::Features NoCooldown::NoCooldown() { HookManager::install(app::KAAIFMKPKAG_IOFMGMJCCFO, KAAIFMKPKAG_IOFMGMJCCFO_Hook); - HookManager::install(app::JLLMICINIDA__LFCGJLAFFOM, JLLMICINIDA__LFCGJLAFFOM_Hook); + HookManager::install(app::JLLMICINIDA_LFCGJLAFFOM, JLLMICINIDA_LFCGJLAFFOM_Hook); } - void NoCooldown::JLLMICINIDA__LFCGJLAFFOM_Hook(app::JLLMICINIDA* __this, MethodInfo* method) + void NoCooldown::JLLMICINIDA_LFCGJLAFFOM_Hook(app::JLLMICINIDA* __this, MethodInfo* method) { - if (vars.b_NoCooldown && __this) + auto& vars = Vars::GetInstance(); + + if (vars.NoCooldown.value() && __this) { __this->fields.DGPHADJBCDJ = 0.0f; __this->fields.KKEDBBAMIJL = 1; } - return CALL_ORIGIN(JLLMICINIDA__LFCGJLAFFOM_Hook, __this, method); + + return CALL_ORIGIN(JLLMICINIDA_LFCGJLAFFOM_Hook, __this, method); } void* NoCooldown::KAAIFMKPKAG_IOFMGMJCCFO_Hook(app::KAAIFMKPKAG* __this, bool DEJNILEHENL, MethodInfo* method) diff --git a/src/game/cheat/features/NoCooldown.h b/src/game/cheat/features/NoCooldown.h index 5cc8923..ca3d979 100644 --- a/src/game/cheat/features/NoCooldown.h +++ b/src/game/cheat/features/NoCooldown.h @@ -11,6 +11,6 @@ namespace Cheat::Features private: static void* KAAIFMKPKAG_IOFMGMJCCFO_Hook(app::KAAIFMKPKAG* __this, bool DEJNILEHENL, MethodInfo* method); - static void JLLMICINIDA__LFCGJLAFFOM_Hook(app::JLLMICINIDA* __this, MethodInfo* method); + static void JLLMICINIDA_LFCGJLAFFOM_Hook(app::JLLMICINIDA* __this, MethodInfo* method); }; }