lmfao
This commit is contained in:
@ -39,13 +39,18 @@ bool AHYPlayerCharacController::AddItemToInventoryByID(FName ID)
|
||||
return false;
|
||||
}
|
||||
|
||||
void AHYPlayerCharacController::CraftItem(FInventoryItem ItemA, FInventoryItem ItemB)
|
||||
void AHYPlayerCharacController::CraftItem(FInventoryItem ItemA, FInventoryItem ItemB, FInventoryItem ItemC, FInventoryItem ItemD)
|
||||
{
|
||||
for (auto Pair : ItemB.CraftCombinations) {
|
||||
if (Pair.ComponentID == ItemA.ItemID) {
|
||||
if (Pair.bDestroyItemA) Inventory.RemoveSingle(ItemA);
|
||||
if (Pair.bDestroyItemB) Inventory.RemoveSingle(ItemB);
|
||||
AddItemToInventoryByID(Pair.ProductID);
|
||||
for (auto Combination : ItemB.CraftCombinations) {
|
||||
if (Combination.ItemAID == ItemA.ItemID
|
||||
&& Combination.ItemBID == ItemB.ItemID
|
||||
&& Combination.ItemCID == ItemC.ItemID
|
||||
&& Combination.ItemDID == ItemD.ItemID) {
|
||||
if (Combination.bDestroyItemA) Inventory.RemoveSingle(ItemA);
|
||||
if (Combination.bDestroyItemB) Inventory.RemoveSingle(ItemB);
|
||||
if (Combination.bDestroyItemC) Inventory.RemoveSingle(ItemC);
|
||||
if (Combination.bDestroyItemD) Inventory.RemoveSingle(ItemD);
|
||||
AddItemToInventoryByID(Combination.ProductID);
|
||||
ReloadCraftUI();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user