From d20b79683997990a1b46ac8d4117f9195aa278f2 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 2 Apr 2009 14:54:43 +0200 Subject: Some cleanup and renaming * Removed superfluous 'virtual' keyword in *Handler implementations * Renamed NPCHandler to NpcHandler * Renamed InvyHandler to InventoryHandler * Made all *Handler interface methods pure virtual * Used forward declarations in net.h * Renamed {start,end}Shoping to {start,end}Shopping --- src/net/npchandler.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src/net/npchandler.h') diff --git a/src/net/npchandler.h b/src/net/npchandler.h index 18e52b48..1f211c41 100644 --- a/src/net/npchandler.h +++ b/src/net/npchandler.h @@ -25,36 +25,38 @@ #include namespace Net { + class NpcHandler { public: - virtual void talk(int npcId) {} + virtual void talk(int npcId) = 0; - virtual void nextDialog(int npcId) {} + virtual void nextDialog(int npcId) = 0; - virtual void closeDialog(int npcId) {} + virtual void closeDialog(int npcId) = 0; - virtual void listInput(int npcId, int value) {} + virtual void listInput(int npcId, int value) = 0; - virtual void integerInput(int npcId, int value){} + virtual void integerInput(int npcId, int value) = 0; - virtual void stringInput(int npcId, const std::string &value) {} + virtual void stringInput(int npcId, const std::string &value) = 0; virtual void sendLetter(int npcId, const std::string &recipient, - const std::string &text) {} + const std::string &text) = 0; - virtual void startShoping(int beingId) {} + virtual void startShopping(int beingId) = 0; - virtual void buy(int beingId) {} + virtual void buy(int beingId) = 0; - virtual void sell(int beingId) {} + virtual void sell(int beingId) = 0; - virtual void buyItem(int beingId, int itemId, int ammount) {} + virtual void buyItem(int beingId, int itemId, int ammount) = 0; - virtual void sellItem(int beingId, int itemId, int ammount) {} + virtual void sellItem(int beingId, int itemId, int ammount) = 0; - virtual void endShoping(int beingId) {} + virtual void endShopping(int beingId) = 0; }; -} + +} // namespace Net #endif // NPCHANDLER_H -- cgit v1.2.3-70-g09d2