summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-02 19:05:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-02 19:05:34 +0300
commitf924674239571a40b0806136a49b4da3edcadbbf (patch)
tree5a5cd954acf5832e6cf01c59b8960d6b06657fa3 /src/net/ea/playerhandler.cpp
parent1003a7a74f72f17f59f4a74eacf95a1744a64506 (diff)
downloadmanaverse-f924674239571a40b0806136a49b4da3edcadbbf.tar.gz
manaverse-f924674239571a40b0806136a49b4da3edcadbbf.tar.bz2
manaverse-f924674239571a40b0806136a49b4da3edcadbbf.tar.xz
manaverse-f924674239571a40b0806136a49b4da3edcadbbf.zip
Move weight notification from playerhander.
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 2835b3def..fa892af29 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -35,7 +35,6 @@
#include "gui/dialogtype.h"
#include "gui/viewport.h"
-#include "gui/windows/okdialog.h"
#include "gui/windows/skilldialog.h"
#include "gui/windows/statuswindow.h"
@@ -43,8 +42,6 @@
#include "resources/map/map.h"
-#include "listeners/weightlistener.h"
-
#include "net/messagein.h"
#include "net/ea/eaprotocol.h"
@@ -53,17 +50,10 @@
#include "debug.h"
-extern int weightNoticeTime;
-
// Max. distance we are willing to scroll after a teleport;
// everything beyond will reset the port hard.
static const int MAP_TELEPORT_SCROLL_DISTANCE = 8;
-namespace
-{
- WeightListener weightListener;
-} // anonymous namespace
-
namespace Ea
{
@@ -385,45 +375,6 @@ void PlayerHandler::setStat(const int type,
PlayerInfo::getStatExperience(Attributes::JOB).first, base);
break;
case Ea::TOTAL_WEIGHT:
- if (!weightNotice && config.getBoolValue("weightMsg"))
- {
- const int max = PlayerInfo::getAttribute(
- Attributes::MAX_WEIGHT) / 2;
- const int total = PlayerInfo::getAttribute(
- Attributes::TOTAL_WEIGHT);
- if (base >= max && total < max)
- {
- weightNoticeTime = cur_time + 5;
- // TRANSLATORS: message header
- weightNotice = new OkDialog(_("Message"),
- // TRANSLATORS: weight message
- _("You are carrying more than "
- "half your weight. You are "
- "unable to regain health."),
- // TRANSLATORS: ok dialog button
- _("OK"),
- DialogType::OK,
- false, true, nullptr, 260);
- weightNotice->addActionListener(
- &weightListener);
- }
- else if (base < max && total >= max)
- {
- weightNoticeTime = cur_time + 5;
- // TRANSLATORS: message header
- weightNotice = new OkDialog(_("Message"),
- // TRANSLATORS: weight message
- _("You are carrying less than "
- "half your weight. You "
- "can regain health."),
- // TRANSLATORS: ok dialog button
- _("OK"),
- DialogType::OK,
- false, true, nullptr, 260);
- weightNotice->addActionListener(
- &weightListener);
- }
- }
PlayerInfo::setAttribute(Attributes::TOTAL_WEIGHT, base);
break;
case Ea::MAX_WEIGHT: