mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(net): use LoginResponse::UpdateLoginStatus to adjust states in GruntLogin::LogonResult
This commit is contained in:
parent
5355b75768
commit
153b25ede9
3 changed files with 12 additions and 30 deletions
|
|
@ -1,12 +1,16 @@
|
|||
#include "net/login/LoginResponse.hpp"
|
||||
#include "net/grunt/Grunt.hpp"
|
||||
#include <storm/String.hpp>
|
||||
|
||||
void LoginResponse::UpdateLoginStatus(LOGIN_STATE state, LOGIN_RESULT result, const char* a4, uint16_t a5) {
|
||||
void LoginResponse::UpdateLoginStatus(LOGIN_STATE state, LOGIN_RESULT result, const char* addrStr, uint16_t flags) {
|
||||
this->m_loginState = state;
|
||||
this->m_loginResult = result;
|
||||
|
||||
// TODO string lookups
|
||||
const char* stateStr = nullptr;
|
||||
const char* resultStr = nullptr;
|
||||
char stateStr[64];
|
||||
SStrCopy(stateStr, Grunt::g_LoginStateStringNames[LOGIN_STATE_AUTHENTICATED], sizeof(stateStr));
|
||||
|
||||
this->LoginServerStatus(state, result, a4, stateStr, resultStr, a5);
|
||||
char resultStr[64];
|
||||
SStrCopy(resultStr, Grunt::g_LoginResultStringNames[LOGIN_OK], sizeof(resultStr));
|
||||
|
||||
this->LoginServerStatus(state, result, addrStr, stateStr, resultStr, flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue