diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-12-28 00:48:05 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-12-29 07:41:08 +0100 |
commit | 3553f1e11f7f4478c4c64192f6455d528c7dffda (patch) | |
tree | e0dd6bf3c44718f7be5cad7803449cd6ebb625ff /src/gui/charcreatedialog.cpp | |
parent | 411b54e993ea997e18be18fadd26ceab00c00fa3 (diff) | |
download | mana-3553f1e11f7f4478c4c64192f6455d528c7dffda.tar.gz mana-3553f1e11f7f4478c4c64192f6455d528c7dffda.tar.bz2 mana-3553f1e11f7f4478c4c64192f6455d528c7dffda.tar.xz mana-3553f1e11f7f4478c4c64192f6455d528c7dffda.zip |
Made the client handle the characters slots properly for Manaserv.
Reviewed-by: Crush.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index 2db25a35..746295b5 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -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); |