From 9b3e5540ecc12eafab6e25100b621d81696ca312 Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Sat, 19 Jul 2025 11:18:37 -0400 Subject: [PATCH] disabel traps s18+ --- Project Reboot 3.0/FortPlayerController.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Project Reboot 3.0/FortPlayerController.cpp b/Project Reboot 3.0/FortPlayerController.cpp index 84b6312..d580a99 100644 --- a/Project Reboot 3.0/FortPlayerController.cpp +++ b/Project Reboot 3.0/FortPlayerController.cpp @@ -346,15 +346,20 @@ void AFortPlayerController::ServerExecuteInventoryItemHook(AFortPlayerController if (auto DecoItemDefinition = Cast(ItemDefinition)) { - Pawn->PickUpActor(nullptr, DecoItemDefinition); // todo check ret value? // I checked on 1.7.2 and it only returns true if the new weapon is a FortDecoTool - Pawn->GetCurrentWeapon()->GetItemEntryGuid() = ItemGuid; - - static auto FortDecoTool_ContextTrapStaticClass = FindObject(L"/Script/FortniteGame.FortDecoTool_ContextTrap"); - - if (Pawn->GetCurrentWeapon()->IsA(FortDecoTool_ContextTrapStaticClass)) + if (Fortnite_Version < 18) // gg { - static auto ContextTrapItemDefinitionOffset = Pawn->GetCurrentWeapon()->GetOffset("ContextTrapItemDefinition"); - Pawn->GetCurrentWeapon()->Get(ContextTrapItemDefinitionOffset) = DecoItemDefinition; + if (Pawn->PickUpActor(nullptr, DecoItemDefinition)) + { + Pawn->GetCurrentWeapon()->GetItemEntryGuid() = ItemGuid; + + static auto FortDecoTool_ContextTrapStaticClass = FindObject(L"/Script/FortniteGame.FortDecoTool_ContextTrap"); + + if (Pawn->GetCurrentWeapon()->IsA(FortDecoTool_ContextTrapStaticClass)) + { + static auto ContextTrapItemDefinitionOffset = Pawn->GetCurrentWeapon()->GetOffset("ContextTrapItemDefinition"); + Pawn->GetCurrentWeapon()->Get(ContextTrapItemDefinitionOffset) = DecoItemDefinition; + } + } } return;