~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/net/ea/loginhandler.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
    client->setState(STATE_REGISTER);
65
65
}
66
66
 
67
 
void LoginHandler::loginAccount(LoginData *const loginData) const
 
67
void LoginHandler::loginAccount(LoginData *const loginData1) const
68
68
{
69
 
    if (loginData)
 
69
    if (loginData1)
70
70
    {
71
71
        // Since we're attempting to use the tAthena protocol,
72
72
        // let's reset the character slots to the good value,
73
73
        // in case we just logged out a Manaserv server
74
74
        // with a different config.
75
 
        loginData->resetCharacterSlots();
 
75
        loginData1->resetCharacterSlots();
76
76
 
77
 
        sendLoginRegister(loginData->username, loginData->password, "");
 
77
        sendLoginRegister(loginData1->username, loginData1->password, "");
78
78
    }
79
79
}
80
80
 
96
96
    client->setState(STATE_UPDATE);
97
97
}
98
98
 
99
 
void LoginHandler::registerAccount(LoginData *const loginData) const
 
99
void LoginHandler::registerAccount(LoginData *const loginData1) const
100
100
{
101
 
    if (!loginData)
 
101
    if (!loginData1)
102
102
        return;
103
103
 
104
 
    std::string username = loginData->username;
105
 
    switch (loginData->gender)
 
104
    std::string username = loginData1->username;
 
105
    switch (loginData1->gender)
106
106
    {
107
107
        case GENDER_FEMALE:
108
108
            username.append("_F");
118
118
            break;
119
119
    }
120
120
 
121
 
    sendLoginRegister(username, loginData->password, loginData->email);
 
121
    sendLoginRegister(username, loginData1->password, loginData1->email);
122
122
}
123
123
 
124
124
Worlds LoginHandler::getWorlds() const