mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(connection): implement character deletion message handlers
This commit is contained in:
parent
68ab5ccced
commit
e3d60d70e8
@ -104,6 +104,10 @@ void ClientConnection::GetRealmList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientConnection::HandleCharacterDelete(uint8_t result) {
|
||||||
|
this->Complete(result == 71, result);
|
||||||
|
}
|
||||||
|
|
||||||
int32_t ClientConnection::HandleConnect() {
|
int32_t ClientConnection::HandleConnect() {
|
||||||
this->Complete(1, 5);
|
this->Complete(1, 5);
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class ClientConnection : public RealmConnection {
|
|||||||
|
|
||||||
// Virtual member functions
|
// Virtual member functions
|
||||||
virtual int32_t HandleConnect();
|
virtual int32_t HandleConnect();
|
||||||
|
virtual void HandleCharacterDelete(uint8_t result);
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
ClientConnection(RealmResponse* realmResponse)
|
ClientConnection(RealmResponse* realmResponse)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ int32_t RealmConnection::MessageHandler(void* param, NETMESSAGE msgId, uint32_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SMSG_DELETE_CHAR: {
|
case SMSG_DELETE_CHAR: {
|
||||||
// TODO
|
result = connection->DeleteCharHandler(msgId, time, msg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,6 +294,15 @@ int32_t RealmConnection::HandleCharEnum(uint32_t msgId, uint32_t time, CDataStor
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t RealmConnection::DeleteCharHandler(uint32_t msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
uint8_t result;
|
||||||
|
msg->Get(result);
|
||||||
|
|
||||||
|
this->HandleCharacterDelete(result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
void RealmConnection::RequestCharacterEnum() {
|
void RealmConnection::RequestCharacterEnum() {
|
||||||
CDataStore msg;
|
CDataStore msg;
|
||||||
|
|
||||||
|
|||||||
@ -46,11 +46,13 @@ class RealmConnection : public NetClient {
|
|||||||
|
|
||||||
// Virtual member functions
|
// Virtual member functions
|
||||||
virtual int32_t HandleAuthChallenge(AuthenticationChallenge* challenge);
|
virtual int32_t HandleAuthChallenge(AuthenticationChallenge* challenge);
|
||||||
|
virtual void HandleCharacterDelete(uint8_t result) = 0;
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
RealmConnection(RealmResponse* realmResponse);
|
RealmConnection(RealmResponse* realmResponse);
|
||||||
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);
|
||||||
|
int32_t DeleteCharHandler(uint32_t msgId, uint32_t time, CDataStore* msg);
|
||||||
void RequestCharacterEnum();
|
void RequestCharacterEnum();
|
||||||
void RequestCharacterLogin(uint64_t guid, int32_t a2);
|
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