mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-20 21:14:56 +03:00
feat(glue): implement character login in CGlueMgr::PollEnterWorld
This commit is contained in:
5 files changed
+32
-4
No files matched your search
@@ -23,6 +23,16 @@ void ClientConnection::Cancel(int32_t 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() {
|
||||
if (this->m_cleanup) {
|
||||
this->m_cleanup();
|
||||
|
||||
@@ -30,6 +30,7 @@ class ClientConnection : public RealmConnection {
|
||||
void AccountLogin_Finish(int32_t authResult);
|
||||
void AccountLogin_Queued();
|
||||
void Cancel(int32_t errorCode);
|
||||
void CharacterLogin(uint64_t guid, int32_t a2);
|
||||
void Cleanup();
|
||||
void Complete(int32_t result, int32_t errorCode);
|
||||
void Connect();
|
||||
|
||||
@@ -294,6 +294,17 @@ void RealmConnection::RequestCharacterEnum() {
|
||||
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) {
|
||||
// TODO
|
||||
}
|
||||
@@ -52,6 +52,7 @@ class RealmConnection : public NetClient {
|
||||
int32_t HandleAuthResponse(uint32_t msgId, uint32_t time, CDataStore* msg);
|
||||
int32_t HandleCharEnum(uint32_t msgId, uint32_t time, CDataStore* msg);
|
||||
void RequestCharacterEnum();
|
||||
void RequestCharacterLogin(uint64_t guid, int32_t a2);
|
||||
void SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user