summaryrefslogtreecommitdiff
path: root/src/gui/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-25 18:38:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-25 18:38:52 +0300
commit3d447679df26179b7ffa781c34f5277e6a1aec29 (patch)
tree242365d32770a89448130684ad7ed2bf00c22561 /src/gui/charcreatedialog.cpp
parent8c8f9f6cf53a6d5b8d9d72f4860921b3325a7696 (diff)
downloadmanaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.gz
manaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.bz2
manaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.xz
manaplus-3d447679df26179b7ffa781c34f5277e6a1aec29.zip
Dont compile manaserv related code if manaserv support disabled.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r--src/gui/charcreatedialog.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 973273e95..914e29f3c 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -185,8 +185,11 @@ void CharCreateDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "create")
{
- if (Net::getNetworkType() == ServerInfo::MANASERV
- || getName().length() >= 4)
+ if (
+#ifdef MANASERV_SUPPORT
+ Net::getNetworkType() == ServerInfo::MANASERV ||
+#endif
+ getName().length() >= 4)
{
// Attempt to create the character
mCreateButton->setEnabled(false);
@@ -199,9 +202,11 @@ void CharCreateDialog::action(const gcn::ActionEvent &event)
}
int characterSlot = mSlot;
+#ifdef MANASERV_SUPPORT
// On Manaserv, the slots start at 1, so we offset them.
if (Net::getNetworkType() == ServerInfo::MANASERV)
++characterSlot;
+#endif
Net::getCharHandler()->newCharacter(getName(), characterSlot,
mFemale->isSelected(), mHairStyle, mHairColor, mRace, atts);