mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(client): prepare EnterWorld classes and methods
This commit is contained in:
parent
babeb2d864
commit
140bcde493
12 changed files with 93 additions and 7 deletions
|
|
@ -141,6 +141,15 @@ void ClientConnection::GetCharacterList() {
|
|||
}
|
||||
}
|
||||
|
||||
void ClientConnection::CharacterLogin(uint64_t id) {
|
||||
this->Initiate(COP_LOGIN_CHARACTER, 76, nullptr);
|
||||
if (this->m_connected) {
|
||||
this->RequestCharacterLogin(id);
|
||||
} else {
|
||||
this->Cancel(4);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientConnection::Cancel(int32_t errorCode) {
|
||||
this->Complete(0, errorCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class ClientConnection : public RealmConnection {
|
|||
void AccountLogin_Finish(int32_t authResult);
|
||||
void AccountLogin_Queued();
|
||||
void GetCharacterList();
|
||||
void CharacterLogin(uint64_t id);
|
||||
void Cancel(int32_t errorCode);
|
||||
void Cleanup();
|
||||
void Connect();
|
||||
|
|
|
|||
|
|
@ -281,3 +281,11 @@ void RealmConnection::RequestCharacterEnum() {
|
|||
msg.Finalize();
|
||||
this->Send(&msg);
|
||||
}
|
||||
|
||||
void RealmConnection::RequestCharacterLogin(uint64_t id) {
|
||||
CDataStore msg;
|
||||
msg.Put(static_cast<uint32_t>(CMSG_PLAYER_LOGIN));
|
||||
msg.Put(id);
|
||||
msg.Finalize();
|
||||
this->Send(&msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class RealmConnection : public NetClient {
|
|||
int32_t HandleCharEnum(uint32_t msgId, uint32_t time, CDataStore* msg);
|
||||
void SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4);
|
||||
void RequestCharacterEnum();
|
||||
void RequestCharacterLogin(uint64_t id);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue