mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 19:02:21 +01:00
fix old map size
This commit is contained in:
@@ -54,8 +54,10 @@ void InternalServerTryActivateAbility(UAbilitySystemComponent* AbilitySystemComp
|
||||
return;
|
||||
}
|
||||
|
||||
static auto InputPressedOffset = FindOffsetStruct("/Script/GameplayAbilities.GameplayAbilitySpec", "InputPressed");
|
||||
|
||||
UGameplayAbility* InstancedAbility = nullptr;
|
||||
SetBitfield(Spec, 1, true); // InputPressed = true
|
||||
SetBitfield((PlaceholderBitfield*)(__int64(Spec) + InputPressedOffset), 1, true); // InputPressed = true
|
||||
|
||||
bool res = false;
|
||||
|
||||
@@ -71,16 +73,16 @@ void InternalServerTryActivateAbility(UAbilitySystemComponent* AbilitySystemComp
|
||||
LOG_INFO(LogAbilities, "InternalServerTryActivateAbility. Rejecting ClientActivation of {}. InternalTryActivateAbility failed: ", AbilityToActivate->GetName());
|
||||
|
||||
AbilitySystemComponent->ClientActivateAbilityFailed(Handle, *(int16_t*)(__int64(PredictionKey) + CurrentOffset));
|
||||
SetBitfield(Spec, 1, false); // InputPressed = false
|
||||
SetBitfield((PlaceholderBitfield*)(__int64(Spec) + InputPressedOffset), 1, false); // InputPressed = false
|
||||
|
||||
static auto ActivatableAbilitiesOffset = AbilitySystemComponent->GetOffset("ActivatableAbilities");
|
||||
AbilitySystemComponent->Get<FFastArraySerializer>(ActivatableAbilitiesOffset).MarkItemDirty(Spec);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_INFO(LogAbilities, "InternalServerTryActivateAbility. Activated {}", AbilityToActivate->GetName());
|
||||
// LOG_INFO(LogAbilities, "InternalServerTryActivateAbility. Activated {}", AbilityToActivate->GetName());
|
||||
}
|
||||
|
||||
static auto ActivatableAbilitiesOffset = AbilitySystemComponent->GetOffset("ActivatableAbilities");
|
||||
AbilitySystemComponent->Get<FFastArraySerializer>(ActivatableAbilitiesOffset).MarkItemDirty(Spec); // we only need to do this if the ability fails but eh
|
||||
|
||||
// bro ignore this next part idk where to put it ok
|
||||
|
||||
/* static auto OwnerActorOffset = AbilitySystemComponent->GetOffset("OwnerActor");
|
||||
|
||||
@@ -78,6 +78,9 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
{
|
||||
std::vector<LootDrop> LootDrops;
|
||||
|
||||
if (recursive > 10)
|
||||
return LootDrops;
|
||||
|
||||
static std::vector<UDataTable*> LTDTables;
|
||||
static std::vector<UDataTable*> LPTables;
|
||||
|
||||
@@ -209,8 +212,8 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
}
|
||||
}
|
||||
|
||||
if (SumLootPackageCategoryWeightArray > SumLootPackageCategoryMinArray)
|
||||
return PickLootDrops(TierGroupName, bPrint, ++recursive); // hm
|
||||
// if (SumLootPackageCategoryWeightArray > SumLootPackageCategoryMinArray)
|
||||
// return PickLootDrops(TierGroupName, bPrint, ++recursive); // hm
|
||||
|
||||
std::vector<FFortLootPackageData*> TierGroupLPs;
|
||||
|
||||
|
||||
@@ -37,6 +37,23 @@ void AFortPlayerController::ServerExecuteInventoryItemHook(AFortPlayerController
|
||||
|
||||
auto ItemDefinition = ItemInstance->GetItemEntry()->GetItemDefinition();
|
||||
|
||||
static auto FortGadgetItemDefinitionClass = FindObject<UClass>("/Script/FortniteGame.FortGadgetItemDefinition");
|
||||
|
||||
if (ItemDefinition->IsA(FortGadgetItemDefinitionClass))
|
||||
{
|
||||
static auto GetWeaponItemDefinition = FindObject<UFunction>("/Script/FortniteGame.FortGadgetItemDefinition.GetWeaponItemDefinition");
|
||||
|
||||
if (GetWeaponItemDefinition)
|
||||
{
|
||||
ItemDefinition->ProcessEvent(GetWeaponItemDefinition, &ItemDefinition);
|
||||
}
|
||||
else
|
||||
{
|
||||
static auto GetDecoItemDefinition = FindObject<UFunction>("/Script/FortniteGame.FortGadgetItemDefinition.GetDecoItemDefinition");
|
||||
ItemDefinition->ProcessEvent(GetDecoItemDefinition, &ItemDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
if (auto DecoItemDefinition = Cast<UFortDecoItemDefinition>(ItemDefinition))
|
||||
{
|
||||
Pawn->PickUpActor(nullptr, DecoItemDefinition); // todo check ret value?
|
||||
|
||||
@@ -292,7 +292,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::CompletePickupAnimation, (PVOID)AFortPickup::CompletePickupAnimationHook, (PVOID*)&AFortPickup::CompletePickupAnimationOriginal);
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::CanActivateAbility, ReturnTrueHook); // ahhh wtf
|
||||
// Hooking::MinHook::Hook((PVOID)FindFunctionCall(L"ServerRemoveInventoryItem"), UFortInventoryInterface::RemoveInventoryItemHook);
|
||||
|
||||
|
||||
AddVehicleHook();
|
||||
|
||||
LOG_INFO(LogDev, "Test: 0x{:x}", FindFunctionCall(L"ClientOnPawnDied") - __int64(GetModuleHandleW(0)));
|
||||
@@ -323,8 +323,6 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
LOG_INFO(LogHook, "GetMaxTickRateIndex {}", GetMaxTickRateIndex); */
|
||||
|
||||
|
||||
|
||||
srand(time(0));
|
||||
|
||||
LOG_INFO(LogHook, "Finished!");
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Globals
|
||||
{
|
||||
extern inline bool bCreative = false;
|
||||
extern inline bool bGoingToPlayEvent = false;
|
||||
extern inline bool bNoMCP = false;
|
||||
extern inline bool bNoMCP = true;
|
||||
extern inline bool bLateGame = false;
|
||||
extern inline bool bAbilitiesEnabled = true;
|
||||
}
|
||||
@@ -43,8 +43,6 @@ inline void InitLogger()
|
||||
|
||||
FILE* stream = nullptr;
|
||||
|
||||
// bad but idk how to stop printing
|
||||
|
||||
freopen_s(&stream, "in.txt", "r", stdin);
|
||||
freopen_s(&stream, "out.txt", "w+", stdout);
|
||||
freopen_s(&stream, "err.txt", "w", stderr);
|
||||
|
||||
Reference in New Issue
Block a user