mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fix 18.40 cone &e diting :)
This commit is contained in:
@@ -58,4 +58,13 @@ public:
|
|||||||
{
|
{
|
||||||
return Item;
|
return Item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static UStruct* GetStruct()
|
||||||
|
{
|
||||||
|
static auto Struct = FindObject<UStruct>(L"/Script/FortniteGame.ItemAndCount");
|
||||||
|
return Struct;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetStructSize() { return GetStruct()->GetPropertiesSize(); }
|
||||||
};
|
};
|
||||||
@@ -193,8 +193,8 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
|||||||
|
|
||||||
for (int i = 0; i < StartingItems.Num(); ++i)
|
for (int i = 0; i < StartingItems.Num(); ++i)
|
||||||
{
|
{
|
||||||
auto& StartingItem = StartingItems.at(i);
|
auto& StartingItem = StartingItems.at(i, FItemAndCount::GetStructSize());
|
||||||
|
LOG_INFO(LogDev, "Adding starting item {} x{}!", StartingItem.GetItem() ? StartingItem.GetItem()->GetFullName() : "BadRead", StartingItem.GetCount());
|
||||||
WorldInventory->AddItem(StartingItem.GetItem(), nullptr, StartingItem.GetCount());
|
WorldInventory->AddItem(StartingItem.GetItem(), nullptr, StartingItem.GetCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public:
|
|||||||
|
|
||||||
for (int i = 0; i < StartingItems.Num(); ++i)
|
for (int i = 0; i < StartingItems.Num(); ++i)
|
||||||
{
|
{
|
||||||
auto& StartingItem = StartingItems.at(i);
|
auto& StartingItem = StartingItems.at(i, FItemAndCount::GetStructSize());
|
||||||
|
|
||||||
(*Inventory)->AddItem(StartingItem.GetItem(), nullptr, StartingItem.GetCount());
|
(*Inventory)->AddItem(StartingItem.GetItem(), nullptr, StartingItem.GetCount());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user