summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/inventoryrecv.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index 5cd362b14..044b4a9d3 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -748,7 +748,8 @@ void InventoryRecv::processPlayerCartAdd(Net::MessageIn &msg)
}
}
- if (inventory)
+ // check what cart was created, if not add delayed items
+ if (inventory && inventory->getSize() > 0)
{
const Item *const item = inventory->getItem(index);
@@ -768,6 +769,20 @@ void InventoryRecv::processPlayerCartAdd(Net::MessageIn &msg)
Equipped_false);
inventory->setCards(index, cards, 4);
}
+ else
+ {
+ mCartItems.push_back(Ea::InventoryItem(index,
+ itemId,
+ itemType,
+ cards,
+ amount,
+ refine,
+ ItemColorManager::getColorFromCards(&cards[0]),
+ fromBool(identified, Identified),
+ damaged,
+ Favorite_false,
+ Equipm_false));
+ }
BLOCK_END("InventoryRecv::processPlayerCartAdd")
}