diff options
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index e4a5fd01..746295b5 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -54,7 +54,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mCharSelectDialog(parent), mSlot(slot) { - mPlayer = new Player(0, 0, NULL); + mPlayer = new Being(0, ActorSprite::PLAYER, 0, NULL); mPlayer->setGender(GENDER_MALE); int numberOfHairColors = ColorDB::size(); @@ -65,10 +65,10 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mNameField = new TextField(""); mNameLabel = new Label(_("Name:")); - // TRANSLATORS: This is a narrow symbol used to denote 'next'. + // TRANSLATORS: This is an arrow symbol used to denote 'next'. // You may change this symbol if your language uses another. mNextHairColorButton = new Button(_(">"), "nextcolor", this); - // TRANSLATORS: This is a narrow symbol used to denote 'previous'. + // TRANSLATORS: This is an arrow symbol used to denote 'previous'. // You may change this symbol if your language uses another. mPrevHairColorButton = new Button(_("<"), "prevcolor", this); mHairColorLabel = new Label(_("Hair color:")); @@ -156,7 +156,8 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) { if (event.getId() == "create") { - if (getName().length() >= 4) + if (Net::getNetworkType() == ServerInfo::MANASERV + || getName().length() >= 4) { // Attempt to create the character mCreateButton->setEnabled(false); @@ -167,7 +168,12 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) atts.push_back((int) mAttributeSlider[i]->getValue()); } - Net::getCharHandler()->newCharacter(getName(), mSlot, + int characterSlot = mSlot; + // On Manaserv, the slots start at 1, so we offset them. + if (Net::getNetworkType() == ServerInfo::MANASERV) + ++characterSlot; + + Net::getCharHandler()->newCharacter(getName(), characterSlot, mFemale->isSelected(), mHairStyle, mHairColor, atts); @@ -277,7 +283,8 @@ int CharCreateDialog::getDistributedPoints() const } void CharCreateDialog::setAttributes(const std::vector<std::string> &labels, - int available, int min, int max) + unsigned int available, unsigned int min, + unsigned int max) { mMaxPoints = available; |