fix 1.11 replication, fix some ltm specific stuff, start on shadow stones, fix some events not having foundations, fix s4-s6 gadgets, fix clear inventory on some versions
This commit is contained in:
Milxnor
2023-04-22 23:52:20 -04:00
parent 769dfa08ef
commit 5da8485485
57 changed files with 1869 additions and 888 deletions

View File

@@ -1,6 +1,7 @@
#include "FortPlayerPawn.h"
#include <memcury.h>
#include "FortPlayerController.h"
#include "FortGadgetItemDefinition.h"
void AFortPlayerPawn::ServerChoosePart(EFortCustomPartType Part, UObject* ChosenCharacterPart)
{
@@ -122,6 +123,36 @@ void AFortPlayerPawn::UnEquipVehicleWeaponDefinition(UFortWeaponItemDefinition*
AFortPlayerController::ServerExecuteInventoryItemHook(PlayerController, PickaxeInstance->GetItemEntry()->GetItemGuid()); // Bad, we should equip the last weapon.
}
void AFortPlayerPawn::StartGhostModeExitHook(UObject* Context, FFrame* Stack, void* Ret)
{
LOG_INFO(LogDev, __FUNCTION__);
auto Pawn = (AFortPlayerPawn*)Context;
auto Controller = Cast<AFortPlayerController>(Pawn->GetController());
if (!Controller)
return;
auto WorldInventory = Controller->GetWorldInventory();
auto SpookyMistItemDefinition = FindObject<UFortGadgetItemDefinition>("/Game/Athena/Items/Gameplay/SpookyMist/AGID_SpookyMist.AGID_SpookyMist");
auto SpookyMistInstance = WorldInventory->FindItemInstance(SpookyMistItemDefinition);
if (SpookyMistInstance)
{
bool bShouldUpdate = false;
WorldInventory->RemoveItem(SpookyMistInstance->GetItemEntry()->GetItemGuid(), &bShouldUpdate, 1, true);
if (bShouldUpdate)
WorldInventory->Update();
Controller->ApplyCosmeticLoadout();
}
return StartGhostModeExitOriginal(Context, Stack, Ret);
}
AActor* AFortPlayerPawn::ServerOnExitVehicleHook(AFortPlayerPawn* PlayerPawn, ETryExitVehicleBehavior ExitForceBehavior)
{
auto VehicleWeaponDefinition = PlayerPawn->GetVehicleWeaponDefinition(PlayerPawn->GetVehicle());