diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-12 18:23:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-12 18:23:47 +0300 |
commit | e082aa3439e3ffb4b69c491be1dc881e9c14abce (patch) | |
tree | 2be742ecba15df9809b1f5c389d774f7b38d814b /src | |
parent | 47cf0d69e8026927ca69547a17ac8e1d288538b7 (diff) | |
download | plus-e082aa3439e3ffb4b69c491be1dc881e9c14abce.tar.gz plus-e082aa3439e3ffb4b69c491be1dc881e9c14abce.tar.bz2 plus-e082aa3439e3ffb4b69c491be1dc881e9c14abce.tar.xz plus-e082aa3439e3ffb4b69c491be1dc881e9c14abce.zip |
Remove old manaserv related code from status window.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 43 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.h | 1 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/ea/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/playerhandler.h | 2 |
5 files changed, 2 insertions, 51 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index ea73c46b5..53240a0c7 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -83,7 +83,6 @@ StatusWindow::StatusWindow() : mDAttrCont(new VertContainer(this, 32)), mDAttrScroll(new ScrollArea(this, mDAttrCont, false)), mCharacterPointsLabel(new Label(this, "C")), - mCorrectionPointsLabel(nullptr), // TRANSLATORS: status window button mCopyButton(new Button(this, _("Copy to chat"), "copy", this)), mAttrs() @@ -220,12 +219,6 @@ StatusWindow::StatusWindow() : place(0, 6, mCharacterPointsLabel, 5); place(0, 5, mCopyButton); - if (playerHandler->canCorrectAttributes()) - { - mCorrectionPointsLabel = new Label(this, "C"); - place(0, 7, mCorrectionPointsLabel, 5); - } - loadWindowState(); enableVisibleSound(true); @@ -368,11 +361,8 @@ void StatusWindow::attributeChanged(const AttributesT id, } break; + // ?? case Attributes::CORR_POINTS: - mCorrectionPointsLabel->setCaption(strprintf( - // TRANSLATORS: status window label - _("Correction points: %d"), newVal)); - mCorrectionPointsLabel->adjustSize(); // Update all attributes for (Attrs::const_iterator it = mAttrs.begin(); it != mAttrs.end(); ++it) @@ -761,7 +751,6 @@ ChangeDisplay::ChangeDisplay(const Widget2 *const widget, mNeeded(1), // TRANSLATORS: status window label mPoints(new Label(this, _("Max"))), - mDec(nullptr), // TRANSLATORS: status window label (plus sign) mInc(new Button(this, _("+"), "inc", this)) { @@ -772,15 +761,6 @@ ChangeDisplay::ChangeDisplay(const Widget2 *const widget, place(4, 0, mValue, 2); place(6, 0, mInc); place(7, 0, mPoints); - - if (playerHandler->canCorrectAttributes()) - { - // TRANSLATORS: status window label (minus sign) - mDec = new Button(this, _("-"), "dec", this); - mDec->setWidth(mInc->getWidth()); - - place(3, 0, mDec); - } } std::string ChangeDisplay::update() @@ -795,9 +775,6 @@ std::string ChangeDisplay::update() mPoints->setCaption(_("Max")); } - if (mDec) - mDec->setEnabled(PlayerInfo::getAttribute(Attributes::CORR_POINTS)); - mInc->setEnabled(PlayerInfo::getAttribute(Attributes::CHAR_POINTS) >= mNeeded && mNeeded > 0); @@ -812,23 +789,7 @@ void ChangeDisplay::setPointsNeeded(const int needed) void ChangeDisplay::action(const ActionEvent &event) { - if (playerHandler->canCorrectAttributes() && - event.getSource() == mDec) - { - const int newcorrpoints = PlayerInfo::getAttribute( - Attributes::CORR_POINTS); - PlayerInfo::setAttribute(Attributes::CORR_POINTS, newcorrpoints - 1); - - const int newpoints = PlayerInfo::getAttribute( - Attributes::CHAR_POINTS) + 1; - PlayerInfo::setAttribute(Attributes::CHAR_POINTS, newpoints); - - const int newbase = PlayerInfo::getStatBase(mId) - 1; - PlayerInfo::setStatBase(mId, newbase); - - playerHandler->decreaseAttribute(mId); - } - else if (event.getSource() == mInc) + if (event.getSource() == mInc) { int cnt = 1; if (config.getBoolValue("quickStats")) diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index 048a8a0b2..a76714464 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -125,7 +125,6 @@ class StatusWindow final : public Window, ScrollArea *mDAttrScroll A_NONNULLPOINTER; Label *mCharacterPointsLabel A_NONNULLPOINTER; - Label *mCorrectionPointsLabel; Button *mCopyButton; typedef std::map<AttributesT, AttrDisplay*> Attrs; diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 907c6e61e..127821fa9 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -59,11 +59,6 @@ void PlayerHandler::ignoreAll(const bool ignore A_UNUSED) const { } -bool PlayerHandler::canCorrectAttributes() const -{ - return false; -} - Vector PlayerHandler::getDefaultWalkSpeed() const { // Return an normalized speed for any side diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index c2d41a372..a04d78ee6 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -51,8 +51,6 @@ class PlayerHandler notfinal : public Net::PlayerHandler bool canUseMagic() const override final; - bool canCorrectAttributes() const override final; - Vector getDefaultWalkSpeed() const override final A_WARN_UNUSED; void setStat(Net::MessageIn &msg, diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 75f726254..21c06b8bb 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -73,8 +73,6 @@ class PlayerHandler notfinal virtual bool canUseMagic() const = 0; - virtual bool canCorrectAttributes() const = 0; - virtual Vector getDefaultWalkSpeed() const A_WARN_UNUSED = 0; virtual void requestOnlineList() const = 0; |