Ok this is boring im only doing sleepy

This commit is contained in:
YesseYesseY
2025-07-18 00:15:08 +02:00
parent 76a02275b8
commit 1d52d26224
5 changed files with 43 additions and 85 deletions

View File

@@ -157,7 +157,6 @@ 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.OnDamageServer", "Damage");
@@ -166,29 +165,5 @@ namespace Calendar
static UObject* SleepyM = FindObject("/Game/Athena/Maps/Test/S8/SleepyMap.SleepyMap:PersistentLevel.BP_Sleepy_M_2");
static UFunction* RootUpdateDamage = SleepyM->FindFunction("RootUpdateDamage");
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);
}
}