From 682ae29f4861c1434db7f5f885cd5062d73b0d1a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 20 Jun 2016 03:13:08 +0300 Subject: Show cards in other player items. --- src/beingequipbackend.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } } } -- cgit v1.2.3-70-g09d2