From 37432edac65a6b85c7a3414a421f2afd3e67a14e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 31 Mar 2009 15:11:26 -0600 Subject: Add first draft of net handlers eAthena NPC handler has been implemented and is being used for NPC interraction. --- src/net/ea/npchandler.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src/net/ea/npchandler.h') diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index 8c252175..71e15e02 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -23,13 +23,36 @@ #define NET_EA_NPCHANDLER_H #include "net/messagehandler.h" +#include "net/net.h" -class NPCHandler : public MessageHandler +class NPCHandler : public MessageHandler, public Net::NpcHandler { public: NPCHandler(); void handleMessage(MessageIn &msg); + + void talk(int npcId); + + void nextDialog(int npcId); + + void closeDialog(int npcId); + + void listInput(int npcId, int value); + + void integerInput(int npcId, int value); + + void stringInput(int npcId, const std::string &value); + + void buy(int beingId); + + void sell(int beingId); + + void buyItem(int beingId, int itemId, int amount); + + void sellItem(int beingId, int itemId, int amount); }; +extern NPCHandler *npcHandler; + #endif // NET_EA_NPCHANDLER_H -- cgit v1.2.3-70-g09d2