00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef NET_TMWSERV_NPCHANDLER_H
00023 #define NET_TMWSERV_NPCHANDLER_H
00024
00025 #include "net/messagehandler.h"
00026 #include "net/npchandler.h"
00027
00028 namespace TmwServ {
00029
00030 class NpcHandler : public MessageHandler, public Net::NpcHandler
00031 {
00032 public:
00033 NpcHandler();
00034
00035 void handleMessage(MessageIn &msg);
00036
00037 void talk(int npcId);
00038
00039 void nextDialog(int npcId);
00040
00041 void closeDialog(int npcId);
00042
00043 void listInput(int npcId, int value);
00044
00045 void integerInput(int npcId, int value);
00046
00047 void stringInput(int npcId, const std::string &value);
00048
00049 void sendLetter(int npcId, const std::string &recipient,
00050 const std::string &text);
00051
00052 void startShopping(int beingId);
00053
00054 void buy(int beingId);
00055
00056 void sell(int beingId);
00057
00058 void buyItem(int beingId, int itemId, int amount);
00059
00060 void sellItem(int beingId, int itemId, int amount);
00061
00062 void endShopping(int beingId);
00063 };
00064
00065 }
00066
00067 #endif