mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
supply drops
fixed supply drops, llamas, and fishing, loot will now combine before spawning
This commit is contained in:
@@ -40,13 +40,13 @@ FTransform AActor::GetTransform()
|
|||||||
|
|
||||||
void AActor::SetNetDormancy(ENetDormancy Dormancy)
|
void AActor::SetNetDormancy(ENetDormancy Dormancy)
|
||||||
{
|
{
|
||||||
static auto SetNetDormancyFn = FindObject<UFunction>("/Script/Engine.Actor.SetNetDormancy");
|
static auto SetNetDormancyFn = FindObject<UFunction>(L"/Script/Engine.Actor.SetNetDormancy");
|
||||||
this->ProcessEvent(SetNetDormancyFn, &Dormancy);
|
this->ProcessEvent(SetNetDormancyFn, &Dormancy);
|
||||||
}
|
}
|
||||||
|
|
||||||
AActor* AActor::GetOwner()
|
AActor* AActor::GetOwner()
|
||||||
{
|
{
|
||||||
static auto GetOwnerFunction = FindObject<UFunction>("/Script/Engine.Actor.GetOwner");
|
static auto GetOwnerFunction = FindObject<UFunction>(L"/Script/Engine.Actor.GetOwner");
|
||||||
|
|
||||||
AActor* Owner = nullptr;
|
AActor* Owner = nullptr;
|
||||||
this->ProcessEvent(GetOwnerFunction, &Owner);
|
this->ProcessEvent(GetOwnerFunction, &Owner);
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ FFortLootTierData* PickLootTierData(const std::vector<UDataTable*>& LTDTables, F
|
|||||||
return ChosenRowLootTierData;
|
return ChosenRowLootTierData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, const FName& LootPackageName, std::vector<LootDrop>* OutEntries, int LootPackageCategory = -1, int WorldLevel = 0, bool bPrint = false)
|
void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, const FName& LootPackageName, std::vector<LootDrop>* OutEntries, int LootPackageCategory = -1, int WorldLevel = 0, bool bPrint = false, bool bCombineDrops = true)
|
||||||
{
|
{
|
||||||
if (!OutEntries)
|
if (!OutEntries)
|
||||||
return;
|
return;
|
||||||
@@ -305,7 +305,29 @@ void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, cons
|
|||||||
|
|
||||||
auto ActualItemLevel = WorldItemDefinition->PickLevel(FinalItemLevel);
|
auto ActualItemLevel = WorldItemDefinition->PickLevel(FinalItemLevel);
|
||||||
|
|
||||||
OutEntries->push_back(LootDrop(FFortItemEntry::MakeItemEntry(ItemDefinition, CurrentCountForEntry, LoadedAmmo, 0x3F800000, ActualItemLevel)));
|
bool bHasCombined = false;
|
||||||
|
|
||||||
|
if (bCombineDrops)
|
||||||
|
{
|
||||||
|
for (auto& CurrentLootDrop : *OutEntries)
|
||||||
|
{
|
||||||
|
if (CurrentLootDrop->GetItemDefinition() == ItemDefinition)
|
||||||
|
{
|
||||||
|
int NewCount = CurrentLootDrop->GetCount() + CurrentCountForEntry;
|
||||||
|
|
||||||
|
if (NewCount <= ItemDefinition->GetMaxStackSize())
|
||||||
|
{
|
||||||
|
bHasCombined = true;
|
||||||
|
CurrentLootDrop->GetCount() = NewCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bHasCombined)
|
||||||
|
{
|
||||||
|
OutEntries->push_back(LootDrop(FFortItemEntry::MakeItemEntry(ItemDefinition, CurrentCountForEntry, LoadedAmmo, MAX_DURABILITY, ActualItemLevel)));
|
||||||
|
}
|
||||||
|
|
||||||
if (Engine_Version >= 424)
|
if (Engine_Version >= 424)
|
||||||
{
|
{
|
||||||
@@ -346,7 +368,7 @@ void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, cons
|
|||||||
|
|
||||||
// #define brudda
|
// #define brudda
|
||||||
|
|
||||||
std::vector<LootDrop> PickLootDrops(FName TierGroupName, int WorldLevel, int ForcedLootTier, bool bPrint, int recursive)
|
std::vector<LootDrop> PickLootDrops(FName TierGroupName, int WorldLevel, int ForcedLootTier, bool bPrint, int recursive, bool bCombineDrops)
|
||||||
{
|
{
|
||||||
std::vector<LootDrop> LootDrops;
|
std::vector<LootDrop> LootDrops;
|
||||||
|
|
||||||
|
|||||||
@@ -255,4 +255,4 @@ FORCEINLINE static ValueType PickWeightedElement(const std::unordered_map<KeyTyp
|
|||||||
return ValueType();
|
return ValueType();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<LootDrop> PickLootDrops(FName TierGroupName, int WorldLevel, int ForcedLootTier = -1, bool bPrint = false, int recursive = 0);
|
std::vector<LootDrop> PickLootDrops(FName TierGroupName, int WorldLevel, int ForcedLootTier = -1, bool bPrint = false, int recursive = 0, bool bCombineDrops = true);
|
||||||
@@ -703,59 +703,6 @@ void AFortPlayerController::ServerAttemptAircraftJumpHook(AFortPlayerController*
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PlayerController->ServerRestartPlayer();
|
// PlayerController->ServerRestartPlayer();
|
||||||
|
|
||||||
if (Globals::bLateGame)
|
|
||||||
{
|
|
||||||
static int LastNum1 = 124;
|
|
||||||
|
|
||||||
if (LastNum1 != AmountOfRestarts)
|
|
||||||
{
|
|
||||||
auto SafeZoneIndicator = GameMode->GetSafeZoneIndicator();
|
|
||||||
|
|
||||||
if (SafeZoneIndicator)
|
|
||||||
{
|
|
||||||
LastNum1 = AmountOfRestarts;
|
|
||||||
|
|
||||||
SafeZoneIndicator->SkipShrinkSafeZone();
|
|
||||||
SafeZoneIndicator->SkipShrinkSafeZone();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static auto WoodItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/WoodItemData.WoodItemData");
|
|
||||||
static auto StoneItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/StoneItemData.StoneItemData");
|
|
||||||
static auto MetalItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/MetalItemData.MetalItemData");
|
|
||||||
|
|
||||||
static auto Rifle = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Assault_AutoHigh_Athena_SR_Ore_T03.WID_Assault_AutoHigh_Athena_SR_Ore_T03");
|
|
||||||
static auto Shotgun = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Shotgun_Standard_Athena_SR_Ore_T03.WID_Shotgun_Standard_Athena_SR_Ore_T03");
|
|
||||||
static auto SMG = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Pistol_AutoHeavyPDW_Athena_R_Ore_T03.WID_Pistol_AutoHeavyPDW_Athena_R_Ore_T03");
|
|
||||||
|
|
||||||
static auto MiniShields = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Consumables/ShieldSmall/Athena_ShieldSmall.Athena_ShieldSmall");
|
|
||||||
|
|
||||||
static auto Shells = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataShells.AthenaAmmoDataShells");
|
|
||||||
static auto Medium = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataBulletsMedium.AthenaAmmoDataBulletsMedium");
|
|
||||||
static auto Light = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataBulletsLight.AthenaAmmoDataBulletsLight");
|
|
||||||
static auto Heavy = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataBulletsHeavy.AthenaAmmoDataBulletsHeavy");
|
|
||||||
|
|
||||||
auto WorldInventory = PlayerController->GetWorldInventory();
|
|
||||||
|
|
||||||
if (!WorldInventory)
|
|
||||||
return ServerAttemptAircraftJumpOriginal(PC, ClientRotation);
|
|
||||||
|
|
||||||
WorldInventory->AddItem(WoodItemData, nullptr, 500);
|
|
||||||
WorldInventory->AddItem(StoneItemData, nullptr, 500);
|
|
||||||
WorldInventory->AddItem(MetalItemData, nullptr, 500);
|
|
||||||
WorldInventory->AddItem(Rifle, nullptr, 1);
|
|
||||||
WorldInventory->AddItem(Shotgun, nullptr, 1);
|
|
||||||
WorldInventory->AddItem(SMG, nullptr, 1);
|
|
||||||
WorldInventory->AddItem(MiniShields, nullptr, 6);
|
|
||||||
WorldInventory->AddItem(Shells, nullptr, 999);
|
|
||||||
WorldInventory->AddItem(Medium, nullptr, 999);
|
|
||||||
WorldInventory->AddItem(Light, nullptr, 999);
|
|
||||||
WorldInventory->AddItem(Heavy, nullptr, 999);
|
|
||||||
|
|
||||||
WorldInventory->Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
// return ServerAttemptAircraftJumpOriginal(PC, ClientRotation);
|
// return ServerAttemptAircraftJumpOriginal(PC, ClientRotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,6 +225,43 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
|||||||
|
|
||||||
WorldInventory->Update();
|
WorldInventory->Update();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (GameState->GetGamePhase() == EAthenaGamePhase::Aircraft)
|
||||||
|
{
|
||||||
|
if (Globals::bLateGame)
|
||||||
|
{
|
||||||
|
static auto WoodItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/WoodItemData.WoodItemData");
|
||||||
|
static auto StoneItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/StoneItemData.StoneItemData");
|
||||||
|
static auto MetalItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/MetalItemData.MetalItemData");
|
||||||
|
|
||||||
|
static auto Rifle = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Assault_AutoHigh_Athena_SR_Ore_T03.WID_Assault_AutoHigh_Athena_SR_Ore_T03");
|
||||||
|
static auto Shotgun = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Shotgun_Standard_Athena_SR_Ore_T03.WID_Shotgun_Standard_Athena_SR_Ore_T03");
|
||||||
|
static auto SMG = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Pistol_AutoHeavyPDW_Athena_R_Ore_T03.WID_Pistol_AutoHeavyPDW_Athena_R_Ore_T03");
|
||||||
|
|
||||||
|
static auto MiniShields = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Consumables/ShieldSmall/Athena_ShieldSmall.Athena_ShieldSmall");
|
||||||
|
|
||||||
|
static auto Shells = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataShells.AthenaAmmoDataShells");
|
||||||
|
static auto Medium = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataBulletsMedium.AthenaAmmoDataBulletsMedium");
|
||||||
|
static auto Light = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataBulletsLight.AthenaAmmoDataBulletsLight");
|
||||||
|
static auto Heavy = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Ammo/AthenaAmmoDataBulletsHeavy.AthenaAmmoDataBulletsHeavy");
|
||||||
|
|
||||||
|
WorldInventory->AddItem(WoodItemData, nullptr, 500);
|
||||||
|
WorldInventory->AddItem(StoneItemData, nullptr, 500);
|
||||||
|
WorldInventory->AddItem(MetalItemData, nullptr, 500);
|
||||||
|
WorldInventory->AddItem(Rifle, nullptr, 1);
|
||||||
|
WorldInventory->AddItem(Shotgun, nullptr, 1);
|
||||||
|
WorldInventory->AddItem(SMG, nullptr, 1);
|
||||||
|
WorldInventory->AddItem(MiniShields, nullptr, 6);
|
||||||
|
WorldInventory->AddItem(Shells, nullptr, 999);
|
||||||
|
WorldInventory->AddItem(Medium, nullptr, 999);
|
||||||
|
WorldInventory->AddItem(Light, nullptr, 999);
|
||||||
|
WorldInventory->AddItem(Heavy, nullptr, 999);
|
||||||
|
|
||||||
|
WorldInventory->Update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -819,7 +819,6 @@
|
|||||||
<ClInclude Include="FortAthenaVehicleSpawner.h">
|
<ClInclude Include="FortAthenaVehicleSpawner.h">
|
||||||
<Filter>FortniteGame\Source\FortniteGame\Public\Athena\Vehicle</Filter>
|
<Filter>FortniteGame\Source\FortniteGame\Public\Athena\Vehicle</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="discord.h" />
|
|
||||||
<ClInclude Include="FortAthenaSupplyDrop.h">
|
<ClInclude Include="FortAthenaSupplyDrop.h">
|
||||||
<Filter>FortniteGame\Source\FortniteGame\Public\Building</Filter>
|
<Filter>FortniteGame\Source\FortniteGame\Public\Building</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -934,6 +933,9 @@
|
|||||||
<ClInclude Include="BuildingItemWeaponUpgradeActor.h">
|
<ClInclude Include="BuildingItemWeaponUpgradeActor.h">
|
||||||
<Filter>FortniteGame\Source\FortniteGame\Public\Building\GameplayActors</Filter>
|
<Filter>FortniteGame\Source\FortniteGame\Public\Building\GameplayActors</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="discord.h">
|
||||||
|
<Filter>Reboot\Public</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Engine">
|
<Filter Include="Engine">
|
||||||
|
|||||||
@@ -73,41 +73,43 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
static auto ClientConnectionsOffset = WorldNetDriver->GetOffset("ClientConnections");
|
static auto ClientConnectionsOffset = WorldNetDriver->GetOffset("ClientConnections");
|
||||||
auto& ClientConnections = WorldNetDriver->Get<TArray<UObject*>>(ClientConnectionsOffset);
|
auto& ClientConnections = WorldNetDriver->Get<TArray<UObject*>>(ClientConnectionsOffset);
|
||||||
|
|
||||||
/* if (firstBackslash == lastBackslash)
|
if (firstBackslash != std::string::npos && lastBackslash != std::string::npos)
|
||||||
{
|
{
|
||||||
SendMessageToConsole(PlayerController, L"Warning: You have a backslash but no ending backslash, was this by mistake? Executing on you.");
|
if (firstBackslash != lastBackslash)
|
||||||
} */
|
|
||||||
|
|
||||||
if (firstBackslash != lastBackslash && firstBackslash != std::string::npos && lastBackslash != std::string::npos) // we want to specify a player
|
|
||||||
{
|
|
||||||
std::string player = OldMsg;
|
|
||||||
|
|
||||||
player = player.substr(firstBackslash + 1, lastBackslash - firstBackslash - 1);
|
|
||||||
|
|
||||||
for (int i = 0; i < ClientConnections.Num(); i++)
|
|
||||||
{
|
{
|
||||||
static auto PlayerControllerOffset = ClientConnections.at(i)->GetOffset("PlayerController");
|
std::string player = OldMsg;
|
||||||
auto CurrentPlayerController = Cast<AFortPlayerControllerAthena>(ClientConnections.at(i)->Get(PlayerControllerOffset));
|
|
||||||
|
|
||||||
if (!CurrentPlayerController)
|
player = player.substr(firstBackslash + 1, lastBackslash - firstBackslash - 1);
|
||||||
continue;
|
|
||||||
|
|
||||||
auto CurrentPlayerState = Cast<AFortPlayerStateAthena>(CurrentPlayerController->GetPlayerState());
|
for (int i = 0; i < ClientConnections.Num(); i++)
|
||||||
|
|
||||||
if (!CurrentPlayerState)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
auto PlayerName = CurrentPlayerState->GetPlayerName();
|
|
||||||
|
|
||||||
if (PlayerName.ToString() == player) // hopefully we arent on adifferent thread
|
|
||||||
{
|
{
|
||||||
ReceivingController = CurrentPlayerController;
|
static auto PlayerControllerOffset = ClientConnections.at(i)->GetOffset("PlayerController");
|
||||||
ReceivingPlayerState = CurrentPlayerState;
|
auto CurrentPlayerController = Cast<AFortPlayerControllerAthena>(ClientConnections.at(i)->Get(PlayerControllerOffset));
|
||||||
PlayerName.Free();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
PlayerName.Free();
|
if (!CurrentPlayerController)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
auto CurrentPlayerState = Cast<AFortPlayerStateAthena>(CurrentPlayerController->GetPlayerState());
|
||||||
|
|
||||||
|
if (!CurrentPlayerState)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
auto PlayerName = CurrentPlayerState->GetPlayerName();
|
||||||
|
|
||||||
|
if (PlayerName.ToString() == player) // hopefully we arent on adifferent thread
|
||||||
|
{
|
||||||
|
ReceivingController = CurrentPlayerController;
|
||||||
|
ReceivingPlayerState = CurrentPlayerState;
|
||||||
|
PlayerName.Free();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerName.Free();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// SendMessageToConsole(PlayerController, L"Warning: You have a backslash but no ending backslash, was this by mistake? Executing on you.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,7 +626,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
Count = Max;
|
Count = Max;
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto BGAClass = FindObject<UClass>("/Script/Engine.BlueprintGeneratedClass");
|
static auto BGAClass = FindObject<UClass>(L"/Script/Engine.BlueprintGeneratedClass");
|
||||||
auto ClassObj = LoadObject<UClass>(ClassName, BGAClass);
|
auto ClassObj = LoadObject<UClass>(ClassName, BGAClass);
|
||||||
|
|
||||||
if (ClassObj)
|
if (ClassObj)
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ static void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int Override
|
|||||||
|
|
||||||
LOG_INFO(LogDev, "SetZoneToIndexHook!");
|
LOG_INFO(LogDev, "SetZoneToIndexHook!");
|
||||||
|
|
||||||
bool bIsFirstZone = false;
|
|
||||||
|
|
||||||
auto GameState = Cast<AFortGameStateAthena>(GameModeAthena->GetGameState());
|
auto GameState = Cast<AFortGameStateAthena>(GameModeAthena->GetGameState());
|
||||||
|
|
||||||
LOG_INFO(LogDev, "GamePhaseStep: {}", (int)GameState->GetGamePhaseStep());
|
LOG_INFO(LogDev, "GamePhaseStep: {}", (int)GameState->GetGamePhaseStep());
|
||||||
@@ -30,31 +28,26 @@ static void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int Override
|
|||||||
static auto GameMode_SafeZonePhaseOffset = GameModeAthena->GetOffset("SafeZonePhase");
|
static auto GameMode_SafeZonePhaseOffset = GameModeAthena->GetOffset("SafeZonePhase");
|
||||||
static auto GameState_SafeZonePhaseOffset = GameState->GetOffset("SafeZonePhase");
|
static auto GameState_SafeZonePhaseOffset = GameState->GetOffset("SafeZonePhase");
|
||||||
|
|
||||||
int NewSafeZonePhase = GameModeAthena->Get<int>(GameMode_SafeZonePhaseOffset);
|
static int ahaaSafeZonePhase = 4;
|
||||||
|
int NewSafeZonePhase = ahaaSafeZonePhase; // GameModeAthena->Get<int>(GameMode_SafeZonePhaseOffset);
|
||||||
|
|
||||||
|
const int OriginalOldSafeZonePhase = GameModeAthena->Get<int>(GameMode_SafeZonePhaseOffset);
|
||||||
|
|
||||||
if (NewSafeZonePhase < 4)
|
if (NewSafeZonePhase < 4)
|
||||||
{
|
{
|
||||||
NewSafeZonePhase = 4;
|
NewSafeZonePhase = 4;
|
||||||
bIsFirstZone = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO(LogDev, "Setting zone to: {}", NewSafeZonePhase);
|
LOG_INFO(LogDev, "Setting zone to: {} ({})", NewSafeZonePhase, OriginalOldSafeZonePhase);
|
||||||
|
|
||||||
GameModeAthena->Get<int>(GameMode_SafeZonePhaseOffset) = NewSafeZonePhase;
|
GameModeAthena->Get<int>(GameMode_SafeZonePhaseOffset) = NewSafeZonePhase;
|
||||||
GameState->Get<int>(GameState_SafeZonePhaseOffset) = NewSafeZonePhase;
|
GameState->Get<int>(GameState_SafeZonePhaseOffset) = NewSafeZonePhase;
|
||||||
|
ahaaSafeZonePhase++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Fortnite_Version < 13)
|
if (Fortnite_Version < 13)
|
||||||
{
|
{
|
||||||
SetZoneToIndexOriginal(GameModeAthena, OverridePhaseMaybeIDFK);
|
SetZoneToIndexOriginal(GameModeAthena, OverridePhaseMaybeIDFK);
|
||||||
|
|
||||||
if (Globals::bLateGame && bIsFirstZone)
|
|
||||||
{
|
|
||||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"skipshrinksafezone", nullptr);
|
|
||||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startshrinksafezone", nullptr);
|
|
||||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"skipshrinksafezone", nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -818,7 +818,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.K2_SpawnPickupInWorldWithClass"),
|
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.K2_SpawnPickupInWorldWithClass"),
|
||||||
UFortKismetLibrary::K2_SpawnPickupInWorldWithClassHook, (PVOID*)&UFortKismetLibrary::K2_SpawnPickupInWorldWithClassOriginal, false, true);
|
UFortKismetLibrary::K2_SpawnPickupInWorldWithClassHook, (PVOID*)&UFortKismetLibrary::K2_SpawnPickupInWorldWithClassOriginal, false, true);
|
||||||
|
|
||||||
if (Addresses::FreeArrayOfEntries || Addresses::FreeEntry)
|
// if (Addresses::FreeArrayOfEntries || Addresses::FreeEntry)
|
||||||
{
|
{
|
||||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.PickLootDrops"),
|
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.PickLootDrops"),
|
||||||
UFortKismetLibrary::PickLootDropsHook, (PVOID*)&UFortKismetLibrary::PickLootDropsOriginal, false, true);
|
UFortKismetLibrary::PickLootDropsHook, (PVOID*)&UFortKismetLibrary::PickLootDropsOriginal, false, true);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#define GAMEMODE_TAB 3
|
#define GAMEMODE_TAB 3
|
||||||
#define THANOS_TAB 4
|
#define THANOS_TAB 4
|
||||||
#define EVENT_TAB 5
|
#define EVENT_TAB 5
|
||||||
#define LATEGAME_TAB 6
|
#define ZONE_TAB 6
|
||||||
#define DUMP_TAB 7
|
#define DUMP_TAB 7
|
||||||
#define UNBAN_TAB 8
|
#define UNBAN_TAB 8
|
||||||
#define DEVELOPER_TAB 9
|
#define DEVELOPER_TAB 9
|
||||||
@@ -347,9 +347,9 @@ static inline void MainTabs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false && Globals::bLateGame && ImGui::BeginTabItem(("Lategame")))
|
if (ImGui::BeginTabItem(("Zone")))
|
||||||
{
|
{
|
||||||
Tab = LATEGAME_TAB;
|
Tab = ZONE_TAB;
|
||||||
PlayerTab = -1;
|
PlayerTab = -1;
|
||||||
bInformationTab = false;
|
bInformationTab = false;
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
@@ -576,13 +576,13 @@ static inline void MainUI()
|
|||||||
|
|
||||||
if (!bStartedBus)
|
if (!bStartedBus)
|
||||||
{
|
{
|
||||||
if (Globals::bLateGame.load())
|
if (Globals::bLateGame.load() || Fortnite_Version >= 11)
|
||||||
{
|
{
|
||||||
if (ImGui::Button("Start Bus"))
|
if (ImGui::Button("Start Bus"))
|
||||||
{
|
{
|
||||||
bStartedBus = true;
|
bStartedBus = true;
|
||||||
|
|
||||||
auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode();
|
auto GameMode = (AFortGameModeAthena*)GetWorld()->GetGameMode();
|
||||||
auto GameState = GameMode->GetGameState();
|
auto GameState = GameMode->GetGameState();
|
||||||
|
|
||||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startaircraft", nullptr);
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startaircraft", nullptr);
|
||||||
@@ -688,6 +688,24 @@ static inline void MainUI()
|
|||||||
static auto bAircraftIsLockedOffset = GameState->GetOffset("bAircraftIsLocked");
|
static auto bAircraftIsLockedOffset = GameState->GetOffset("bAircraftIsLocked");
|
||||||
static auto bAircraftIsLockedFieldMask = GetFieldMask(GameState->GetProperty("bAircraftIsLocked"));
|
static auto bAircraftIsLockedFieldMask = GetFieldMask(GameState->GetProperty("bAircraftIsLocked"));
|
||||||
GameState->SetBitfieldValue(bAircraftIsLockedOffset, bAircraftIsLockedFieldMask, false);
|
GameState->SetBitfieldValue(bAircraftIsLockedOffset, bAircraftIsLockedFieldMask, false);
|
||||||
|
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startaircraft", nullptr);
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"skipaircraft", nullptr);
|
||||||
|
|
||||||
|
auto SafeZoneIndicator = GameMode->GetSafeZoneIndicator();
|
||||||
|
|
||||||
|
if (SafeZoneIndicator)
|
||||||
|
{
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startshrinksafezone", nullptr);
|
||||||
|
SafeZoneIndicator->SkipShrinkSafeZone();
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startshrinksafezone", nullptr);
|
||||||
|
SafeZoneIndicator->SkipShrinkSafeZone();
|
||||||
|
|
||||||
|
// Sleep(1000);
|
||||||
|
// SafeZoneIndicator->SkipShrinkSafeZone();
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO(LogDev, "Finished!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -785,6 +803,40 @@ static inline void MainUI()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (Tab == ZONE_TAB)
|
||||||
|
{
|
||||||
|
if (ImGui::Button("Start Safe Zone"))
|
||||||
|
{
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startsafezone", nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button("Pause Safe Zone"))
|
||||||
|
{
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"pausesafezone", nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button("Skip Zone"))
|
||||||
|
{
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"skipsafezone", nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button("Start Shrink Safe Zone"))
|
||||||
|
{
|
||||||
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startshrinksafezone", nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button("Skip Shrink Safe Zone"))
|
||||||
|
{
|
||||||
|
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||||
|
auto SafeZoneIndicator = GameMode->GetSafeZoneIndicator();
|
||||||
|
|
||||||
|
if (SafeZoneIndicator)
|
||||||
|
{
|
||||||
|
SafeZoneIndicator->SkipShrinkSafeZone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
else if (Tab == DUMP_TAB)
|
else if (Tab == DUMP_TAB)
|
||||||
{
|
{
|
||||||
ImGui::Text("These will all be in your Win64 folder!");
|
ImGui::Text("These will all be in your Win64 folder!");
|
||||||
|
|||||||
Reference in New Issue
Block a user