diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-20 03:13:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-20 03:13:08 +0300 |
commit | 682ae29f4861c1434db7f5f885cd5062d73b0d1a (patch) | |
tree | 8602d9813d858acf62d9d4330b062b5f4c3bd419 /src/beingequipbackend.cpp | |
parent | 9dfde677430ab0dc1c11807b2b0d9f76bab353bb (diff) | |
download | manaplus-682ae29f4861c1434db7f5f885cd5062d73b0d1a.tar.gz manaplus-682ae29f4861c1434db7f5f885cd5062d73b0d1a.tar.bz2 manaplus-682ae29f4861c1434db7f5f885cd5062d73b0d1a.tar.xz manaplus-682ae29f4861c1434db7f5f885cd5062d73b0d1a.zip |
Show cards in other player items.
Diffstat (limited to 'src/beingequipbackend.cpp')
-rw-r--r-- | src/beingequipbackend.cpp | 6 |
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; } } } |