mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
creative stuff
This commit is contained in:
@@ -14,6 +14,9 @@ UFortItem* CreateItemInstance(AFortPlayerController* PlayerController, UFortItem
|
||||
|
||||
std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddItem(UFortItemDefinition* ItemDefinition, bool* bShouldUpdate, int Count, int LoadedAmmo, bool bShouldAddToStateValues)
|
||||
{
|
||||
if (!ItemDefinition)
|
||||
return std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>>();
|
||||
|
||||
if (bShouldUpdate)
|
||||
*bShouldUpdate = false;
|
||||
|
||||
@@ -225,6 +228,23 @@ void AFortInventory::ModifyCount(UFortItem* ItemInstance, int New, bool bRemove,
|
||||
}
|
||||
}
|
||||
|
||||
UFortItem* AFortInventory::GetPickaxeInstance()
|
||||
{
|
||||
static auto FortWeaponMeleeItemDefinitionClass = FindObject<UClass>("/Script/FortniteGame.FortWeaponMeleeItemDefinition");
|
||||
|
||||
auto& ItemInstances = GetItemList().GetItemInstances();
|
||||
|
||||
for (int i = 0; i < ItemInstances.Num(); i++)
|
||||
{
|
||||
auto ItemInstance = ItemInstances.At(i);
|
||||
|
||||
if (ItemInstance->GetItemEntry()->GetItemDefinition()->IsA(FortWeaponMeleeItemDefinitionClass))
|
||||
return ItemInstance;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UFortItem* AFortInventory::FindItemInstance(UFortItemDefinition* ItemDefinition)
|
||||
{
|
||||
auto& ItemInstances = GetItemList().GetItemInstances();
|
||||
|
||||
Reference in New Issue
Block a user