mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(net): update RealmConnection::HandleCharEnum to use virtual call of RealmResponse::CharacterListReceived
This commit is contained in:
parent
1e8dc7aef9
commit
d536140d63
4 changed files with 16 additions and 10 deletions
|
|
@ -240,10 +240,10 @@ int32_t RealmConnection::HandleCharEnum(uint32_t msgId, uint32_t time, CDataStor
|
|||
}
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
int32_t success = 0;
|
||||
if (msg->IsRead()) {
|
||||
if (!overflow) {
|
||||
success = true;
|
||||
success = 1;
|
||||
}
|
||||
} else if (!overflow) {
|
||||
// TODO: Proper implementation
|
||||
|
|
@ -259,7 +259,7 @@ int32_t RealmConnection::HandleCharEnum(uint32_t msgId, uint32_t time, CDataStor
|
|||
msg->Get(value);
|
||||
msg->Get(value);
|
||||
if (msg->IsRead()) {
|
||||
success = true;
|
||||
success = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -267,13 +267,7 @@ int32_t RealmConnection::HandleCharEnum(uint32_t msgId, uint32_t time, CDataStor
|
|||
m_characterList.Clear();
|
||||
}
|
||||
|
||||
// TODO: Should be implemented as call of sub_6B2000
|
||||
if (success) {
|
||||
this->Complete(1, 44);
|
||||
} else {
|
||||
this->Complete(1, 45);
|
||||
}
|
||||
|
||||
this->m_realmResponse->CharacterListReceived(this, msg, success);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ class RealmResponse {
|
|||
public:
|
||||
// Virtual member functions
|
||||
virtual void HandleAuthResponse(RealmConnection* connection, uint8_t authResult) = 0;
|
||||
virtual void CharacterListReceived(RealmConnection* connection, void* a2, int32_t success) = 0;
|
||||
virtual void GameServerResult(RealmConnection* connection, const char* a3, const char* a4, const char* a5) = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue