summaryrefslogtreecommitdiff
path: root/src/net/tmwa/npchandler.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-31 02:44:53 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-31 04:55:37 +0300
commit935d70ec604feaac02deb7cc23352706ad6a2f03 (patch)
tree92361309a58a8039bdebba5fee15ce8fa8100729 /src/net/tmwa/npchandler.h
parentab2f28cfa2995dffeaf95a3a160654eee363c593 (diff)
downloadmv-935d70ec604feaac02deb7cc23352706ad6a2f03.tar.gz
mv-935d70ec604feaac02deb7cc23352706ad6a2f03.tar.bz2
mv-935d70ec604feaac02deb7cc23352706ad6a2f03.tar.xz
mv-935d70ec604feaac02deb7cc23352706ad6a2f03.zip
Extract shared logic from npchandler and playerhandler netcode to ea namespace.
Diffstat (limited to 'src/net/tmwa/npchandler.h')
-rw-r--r--src/net/tmwa/npchandler.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h
index 1b4455854..624f64cbc 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -26,6 +26,8 @@
#include "net/net.h"
#include "net/npchandler.h"
+#include "net/ea/npchandler.h"
+
#include "net/tmwa/messagehandler.h"
#include <map>
@@ -41,7 +43,7 @@ class NpcDialog;
namespace TmwAthena
{
-class NpcHandler : public MessageHandler, public Net::NpcHandler
+class NpcHandler : public MessageHandler, public Ea::NpcHandler
{
public:
NpcHandler();
@@ -60,11 +62,6 @@ class NpcHandler : public MessageHandler, public Net::NpcHandler
void stringInput(int npcId, const std::string &value);
- void sendLetter(int npcId, const std::string &recipient,
- const std::string &text);
-
- void startShopping(int beingId);
-
void buy(int beingId);
void sell(int beingId);
@@ -73,17 +70,7 @@ class NpcHandler : public MessageHandler, public Net::NpcHandler
void sellItem(int beingId, int itemId, int amount);
- void endShopping(int beingId);
-
- void clearDialogs();
-
- private:
- typedef struct
- {
- NpcDialog* dialog;
- } Wrapper;
- typedef std::map<int, Wrapper> NpcDialogs;
- NpcDialogs mNpcDialogs;
+ int getNpc(Net::MessageIn &msg, bool haveLength);
};
} // namespace TmwAthena