summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-20 03:13:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-20 03:13:08 +0300
commit682ae29f4861c1434db7f5f885cd5062d73b0d1a (patch)
tree8602d9813d858acf62d9d4330b062b5f4c3bd419
parent9dfde677430ab0dc1c11807b2b0d9f76bab353bb (diff)
downloadmv-682ae29f4861c1434db7f5f885cd5062d73b0d1a.tar.gz
mv-682ae29f4861c1434db7f5f885cd5062d73b0d1a.tar.bz2
mv-682ae29f4861c1434db7f5f885cd5062d73b0d1a.tar.xz
mv-682ae29f4861c1434db7f5f885cd5062d73b0d1a.zip
Show cards in other player items.
-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;
}
}
}