From 3d447679df26179b7ffa781c34f5277e6a1aec29 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Apr 2011 18:38:52 +0300 Subject: Dont compile manaserv related code if manaserv support disabled. --- src/gui/charcreatedialog.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gui/charcreatedialog.cpp') 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); -- cgit v1.2.3-70-g09d2