summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-10 22:46:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-10 22:46:50 +0300
commitb6df3c3999d4be067e7314e3887e583c13ad1624 (patch)
treef7f39237cbf1e08440882c295cf3d7a494a2585a /src/gui
parent83a142e6917bed619aeb96e217850299eb2a63be (diff)
downloadmv-b6df3c3999d4be067e7314e3887e583c13ad1624.tar.gz
mv-b6df3c3999d4be067e7314e3887e583c13ad1624.tar.bz2
mv-b6df3c3999d4be067e7314e3887e583c13ad1624.tar.xz
mv-b6df3c3999d4be067e7314e3887e583c13ad1624.zip
add partial support for player looks.
Can get packets from server, but cant draw player.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/charcreatedialog.cpp3
-rw-r--r--src/gui/charcreatedialog.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 7ccfeb6f1..dc65f6ae1 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -119,6 +119,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
// TRANSLATORS: char create dialog button
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
mRace(0),
+ mLook(0),
mPlayer(new Being(0, ActorSprite::PLAYER, static_cast<uint16_t>(mRace),
nullptr)),
mPlayerBox(new PlayerBox(mPlayer, "charcreate_playerbox.xml",
@@ -561,7 +562,7 @@ void CharCreateDialog::updateRace()
else if (mRace >= Being::getNumOfRaces())
mRace = 0;
- mPlayer->setSubtype(static_cast<uint16_t>(mRace));
+ mPlayer->setSubtype(static_cast<uint16_t>(mRace), mLook);
const ItemInfo &item = ItemDB::get(-100 - mRace);
mRaceNameLabel->setCaption(item.getName());
mRaceNameLabel->adjustSize();
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index 69ae1af1a..a7cb5105c 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -136,6 +136,7 @@ class CharCreateDialog final : public Window,
Button *mCancelButton;
int mRace;
+ int mLook;
Being *mPlayer;
PlayerBox *mPlayerBox;