This commit is contained in:
Gray
2025-03-20 19:03:43 -04:00
parent c31cd611ce
commit 2260c9c9e0
3 changed files with 30 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ public:
if (!TeamLoadouts) if (!TeamLoadouts)
return FItemLoadoutTeamMap(); return FItemLoadoutTeamMap();
for (int i = 0; i < TeamLoadouts->Num(); i++) for (int i = 0; i < TeamLoadouts->Num(); ++i)
{ {
auto& TeamLoadout = TeamLoadouts->at(i); auto& TeamLoadout = TeamLoadouts->at(i);
@@ -106,7 +106,7 @@ public:
return Get<EAthenaInventorySpawnOverride>(InventoryUpdateOverrideOffset); return Get<EAthenaInventorySpawnOverride>(InventoryUpdateOverrideOffset);
} }
EAthenaLootDropOverride& GetDropAllItemsOverride(uint8_t TeamIndex = 255) EAthenaLootDropOverride GetDropAllItemsOverride(uint8_t TeamIndex = 255)
{ {
if (TeamIndex != 255) if (TeamIndex != 255)
{ {

View File

@@ -382,6 +382,32 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
} }
} }
/*
if (FortPlayerController)
{
if (auto Pawn = FortPlayerController->GetMyFortPawn())
{
static auto CurrentWeaponListOffset = Pawn->GetOffset("CurrentWeaponList");
if (CurrentWeaponListOffset != -1) // shouldnt be possible but better safe than sorry!
{
auto& CurrentWeaponList = Pawn->Get<TArray<AFortWeapon*>>(CurrentWeaponListOffset);
for (int i = 0; i < CurrentWeaponList.Num(); ++i)
{
auto Weapon = CurrentWeaponList.At(i);
if (Weapon->GetItemEntryGuid() == ItemGuid)
{
Weapon->K2_DestroyActor();
break;
}
}
}
}
}
*/
// todo remove from weaponlist // todo remove from weaponlist
if (bShouldUpdate) if (bShouldUpdate)

View File

@@ -86,6 +86,8 @@ static inline class UWorld* GetWorld()
static auto GameViewportOffset = Engine->GetOffset("GameViewport"); static auto GameViewportOffset = Engine->GetOffset("GameViewport");
auto GameViewport = Engine->Get<UObject*>(GameViewportOffset); auto GameViewport = Engine->Get<UObject*>(GameViewportOffset);
if (!GameViewport) return nullptr;
static auto WorldOffset = GameViewport->GetOffset("World"); static auto WorldOffset = GameViewport->GetOffset("World");
return GameViewport->Get<class UWorld*>(WorldOffset); return GameViewport->Get<class UWorld*>(WorldOffset);