From 009cfa4b2959bf89370e9d271f2244ef5446f3a0 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Fri, 12 Nov 2010 20:58:30 -0500 Subject: Change NPC handling in the net code Instead of using events to invoke netcode, invoke netcode directly and have it send events Reviewed-by: Freeyorp --- src/net/manaserv/npchandler.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/net/manaserv/npchandler.h') diff --git a/src/net/manaserv/npchandler.h b/src/net/manaserv/npchandler.h index 397d3569..cb8fd67d 100644 --- a/src/net/manaserv/npchandler.h +++ b/src/net/manaserv/npchandler.h @@ -32,16 +32,13 @@ namespace ManaServ { -class NpcHandler : public MessageHandler, public Net::NpcHandler, - public Mana::Listener +class NpcHandler : public MessageHandler, public Net::NpcHandler { public: NpcHandler(); void handleMessage(Net::MessageIn &msg); - void event(Channels channel, const Mana::Event &event); - void startShopping(int beingId); void buy(int beingId); @@ -53,6 +50,22 @@ class NpcHandler : public MessageHandler, public Net::NpcHandler, void sellItem(int beingId, int itemId, int amount); void endShopping(int beingId); + + void talk(int npcId); + + void nextDialog(int npcId); + + void closeDialog(int npcId); + + void menuSelect(int npcId, int choice); + + void integerInput(int npcId, int value); + + void stringInput(int npcId, const std::string &value); + + void sendLetter(int npcId, const std::string &recipient, + const std::string &text); + }; } // namespace ManaServ -- cgit v1.2.3-70-g09d2