From b6df3c3999d4be067e7314e3887e583c13ad1624 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 10 Jun 2013 22:46:50 +0300 Subject: add partial support for player looks. Can get packets from server, but cant draw player. --- src/gui/charcreatedialog.cpp | 3 ++- src/gui/charcreatedialog.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui') 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(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(mRace)); + mPlayer->setSubtype(static_cast(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; -- cgit v1.2.3-70-g09d2