diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-22 23:53:13 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-22 23:53:13 +0000 |
commit | 82c7ecf7a838c43771a676bb9311f9a1fc403f67 (patch) | |
tree | b7bb6316c5b1f9da06f75d7dbb0f13b2c4aaa259 /src/net/charserverhandler.h | |
parent | f6bd7da487f163d8ce6fa6975229715f11e1c3bb (diff) | |
download | mana-client-82c7ecf7a838c43771a676bb9311f9a1fc403f67.tar.gz mana-client-82c7ecf7a838c43771a676bb9311f9a1fc403f67.tar.bz2 mana-client-82c7ecf7a838c43771a676bb9311f9a1fc403f67.tar.xz mana-client-82c7ecf7a838c43771a676bb9311f9a1fc403f67.zip |
Clarified the error message when character creation fails and made sure the
character creation dialog doesn't close when creation failed.
Diffstat (limited to 'src/net/charserverhandler.h')
-rw-r--r-- | src/net/charserverhandler.h | 21 |
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 |