summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/npchandler.cpp13
-rw-r--r--src/net/ea/npchandler.h4
-rw-r--r--src/net/ea/playerhandler.cpp5
3 files changed, 2 insertions, 20 deletions
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp
index 78a46f630..654a783b3 100644
--- a/src/net/ea/npchandler.cpp
+++ b/src/net/ea/npchandler.cpp
@@ -30,7 +30,6 @@ namespace Ea
{
NpcHandler::NpcHandler() :
- mNpcDialogs(),
mDialog(nullptr)
{
}
@@ -49,18 +48,6 @@ void NpcHandler::endShopping(const int beingId A_UNUSED) const
{
}
-void NpcHandler::clearDialogs()
-{
- NpcDialogs::iterator it = mNpcDialogs.begin();
- const NpcDialogs::iterator it_end = mNpcDialogs.end();
- while (it != it_end)
- {
- delete (*it).second;
- ++ it;
- }
- mNpcDialogs.clear();
-}
-
void NpcHandler::processNpcChoice(Net::MessageIn &msg)
{
if (mDialog)
diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h
index 9fe07f531..9c50b8c50 100644
--- a/src/net/ea/npchandler.h
+++ b/src/net/ea/npchandler.h
@@ -48,8 +48,6 @@ class NpcHandler : public Net::NpcHandler
void endShopping(int beingId) const override;
- void clearDialogs() override;
-
virtual int getNpc(Net::MessageIn &msg,
bool haveLength) A_WARN_UNUSED = 0;
@@ -66,8 +64,6 @@ class NpcHandler : public Net::NpcHandler
void processNpcStrInput(Net::MessageIn &msg);
protected:
- typedef std::map<int, NpcDialog*> NpcDialogs;
- NpcDialogs mNpcDialogs;
NpcDialog *mDialog;
};
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 309888d50..c52febaf9 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -30,6 +30,7 @@
#include "gui/ministatuswindow.h"
#include "gui/okdialog.h"
+#include "gui/npcdialog.h"
#include "gui/skilldialog.h"
#include "gui/statuswindow.h"
#include "gui/viewport.h"
@@ -77,9 +78,7 @@ namespace
if (viewport)
viewport->closePopupMenu();
- Net::NpcHandler *const handler = Net::getNpcHandler();
- if (handler)
- handler->clearDialogs();
+ NpcDialog::clearDialogs();
if (player_node)
player_node->respawn();
}