mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(glue): implement character login in CGlueMgr::PollEnterWorld
This commit is contained in:
parent
737de968f7
commit
509cec3f94
@ -617,16 +617,21 @@ void CGlueMgr::PollEnterWorld() {
|
|||||||
CGlueMgr::m_showedDisconnect = 0;
|
CGlueMgr::m_showedDisconnect = 0;
|
||||||
|
|
||||||
// TODO SI Logic
|
// TODO SI Logic
|
||||||
// TODO ClientConnection::CharacterLogin()
|
|
||||||
|
// TODO TLS shenanigans with guid
|
||||||
|
ClientServices::Connection()->CharacterLogin(CGlueMgr::m_characterInfo->info.guid, 0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Get map ID and position from character info
|
uint32_t mapId = CGlueMgr::m_characterInfo->info.mapID;
|
||||||
uint32_t mapId = 0;
|
C3Vector position = CGlueMgr::m_characterInfo->info.position;
|
||||||
C3Vector position = { 0.0f, 0.0f, 0.0f };
|
|
||||||
|
// TODO TLS shenanigans with guid
|
||||||
|
// TODO first login logic (play intro M2?)
|
||||||
|
|
||||||
CGlueMgr::Suspend();
|
CGlueMgr::Suspend();
|
||||||
|
|
||||||
ClientInitializeGame(mapId, position);
|
ClientInitializeGame(mapId, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,16 @@ void ClientConnection::Cancel(int32_t errorCode) {
|
|||||||
this->Complete(0, errorCode);
|
this->Complete(0, errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientConnection::CharacterLogin(uint64_t guid, int32_t a2) {
|
||||||
|
this->Initiate(COP_LOGIN_CHARACTER, 76, nullptr);
|
||||||
|
|
||||||
|
if (this->m_connected) {
|
||||||
|
this->RequestCharacterLogin(guid, a2);
|
||||||
|
} else {
|
||||||
|
this->Cancel(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ClientConnection::Cleanup() {
|
void ClientConnection::Cleanup() {
|
||||||
if (this->m_cleanup) {
|
if (this->m_cleanup) {
|
||||||
this->m_cleanup();
|
this->m_cleanup();
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class ClientConnection : public RealmConnection {
|
|||||||
void AccountLogin_Finish(int32_t authResult);
|
void AccountLogin_Finish(int32_t authResult);
|
||||||
void AccountLogin_Queued();
|
void AccountLogin_Queued();
|
||||||
void Cancel(int32_t errorCode);
|
void Cancel(int32_t errorCode);
|
||||||
|
void CharacterLogin(uint64_t guid, int32_t a2);
|
||||||
void Cleanup();
|
void Cleanup();
|
||||||
void Complete(int32_t result, int32_t errorCode);
|
void Complete(int32_t result, int32_t errorCode);
|
||||||
void Connect();
|
void Connect();
|
||||||
|
|||||||
@ -294,6 +294,17 @@ void RealmConnection::RequestCharacterEnum() {
|
|||||||
this->Send(&msg);
|
this->Send(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RealmConnection::RequestCharacterLogin(uint64_t guid, int32_t a2) {
|
||||||
|
CDataStore msg;
|
||||||
|
|
||||||
|
msg.Put(static_cast<uint32_t>(CMSG_PLAYER_LOGIN));
|
||||||
|
msg.Put(guid);
|
||||||
|
|
||||||
|
msg.Finalize();
|
||||||
|
|
||||||
|
this->Send(&msg);
|
||||||
|
}
|
||||||
|
|
||||||
void RealmConnection::SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4) {
|
void RealmConnection::SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4) {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ class RealmConnection : public NetClient {
|
|||||||
int32_t HandleAuthResponse(uint32_t msgId, uint32_t time, CDataStore* msg);
|
int32_t HandleAuthResponse(uint32_t msgId, uint32_t time, CDataStore* msg);
|
||||||
int32_t HandleCharEnum(uint32_t msgId, uint32_t time, CDataStore* msg);
|
int32_t HandleCharEnum(uint32_t msgId, uint32_t time, CDataStore* msg);
|
||||||
void RequestCharacterEnum();
|
void RequestCharacterEnum();
|
||||||
|
void RequestCharacterLogin(uint64_t guid, int32_t a2);
|
||||||
void SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4);
|
void SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user