summaryrefslogtreecommitdiff
path: root/src/net/tmwserv/charserverhandler.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-06 16:05:54 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-06 16:07:03 -0600
commit8209e4672c5e11e5d7bbfb1fcfb081eda1763a6d (patch)
tree461c06a2e42fc54684bd61ef5ae9ff8cc83d8f07 /src/net/tmwserv/charserverhandler.h
parentbbebd24b5561e9cd806dca8ccd6fe4b4dcb1301d (diff)
downloadmana-8209e4672c5e11e5d7bbfb1fcfb081eda1763a6d.tar.gz
mana-8209e4672c5e11e5d7bbfb1fcfb081eda1763a6d.tar.bz2
mana-8209e4672c5e11e5d7bbfb1fcfb081eda1763a6d.tar.xz
mana-8209e4672c5e11e5d7bbfb1fcfb081eda1763a6d.zip
Implement TMWServ's CharHandler
Also cleanup character creation, which isn't functional at the moment.
Diffstat (limited to 'src/net/tmwserv/charserverhandler.h')
-rw-r--r--src/net/tmwserv/charserverhandler.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/net/tmwserv/charserverhandler.h b/src/net/tmwserv/charserverhandler.h
index e1e13b55..a5e1fa50 100644
--- a/src/net/tmwserv/charserverhandler.h
+++ b/src/net/tmwserv/charserverhandler.h
@@ -22,18 +22,20 @@
#ifndef NET_TMWSERV_CHARSERVERHANDLER_H
#define NET_TMWSERV_CHARSERVERHANDLER_H
+#include "net/charhandler.h"
#include "net/messagehandler.h"
#include "lockedarray.h"
-class CharCreateDialog;
class LocalPlayer;
class LoginData;
+namespace TmwServ {
+
/**
* Deals with incoming messages related to character selection.
*/
-class CharServerHandler : public MessageHandler
+class CharServerHandler : public MessageHandler, public Net::CharHandler
{
public:
CharServerHandler();
@@ -50,8 +52,15 @@ class CharServerHandler : public MessageHandler
* 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)
- { mCharCreateDialog = window; }
+ void setCharCreateDialog(CharCreateDialog *window);
+
+ void chooseCharacter(int slot, LocalPlayer* character);
+
+ void newCharacter(const std::string &name, int slot,
+ bool gender, int hairstyle, int hairColor,
+ std::vector<int> stats);
+
+ void deleteCharacter(int slot, LocalPlayer* character);
protected:
void handleCharCreateResponse(MessageIn &msg);
@@ -65,4 +74,6 @@ class CharServerHandler : public MessageHandler
readPlayerData(MessageIn &msg, int &slot);
};
+} // namespace TmwServ
+
#endif