quite a good update

Fixed Devourer of Worlds Event, Fixed chapter 2+ editing bug, Fixed all other bugs with editing, Fixed S13+ lategame.
This commit is contained in:
Milxnor
2023-04-21 13:34:13 -04:00
parent 4ad4e9cf14
commit a16bb42c01
16 changed files with 213 additions and 35 deletions

View File

@@ -61,6 +61,12 @@ static void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int Override
static auto SafeZoneIndicatorOffset = GameModeAthena->GetOffset("SafeZoneIndicator");
auto SafeZoneIndicator = GameModeAthena->Get<AActor*>(SafeZoneIndicatorOffset);
if (!SafeZoneIndicator)
{
LOG_WARN(LogZone, "Invalid SafeZoneIndicator!");
return SetZoneToIndexOriginal(GameModeAthena, OverridePhaseMaybeIDFK);
}
static auto SafeZoneFinishShrinkTimeOffset = SafeZoneIndicator->GetOffset("SafeZoneFinishShrinkTime");
static auto SafeZoneStartShrinkTimeOffset = SafeZoneIndicator->GetOffset("SafeZoneStartShrinkTime");
static auto RadiusOffset = SafeZoneIndicator->GetOffset("Radius");
@@ -70,6 +76,12 @@ static void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int Override
static auto MapInfoOffset = GameState->GetOffset("MapInfo");
auto MapInfo = GameState->Get<AActor*>(MapInfoOffset);
if (!MapInfo)
{
LOG_WARN(LogZone, "Invalid MapInfo!")
return SetZoneToIndexOriginal(GameModeAthena, OverridePhaseMaybeIDFK);
}
static auto SafeZoneDefinitionOffset = MapInfo->GetOffset("SafeZoneDefinition");
auto SafeZoneDefinition = MapInfo->GetPtr<__int64>(SafeZoneDefinitionOffset);
@@ -159,7 +171,6 @@ static void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int Override
SafeZoneIndicator->Get<float>(SafeZoneFinishShrinkTimeOffset) = SafeZoneIndicator->Get<float>(SafeZoneStartShrinkTimeOffset) + ZoneDuration;
}
void ProcessEventHook(UObject* Object, UFunction* Function, void* Parameters)
{
if (!Object || !Function)