Fix cItems::AddItemGrid adding empty items
This commit is contained in:
parent
b5410c718e
commit
a2ecbf6a2e
@ -804,9 +804,12 @@ bool cItems::ContainsType(const cItem & a_Item)
|
||||
|
||||
void cItems::AddItemGrid(const cItemGrid & a_ItemGrid)
|
||||
{
|
||||
auto numSlots = a_ItemGrid.GetNumSlots();
|
||||
for (int i = 0; i < numSlots; ++i)
|
||||
for (int i = 0; i < a_ItemGrid.GetNumSlots(); ++i)
|
||||
{
|
||||
Add(a_ItemGrid.GetSlot(i));
|
||||
const auto & Slot = a_ItemGrid.GetSlot(i);
|
||||
if (!Slot.IsEmpty())
|
||||
{
|
||||
Add(Slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user