summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/beingequipbackend.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/beingequipbackend.cpp b/src/beingequipbackend.cpp
index 9a3d35bea..4cc273ab1 100644
--- a/src/beingequipbackend.cpp
+++ b/src/beingequipbackend.cpp
@@ -44,7 +44,7 @@ BeingEquipBackend::BeingEquipBackend(Being *const being)
const int id = being->mSpriteIDs[f];
if (id > 0 && idx >= 0 && idx < EQUIPMENT_SIZE)
{
- mEquipment[idx] = new Item(id,
+ Item *const item = new Item(id,
ItemType::Unknown,
1,
0,
@@ -54,6 +54,10 @@ BeingEquipBackend::BeingEquipBackend(Being *const being)
Favorite_false,
Equipm_true,
Equipped_true);
+ const CardsList &cards = being->mSpriteCardsIds[f];
+ if (!cards.isEmpty())
+ item->setCards(&cards.cards[0], maxCards);
+ mEquipment[idx] = item;
}
}
}