mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
clip size vehicles cheat command
This commit is contained in:
41
Project Reboot 3.0/FortWeaponItemDefinition.cpp
Normal file
41
Project Reboot 3.0/FortWeaponItemDefinition.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "FortWeaponItemDefinition.h"
|
||||
|
||||
#include "DataTable.h"
|
||||
|
||||
int UFortWeaponItemDefinition::GetClipSize()
|
||||
{
|
||||
static auto WeaponStatHandleOffset = GetOffset("WeaponStatHandle");
|
||||
auto& WeaponStatHandle = Get<FDataTableRowHandle>(WeaponStatHandleOffset);
|
||||
|
||||
auto Table = WeaponStatHandle.DataTable;
|
||||
|
||||
if (!Table)
|
||||
return 0;
|
||||
|
||||
auto& RowMap = Table->GetRowMap();
|
||||
|
||||
void* Row = nullptr;
|
||||
|
||||
for (int i = 0; i < RowMap.Pairs.Elements.Data.Num(); i++)
|
||||
{
|
||||
auto& Pair = RowMap.Pairs.Elements.Data.at(i).ElementData.Value;
|
||||
|
||||
if (Pair.Key() == WeaponStatHandle.RowName)
|
||||
{
|
||||
Row = Pair.Value();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Row)
|
||||
return 0;
|
||||
|
||||
static auto ClipSizeOffset = FindOffsetStruct("/Script/FortniteGame.FortBaseWeaponStats", "ClipSize");
|
||||
return *(int*)(__int64(Row) + ClipSizeOffset);
|
||||
}
|
||||
|
||||
UClass* UFortWeaponItemDefinition::StaticClass()
|
||||
{
|
||||
static auto Class = FindObject<UClass>(L"/Script/FortniteGame.FortWeaponItemDefinition");
|
||||
return Class;
|
||||
}
|
||||
Reference in New Issue
Block a user