Sleepy debug + Scuffed leaky

This commit is contained in:
YesseYesseY
2025-07-17 13:15:25 +02:00
parent 8752228569
commit 76a02275b8
3 changed files with 77 additions and 17 deletions

View File

@@ -160,7 +160,7 @@ namespace Calendar
static void (*OnDamageServerSleepyOriginal)(UObject* SleepyProp, FFrame& Stack, void* Ret);
static void OnDamageServerSleepyHook(UObject* SleepyProp, FFrame& Stack, void* Ret)
{
static auto DamageOffset = FindOffsetStruct("/Game/Athena/Prototype/Blueprints/Sleepy/BP_Sleepy_M.BP_Sleepy_M_C.RootUpdateDamage", "Damage");
static auto DamageOffset = FindOffsetStruct("/Game/Athena/Prototype/Blueprints/Sleepy/BP_Sleepy_M.BP_Sleepy_M_C.OnDamageServer", "Damage");
int Damage = (int)(*(float*)(__int64(Stack.Locals) + DamageOffset));
static UObject* SleepyM = FindObject("/Game/Athena/Maps/Test/S8/SleepyMap.SleepyMap:PersistentLevel.BP_Sleepy_M_2");
@@ -168,4 +168,27 @@ namespace Calendar
SleepyM->ProcessEvent(RootUpdateDamage, &Damage);
OnDamageServerSleepyOriginal(SleepyProp, Stack, Ret);
}
static void (*OnDamageServerLeakyOriginal)(UObject* SleepyProp, FFrame& Stack, void* Ret);
static void OnDamageServerLeakyHook(UObject* LeakyProp, FFrame& Stack, void* Ret)
{
static auto DamageOffset = FindOffsetStruct("/Game/Athena/Prototype/Blueprints/Leaky/BP_LeakyProp.BP_LeakyProp_C.OnDamageServer", "Damage");
int Damage = (int)(*(float*)(__int64(Stack.Locals) + DamageOffset));
static UObject* LeakyHandler = FindObject("/Game/Athena/Maps/Test/S8/LeakyMap.LeakyMap:PersistentLevel.BP_LeakyHandler_2");
static UFunction* RootUpdateRotationValue = LeakyHandler->FindFunction("RootUpdateRotationValue");
struct
{
int32 Damage;
int8 PropIndex;
} Params;
static auto ColorOfBeaconOffset = LeakyProp->GetOffset("Color of Beacon");
Params.Damage = Damage;
Params.PropIndex = LeakyProp->Get<int>(ColorOfBeaconOffset);
LeakyHandler->ProcessEvent(RootUpdateRotationValue, &Params);
OnDamageServerLeakyOriginal(LeakyProp, Stack, Ret);
}
}