Offline mode can be used even when online.
Allow the user to pick a player name for offline mode. Big auth refactor. Now using session objects instead of the accounts themselves. Sessions only last for one instance start and hold all the auth and player data.
This commit is contained in:
@ -35,6 +35,21 @@ class YggdrasilTask : public Task
|
||||
public:
|
||||
explicit YggdrasilTask(MojangAccount * account, QObject *parent = 0);
|
||||
|
||||
/**
|
||||
* assign a session to this task. the session will be filled with required infomration
|
||||
* upon completion
|
||||
*/
|
||||
void assignSession(AuthSessionPtr session)
|
||||
{
|
||||
m_session = session;
|
||||
}
|
||||
|
||||
/// get the assigned session for filling with information.
|
||||
AuthSessionPtr getAssignedSession()
|
||||
{
|
||||
return m_session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class describing a Yggdrasil error response.
|
||||
*/
|
||||
@ -117,4 +132,6 @@ protected:
|
||||
|
||||
const int timeout_max = 10000;
|
||||
const int time_step = 50;
|
||||
|
||||
AuthSessionPtr m_session;
|
||||
};
|
||||
|
Reference in New Issue
Block a user