mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "FortItemDefinition.h"
|
||||
#include "DataTable.h"
|
||||
|
||||
enum class EWorldItemDropBehavior : uint8_t
|
||||
{
|
||||
@@ -11,16 +10,6 @@ enum class EWorldItemDropBehavior : uint8_t
|
||||
EWorldItemDropBehavior_MAX = 3
|
||||
};
|
||||
|
||||
struct FFortLootLevelData : public FTableRowBase
|
||||
{
|
||||
public:
|
||||
FName Category; // 0x8(0x8)(Edit, BlueprintVisible, BlueprintReadOnly, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
int32 LootLevel; // 0x10(0x4)(Edit, BlueprintVisible, BlueprintReadOnly, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
int32 MinItemLevel; // 0x14(0x4)(Edit, BlueprintVisible, BlueprintReadOnly, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
int32 MaxItemLevel; // 0x18(0x4)(Edit, BlueprintVisible, BlueprintReadOnly, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
uint8 Pad_B94[0x4]; // Fixing Size Of Struct [ Dumper-7 ]
|
||||
};
|
||||
|
||||
class UFortWorldItemDefinition : public UFortItemDefinition
|
||||
{
|
||||
public:
|
||||
@@ -31,35 +20,6 @@ public:
|
||||
return ReadBitfieldValue(bCanBeDroppedOffset, bCanBeDroppedFieldMask);
|
||||
}
|
||||
|
||||
int PickLevel(int PreferredLevel) // well min level and maxlevel is sometimes in ufortowrlditemdeifnit9 then on older versions ufortitemdefinitoj so idk wher tyo put this
|
||||
{
|
||||
static auto MinLevelOffset = GetOffset("MinLevel");
|
||||
static auto MaxLevelOffset = GetOffset("MaxLevel");
|
||||
|
||||
const int MinLevel = Get<int>(MinLevelOffset);
|
||||
const int MaxLevel = Get<int>(MaxLevelOffset);
|
||||
|
||||
int PickedLevel = 0;
|
||||
|
||||
if (PreferredLevel >= MinLevel)
|
||||
PickedLevel = PreferredLevel;
|
||||
|
||||
if (MaxLevel >= 0)
|
||||
{
|
||||
if (PickedLevel <= MaxLevel)
|
||||
return PickedLevel;
|
||||
return MaxLevel;
|
||||
}
|
||||
|
||||
return PickedLevel;
|
||||
}
|
||||
|
||||
FDataTableCategoryHandle& GetLootLevelData()
|
||||
{
|
||||
static auto LootLevelDataOffset = GetOffset("LootLevelData");
|
||||
return Get<FDataTableCategoryHandle>(LootLevelDataOffset);
|
||||
}
|
||||
|
||||
int& GetDropCount()
|
||||
{
|
||||
static auto DropCountOffset = GetOffset("DropCount");
|
||||
|
||||
Reference in New Issue
Block a user