diff options
Diffstat (limited to 'src/net/logindata.h')
-rw-r--r-- | src/net/logindata.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/net/logindata.h b/src/net/logindata.h index 7f729559..4a1c1a9f 100644 --- a/src/net/logindata.h +++ b/src/net/logindata.h @@ -31,12 +31,11 @@ class LoginData public: /** * Constructor - * - * Initialize character slots to 3 for TmwAthena compatibility */ - LoginData(): - characterSlots(3) - {} + LoginData() + { + resetCharacterSlots(); + } std::string username; std::string password; @@ -53,6 +52,14 @@ public: unsigned short characterSlots; /**< The number of character slots */ + /** + * Initialize character slots to 3 for TmwAthena compatibility + */ + void resetCharacterSlots() + { + characterSlots = 3; // Default value, used for TmwAthena. + } + void clear() { username.clear(); @@ -62,7 +69,7 @@ public: email.clear(); captchaResponse.clear(); gender = GENDER_UNSPECIFIED; - characterSlots = 3; // Default value, used for TmwAthena. + resetCharacterSlots(); } }; |