summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-13 16:06:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-13 16:06:20 +0300
commit3bbf7407ac14ec84329ad85fd8552e36872b3476 (patch)
tree4f2dc1779957adcea79dd756964fdf8a6fea9335 /src/being
parent13baf331faa43913cb836661113ba63d3c2bc0a3 (diff)
downloadmv-3bbf7407ac14ec84329ad85fd8552e36872b3476.tar.gz
mv-3bbf7407ac14ec84329ad85fd8552e36872b3476.tar.bz2
mv-3bbf7407ac14ec84329ad85fd8552e36872b3476.tar.xz
mv-3bbf7407ac14ec84329ad85fd8552e36872b3476.zip
Move awaylistener into separate file.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp13
-rw-r--r--src/being/localplayer.h7
2 files changed, 2 insertions, 18 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index b64c494b7..37a960dae 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -73,6 +73,7 @@
#include "resources/map/mapitem.h"
#include "resources/map/speciallayer.h"
+#include "listeners/awaylistener.h"
#include "listeners/updatestatuslistener.h"
#include "utils/delete2.h"
@@ -3813,15 +3814,3 @@ void LocalPlayer::setTestParticle(const std::string &fileName,
mTestParticleHash = UpdaterWindow::getFileHash(mTestParticleName);
}
}
-
-void AwayListener::action(const ActionEvent &event)
-{
- if (event.getId() == "ok" && player_node && player_node->getAway())
- {
- player_node->changeAwayMode();
- player_node->updateStatus();
- if (outfitWindow)
- outfitWindow->unwearAwayOutfit();
- UpdateStatusListener::distributeEvent();
- }
-}
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 4fa3e8328..a8fd829d3 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -36,17 +36,12 @@
#include "localconsts.h"
+class AwayListener;
class ChatTab;
class FloorItem;
class Map;
class OkDialog;
-class AwayListener final : public ActionListener
-{
- public:
- void action(const ActionEvent &event) override final;
-};
-
/**
* Reasons an item can fail to be picked up.
*/