summaryrefslogtreecommitdiff
path: root/src/net/tmwa/charserverhandler.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-28 03:27:26 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-28 22:22:17 +0300
commit0cc6167c407c1cf18158ca0e154a3b1cab48853d (patch)
treef1e0fe4300113d3bb969bc72e5712ec84b4e2ab5 /src/net/tmwa/charserverhandler.h
parent7b15124d28592ee7b9248c9ff3b19e710c1ce4ee (diff)
downloadplus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.tar.gz
plus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.tar.bz2
plus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.tar.xz
plus-0cc6167c407c1cf18158ca0e154a3b1cab48853d.zip
Extract shared logic from charserverhandler and loginhandler netcode to ea namespace.
Diffstat (limited to 'src/net/tmwa/charserverhandler.h')
-rw-r--r--src/net/tmwa/charserverhandler.h29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index 62ff2b4de..4bd3153e8 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -24,10 +24,14 @@
#define NET_TA_CHARSERVERHANDLER_H
#include "net/charhandler.h"
+
+#include "net/ea/charserverhandler.h"
+
#include "net/serverinfo.h"
#include "net/tmwa/messagehandler.h"
-#include "net/tmwa/token.h"
+
+#include "net/ea/token.h"
#ifdef __GNUC__
#define A_UNUSED __attribute__ ((unused))
@@ -43,24 +47,13 @@ namespace TmwAthena
/**
* Deals with incoming messages from the character server.
*/
-class CharServerHandler : public MessageHandler, public Net::CharHandler
+class CharServerHandler : public MessageHandler, public Ea::CharServerHandler
{
public:
CharServerHandler();
virtual void handleMessage(Net::MessageIn &msg);
- void setCharSelectDialog(CharSelectDialog *window);
-
- /**
- * Sets the character create dialog. The handler will clean up this
- * dialog when a new character is succesfully created, and will unlock
- * the dialog when a new character failed to be created.
- */
- void setCharCreateDialog(CharCreateDialog *window);
-
- void requestCharacters();
-
void chooseCharacter(Net::Character *character);
void newCharacter(const std::string &name, int slot,
@@ -72,15 +65,11 @@ class CharServerHandler : public MessageHandler, public Net::CharHandler
void switchCharacter();
- unsigned int baseSprite() const;
-
- unsigned int hairSprite() const;
-
- unsigned int maxSprite() const;
-
void connect();
- private:
+ void processCharLogin(Net::MessageIn &msg);
+
+ protected:
void readPlayerData(Net::MessageIn &msg, Net::Character *character,
bool withColors);
};