summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp24
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