diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-20 21:04:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-20 21:04:44 +0300 |
commit | 7975143ff6a344c0af4ace7f530ae02dc94e1a78 (patch) | |
tree | f131fa9e469169c36a7a449ee00de61bc85aa39b /src/net/ea | |
parent | 60231aaaccfab29e531b633e09ae13bf901a1e5a (diff) | |
download | manaverse-7975143ff6a344c0af4ace7f530ae02dc94e1a78.tar.gz manaverse-7975143ff6a344c0af4ace7f530ae02dc94e1a78.tar.bz2 manaverse-7975143ff6a344c0af4ace7f530ae02dc94e1a78.tar.xz manaverse-7975143ff6a344c0af4ace7f530ae02dc94e1a78.zip |
Move platerdeathlistener into separate file.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 065ac6365..c6080bcee 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -44,6 +44,7 @@ #include "resources/map/map.h" #include "listeners/updatestatuslistener.h" +#include "listeners/playerdeathlistener.h" #include "net/messagein.h" #include "net/net.h" @@ -53,7 +54,6 @@ #include "debug.h" extern OkDialog *weightNotice; -extern OkDialog *deathNotice; extern int weightNoticeTime; // Max. distance we are willing to scroll after a teleport; @@ -73,27 +73,7 @@ namespace } } weightListener; - /** - * Listener used for handling death message. - */ - struct DeathListener final : public ActionListener - { - void action(const ActionEvent &event A_UNUSED) - { - if (Net::getPlayerHandler()) - Net::getPlayerHandler()->respawn(); - deathNotice = nullptr; - - Game::closeDialogs(); - - if (viewport) - viewport->closePopupMenu(); - - NpcDialog::clearDialogs(); - if (player_node) - player_node->respawn(); - } - } deathListener; + PlayerDeathListener deathListener; } // anonymous namespace |