feat(ui): implement Script_GetCharacterListUpdate

This commit is contained in:
fallenoak committed 2025-10-04 19:52:36 -05:00
1 parent 0b1c478f33
commit a5e7ca9a22
9 files changed
+56 -3

No files matched your search

+10
View File
@@ -173,6 +173,16 @@ int32_t ClientConnection::Disconnect() {
return 0;
}
void ClientConnection::GetCharacterList() {
this->Initiate(COP_GET_CHARACTERS, 43, nullptr);
if (this->m_connected) {
this->RequestCharacterEnum();
} else {
this->Cancel(4);
}
}
int32_t ClientConnection::HandleConnect() {
this->Complete(1, 5);
+1
View File
@@ -32,6 +32,7 @@ class ClientConnection : public RealmConnection {
void Complete(int32_t result, int32_t errorCode);
void Connect();
int32_t Disconnect();
void GetCharacterList();
void Initiate(WOWCS_OPS op, int32_t errorCode, void (*cleanup)());
int32_t IsConnected();
int32_t PollStatus(WOWCS_OPS& op, const char** msg, int32_t& result, int32_t& errorCode);
+10
View File
@@ -278,6 +278,16 @@ int32_t RealmConnection::HandleCharEnum(uint32_t msgId, uint32_t time, CDataStor
return 1;
}
void RealmConnection::RequestCharacterEnum() {
CDataStore msg;
msg.Put(static_cast<uint32_t>(CMSG_ENUM_CHARACTERS));
msg.Finalize();
this->Send(&msg);
}
void RealmConnection::SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4) {
// TODO
}
+1
View File
@@ -41,6 +41,7 @@ class RealmConnection : public NetClient {
RealmConnection(RealmResponse* realmResponse);
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 SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4);
};