Skip to content

Commit 0f45a69

Browse files
committed
make QuestLive better
1 parent 051cb04 commit 0f45a69

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ iOS17.4以上设备使用[SkitDebug](https://github.com/StephenDev0/StikDebug)
7070
|`Enable.AntiAliasingHook`|true| [全局]| 启用抗锯齿修改 |
7171
|>> `AntiAliasingSamples`|8| [全局]| 抗锯齿采样数, 可选1/2/4/8 |
7272
||||
73-
|`Enable.QuestLive.NoParticlesHook`|true| [QuestLive]| 关闭QuestLive心驻留时粒子效果 |
74-
|`Enable.QuestLive.NoThrowAndWaitHook` | true | [QuestLive] | 关闭QuestLive抛心与心驻留:<br>性能影响最大 |
73+
|`Enable.QuestLive.NoParticlesHook`| false | [QuestLive]| 关闭QuestLive心驻留时粒子效果 |
74+
|`Enable.QuestLive.NoThrowAndWaitHook` | true | [QuestLive] | 隐藏QuestLive屏幕心:<br>性能影响最大 |
7575
|`Enable.QuestLive.NoCutinCharacterHook` | true | [QuestLive] | 关闭QuestLive发动技能时右侧角色切入 |
7676
||||
7777
|`Enable.LiveStream.NoAfterLimitationHook` | true | [LiveStream] | AFTER限入解除:<br>白嫖AFTER |

Tweak.xm

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,26 @@ void hooked_FesLiveSettingsView_InitButtons(void* self) {
505505
}
506506

507507
// Tecotec.QuestLive.Live.QuestLiveHeartObject.PlayThrowAnimation
508-
typedef void (*original_QuestLiveHeartObject_PlayThrowAnimation_t)(void* self, float duration, IL2CPP::CClass* playWaitAnimation);
509-
original_QuestLiveHeartObject_PlayThrowAnimation_t original_QuestLiveHeartObject_PlayThrowAnimation = nullptr;
510-
void hooked_QuestLiveHeartObject_PlayThrowAnimation(void* self, float duration, IL2CPP::CClass* playWaitAnimation) {}
508+
// typedef void (*original_QuestLiveHeartObject_PlayThrowAnimation_t)(void* self, float duration, IL2CPP::CClass* playWaitAnimation);
509+
// original_QuestLiveHeartObject_PlayThrowAnimation_t original_QuestLiveHeartObject_PlayThrowAnimation = nullptr;
510+
// void hooked_QuestLiveHeartObject_PlayThrowAnimation(void* self, float duration, IL2CPP::CClass* playWaitAnimation) {
511+
// IL2CPP::CClass *pSelf = reinterpret_cast<IL2CPP::CClass*>(self);
512+
// pSelf->CallMethodSafe<void>("KillThrowAnimation");
513+
// }
511514

512515
// Tecotec.QuestLive.Live.QuestLiveHeartObject.PlayParticles()
513516
typedef void (*original_QuestLiveHeartObject_PlayParticles_t)(void* self);
514517
original_QuestLiveHeartObject_PlayParticles_t original_QuestLiveHeartObject_PlayParticles = nullptr;
515-
void hooked_QuestLiveHeartObject_PlayParticles(void* self) {}
518+
void hooked_QuestLiveHeartObject_PlayParticles(void* self) {
519+
IL2CPP::CClass *pSelf = reinterpret_cast<IL2CPP::CClass*>(self);
520+
pSelf->CallMethodSafe<void>("StopParticles");
521+
}
522+
523+
// Tecotec.QuestLive.Live.QuestLiveHeartObject.ShowHeart(bool show)
524+
static void (*original_QuestLiveHeartObject_ShowHeart)(void* self, bool show);
525+
static void hooked_QuestLiveHeartObject_ShowHeart(void* self, bool show) {
526+
original_QuestLiveHeartObject_ShowHeart(self, false);
527+
}
516528

517529
// Tecotec.QuestLive.Live.QuestLiveCutinCharacter.PlaySkillAnimation()
518530
typedef void (*original_QuestLiveCutinCharacter_PlaySkillAnimation_t)(void* self);
@@ -728,22 +740,22 @@ BOOL hooked_didFinishLaunchingWithOptions(id self, SEL _cmd, UIApplication *appl
728740
}
729741

730742
if ([qualityConfig[@"Enable.QuestLive.NoThrowAndWaitHook"] boolValue]) {
731-
// Tecotec.QuestLive.Live.QuestLiveHeartObject.PlayThrowAnimation
743+
// Tecotec.QuestLive.Live.QuestLiveHeartObject.ShowHeart(bool show)
732744
targetAddress = IL2CPP::Class::Utils::GetMethodPointer(
733745
"Tecotec.QuestLive.Live.QuestLiveHeartObject",
734-
"PlayThrowAnimation",
735-
2
746+
"ShowHeart",
747+
1
736748
);
737749

738750
if (targetAddress) {
739751
MSHookFunction_p(
740752
targetAddress,
741-
(void*)&hooked_QuestLiveHeartObject_PlayThrowAnimation,
742-
(void**)&original_QuestLiveHeartObject_PlayThrowAnimation
753+
(void*)&hooked_QuestLiveHeartObject_ShowHeart,
754+
(void**)&original_QuestLiveHeartObject_ShowHeart
743755
);
744-
NSLog(@"[IL2CPP Tweak] QuestLiveHeartObject::PlayThrowAnimation hooked");
756+
NSLog(@"[IL2CPP Tweak] QuestLiveHeartObject::ShowHeart hooked");
745757
} else {
746-
NSLog(@"[IL2CPP Tweak] QuestLiveHeartObject::PlayThrowAnimation not found.");
758+
NSLog(@"[IL2CPP Tweak] QuestLiveHeartObject::ShowHeart not found.");
747759
}
748760
}
749761

@@ -920,7 +932,7 @@ BOOL hooked_didFinishLaunchingWithOptions(id self, SEL _cmd, UIApplication *appl
920932
NSLog(@"[IL2CPP Tweak] Successfully hooked CreateRenderTextureDescriptor!");
921933
}
922934
} else {
923-
// // void UnityEngine.Rendering.Universal.UniversalRenderPipeline.InitializeStackedCameraData(Camera* camera, UniversalAdditionalCameraData* additionalCameraData, CameraData* cameraData)
935+
// void UnityEngine.Rendering.Universal.UniversalRenderPipeline.InitializeStackedCameraData(Camera* camera, UniversalAdditionalCameraData* additionalCameraData, CameraData* cameraData)
924936
targetAddress = IL2CPP::Class::Utils::GetMethodPointer(
925937
"UnityEngine.Rendering.Universal.UniversalRenderPipeline",
926938
"InitializeStackedCameraData",
@@ -1349,7 +1361,7 @@ static void tweakConstructor() {
13491361
@true, @"Enable.FesCameraHook",
13501362
@true, @"Enable.FrameRateHook",
13511363
@true, @"Enable.AntiAliasingHook",
1352-
@true, @"Enable.QuestLive.NoParticlesHook",
1364+
@false, @"Enable.QuestLive.NoParticlesHook",
13531365
@true, @"Enable.QuestLive.NoThrowAndWaitHook",
13541366
@true, @"Enable.QuestLive.NoCutinCharacterHook",
13551367
@true, @"Enable.LiveStream.NoAfterLimitationHook",

0 commit comments

Comments
 (0)