From 95227e7c07251c8f59164050543c3c134aff238f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Jun 2016 20:18:38 +0300 Subject: Add support for items with cards in charcreation.xml --- src/gui/windows/charcreatedialog.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index af23b6b28..d8b6aad74 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -149,15 +149,17 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, setContentSize(w, h); mPlayer->setGender(Gender::MALE); - const std::vector &items = CharDB::getDefaultItems(); + const std::vector &items = CharDB::getDefaultItems(); int i = 1; - for (std::vector::const_iterator it = items.begin(), + for (std::vector::const_iterator it = items.begin(), it_fend = items.end(); it != it_fend; ++ it, i ++) { - mPlayer->setSpriteId(i, - *it); + const BeingSlot &beingSlot = *it; + mPlayer->setSpriteCards(i, + beingSlot.spriteId, + beingSlot.cardsId); } if (!maxHairColor) -- cgit v1.2.3-70-g09d2