From 060b5d24f824de45342c8ea1bab8fc98c08b369d Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 18 Jul 2010 12:11:39 -0600 Subject: Replace some state-related netcode methods with events Also move the virtual destructors of the Net handler base classes to the top of their method lists. Reviewed-by: Chuck Miller --- src/net/tmwa/gamehandler.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/net/tmwa/gamehandler.h') diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h index 101e7972..6bdcbaef 100644 --- a/src/net/tmwa/gamehandler.h +++ b/src/net/tmwa/gamehandler.h @@ -22,6 +22,8 @@ #ifndef NET_TA_MAPHANDLER_H #define NET_TA_MAPHANDLER_H +#include "listener.h" + #include "net/gamehandler.h" #include "net/net.h" #include "net/serverinfo.h" @@ -31,23 +33,22 @@ namespace TmwAthena { -class GameHandler : public MessageHandler, public Net::GameHandler +class GameHandler : public MessageHandler, public Net::GameHandler, + public Mana::Listener { public: GameHandler(); void handleMessage(Net::MessageIn &msg); + void event(const std::string &channel, const Mana::Event &event); + void connect(); bool isConnected(); void disconnect(); - void inGame(); - - void mapLoaded(const std::string &mapName); - void who(); void quit(); @@ -60,7 +61,7 @@ class GameHandler : public MessageHandler, public Net::GameHandler void setMap(const std::string map); - /** The tmwa protocol is making use of the Mp Main status bar. */ + /** The tmwAthena protocol is making use of the MP status bar. */ bool canUseMagicBar() const { return true; } private: -- cgit v1.2.3-70-g09d2