summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/charserverhandler.h')
-rw-r--r--src/net/charserverhandler.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h
index 16d2c361..ab4ca1c7 100644
--- a/src/net/charserverhandler.h
+++ b/src/net/charserverhandler.h
@@ -28,9 +28,13 @@
#include "../lockedarray.h"
+class CharCreateDialog;
class LocalPlayer;
class LoginData;
+/**
+ * Deals with incoming messages from the character server.
+ */
class CharServerHandler : public MessageHandler
{
public:
@@ -38,15 +42,26 @@ class CharServerHandler : public MessageHandler
void handleMessage(MessageIn *msg);
- void setCharInfo(LockedArray<LocalPlayer*> *charInfo) { mCharInfo = charInfo; };
+ void setCharInfo(LockedArray<LocalPlayer*> *charInfo)
+ { mCharInfo = charInfo; }
+
+ void setLoginData(LoginData *loginData)
+ { mLoginData = loginData; }
- void setLoginData(LoginData *loginData) { mLoginData = loginData; };
+ /**
+ * 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)
+ { mCharCreateDialog = window; }
protected:
LoginData *mLoginData;
LockedArray<LocalPlayer*> *mCharInfo;
+ CharCreateDialog *mCharCreateDialog;
- LocalPlayer* readPlayerData(MessageIn *msg, int &slot);
+ LocalPlayer* readPlayerData(MessageIn &msg, int &slot);
};
#endif