summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-17 11:50:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-17 11:50:28 +0300
commit616ab2676cc932ab59152c510d584c429090987a (patch)
tree9184b8836b51a073f67ee60a46043084687207a7 /src/gui
parent4b397f4c8e2b0c8d636cc2782d9571567473975b (diff)
downloadmv-616ab2676cc932ab59152c510d584c429090987a.tar.gz
mv-616ab2676cc932ab59152c510d584c429090987a.tar.bz2
mv-616ab2676cc932ab59152c510d584c429090987a.tar.xz
mv-616ab2676cc932ab59152c510d584c429090987a.zip
Remove getter for serverFeatures.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/itempopup.cpp4
-rw-r--r--src/gui/popups/popupmenu.cpp6
-rw-r--r--src/gui/windows/charcreatedialog.cpp18
-rw-r--r--src/gui/windows/registerdialog.cpp2
-rw-r--r--src/gui/windows/socialwindow.cpp2
-rw-r--r--src/gui/windows/whoisonline.cpp2
6 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index fb4c3a9fd..cf471ba3e 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -118,7 +118,7 @@ void ItemPopup::setItem(const Item *const item, const bool showImage)
mLastName = ii.getName();
mLastColor = item->getColor();
mLastId = item->getId();
- if (Net::getServerFeatures()->haveItemColors())
+ if (serverFeatures->haveItemColors())
{
mItemName->setCaption(strprintf("%s (+%u), %d",
ii.getName(item->getColor()).c_str(),
@@ -182,7 +182,7 @@ void ItemPopup::setItem(const ItemInfo &item, const unsigned char color,
mLastColor = color;
mLastId = id;
- if (Net::getServerFeatures()->haveItemColors())
+ if (serverFeatures->haveItemColors())
{
mItemName->setCaption(strprintf("%s, %d",
item.getName(color).c_str(), id));
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 9aa99b229..31ae42b4a 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -793,7 +793,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
}
addPlayerMisc();
addBuySellDefault();
- if (Net::getServerFeatures()->havePartyNickInvite())
+ if (serverFeatures->havePartyNickInvite())
addParty(wTab->getNick());
mBrowserBox->addRow("##3---");
}
@@ -1087,7 +1087,7 @@ void PopupMenu::handleLink(const std::string &link,
{
if (mItem)
{
- if (Net::getServerFeatures()->haveItemColors())
+ if (serverFeatures->haveItemColors())
{
chatWindow->addItemText(mItem->getInfo().getName(
mItem->getColor()));
@@ -1104,7 +1104,7 @@ void PopupMenu::handleLink(const std::string &link,
if (item)
{
- if (Net::getServerFeatures()->haveItemColors())
+ if (serverFeatures->haveItemColors())
{
chatWindow->addItemText(item->getInfo().getName(
item->getColor()));
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 1ee09a5d8..def290047 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -187,7 +187,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mNameField->setMaximum(24);
- if (Net::getServerFeatures()->haveRaceSelection())
+ if (serverFeatures->haveRaceSelection())
{
// TRANSLATORS: char create dialog button
mNextRaceButton = new Button(this, _(">"), "nextrace", this);
@@ -197,7 +197,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mRaceLabel = new Label(this, _("Race:"));
mRaceNameLabel = new Label(this, "");
}
- if (Net::getServerFeatures()->haveLookSelection() && mMinLook < mMaxLook)
+ if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook)
{
// TRANSLATORS: char create dialog button
mNextLookButton = new Button(this, _(">"), "nextlook", this);
@@ -253,7 +253,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mHairStyleLabel->setPosition(labelX, y);
mHairStyleNameLabel->setPosition(nameX, y);
- if (Net::getServerFeatures()->haveLookSelection() && mMinLook < mMaxLook)
+ if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook)
{
y += 24;
mPrevLookButton->setPosition(leftX, y);
@@ -262,7 +262,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mLookLabel->setPosition(labelX, y);
mLookNameLabel->setPosition(nameX, y); // 93
}
- if (Net::getServerFeatures()->haveRaceSelection())
+ if (serverFeatures->haveRaceSelection())
{
y += 24;
mPrevRaceButton->setPosition(leftX, y);
@@ -293,7 +293,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
add(mActionButton);
add(mRotateButton);
- if (Net::getServerFeatures()->haveLookSelection() && mMinLook < mMaxLook)
+ if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook)
{
add(mNextLookButton);
add(mPrevLookButton);
@@ -301,7 +301,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
add(mLookNameLabel);
}
- if (Net::getServerFeatures()->haveRaceSelection())
+ if (serverFeatures->haveRaceSelection())
{
add(mNextRaceButton);
add(mPrevRaceButton);
@@ -322,9 +322,9 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mNameField->requestFocus();
updateHair();
- if (Net::getServerFeatures()->haveRaceSelection())
+ if (serverFeatures->haveRaceSelection())
updateRace();
- if (Net::getServerFeatures()->haveLookSelection() && mMinLook < mMaxLook)
+ if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook)
updateLook();
updatePlayer();
@@ -638,7 +638,7 @@ void CharCreateDialog::updateLook()
{
const ItemInfo &item = ItemDB::get(-100 - mRace);
const int sz = item.getColorsSize();
- if (sz > 0 && Net::getServerFeatures()->haveLookSelection())
+ if (sz > 0 && serverFeatures->haveLookSelection())
{
if (mLook < 0)
mLook = sz - 1;
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 5701395a7..4c582d9f2 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -101,7 +101,7 @@ RegisterDialog::RegisterDialog(LoginData *const data) :
mMaleButton = new RadioButton(this, _("Male"), "sex", true);
// TRANSLATORS: register dialog. button.
mFemaleButton = new RadioButton(this, _("Female"), "sex", false);
- if (Net::getServerFeatures()->haveOtherGender())
+ if (serverFeatures->haveOtherGender())
{
// TRANSLATORS: register dialog. button.
mOtherButton = new RadioButton(this, _("Other"), "sex", false);
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index e792d0a0a..6407e8fa6 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -344,7 +344,7 @@ void SocialWindow::action(const ActionEvent &event)
}
else if (eventId == "create guild")
{
- if (!Net::getServerFeatures()->haveNativeGuilds())
+ if (!serverFeatures->haveNativeGuilds())
return;
std::string name = mGuildCreateDialog->getText();
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index a4ea81bfa..7244e4195 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -112,7 +112,7 @@ WhoIsOnline::WhoIsOnline() :
mShowLevel(false),
mUpdateOnlineList(config.getBoolValue("updateOnlineList")),
mGroupFriends(true),
- mServerSideList(Net::getServerFeatures()->haveOnlineList())
+ mServerSideList(serverFeatures->haveOnlineList())
{
mCurlError[0] = 0;
setWindowName("WhoIsOnline");