2023-01-02 13:17:18 -06:00
|
|
|
#ifndef NET_CONNECTION_REALM_CONNECTION_HPP
|
|
|
|
|
#define NET_CONNECTION_REALM_CONNECTION_HPP
|
|
|
|
|
|
|
|
|
|
#include "net/connection/NetClient.hpp"
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
class CDataStore;
|
|
|
|
|
class RealmResponse;
|
|
|
|
|
|
|
|
|
|
class RealmConnection : public NetClient {
|
|
|
|
|
public:
|
2023-02-25 15:59:30 -06:00
|
|
|
// Types
|
|
|
|
|
struct REALMCONNECTIONNODE : TSLinkedNode<REALMCONNECTIONNODE> {
|
|
|
|
|
RealmConnection* connection;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Static variables
|
|
|
|
|
SCritSect static s_AllRealmConnectionsCrit;
|
|
|
|
|
STORM_LIST(REALMCONNECTIONNODE) static s_AllRealmConnections;
|
|
|
|
|
|
2023-01-02 13:17:18 -06:00
|
|
|
// Static functions
|
|
|
|
|
int32_t static MessageHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
2023-02-25 15:59:30 -06:00
|
|
|
void static PollNet();
|
2023-01-02 13:17:18 -06:00
|
|
|
|
|
|
|
|
// Member variables
|
|
|
|
|
RealmResponse* m_realmResponse;
|
2023-04-03 18:00:18 -05:00
|
|
|
uint8_t m_authenticated = 0;
|
|
|
|
|
uint32_t m_queuePosition = 0;
|
|
|
|
|
uint32_t m_freeCharacterMigration = 0;
|
|
|
|
|
uint32_t m_billingTimeRemaining = 0;
|
|
|
|
|
uint32_t m_billingTimeRested = 0;
|
|
|
|
|
uint8_t m_billingFlags = 0;
|
|
|
|
|
uint8_t m_accountExpansion = 0;
|
2023-01-02 13:17:18 -06:00
|
|
|
|
2023-02-25 15:59:30 -06:00
|
|
|
// Virtual member functions
|
|
|
|
|
virtual int32_t HandleAuthChallenge(AuthenticationChallenge* challenge);
|
|
|
|
|
|
2023-01-02 13:17:18 -06:00
|
|
|
// Member functions
|
|
|
|
|
RealmConnection(RealmResponse* realmResponse);
|
2023-04-03 18:00:18 -05:00
|
|
|
int32_t HandleAuthResponse(uint32_t msgId, uint32_t time, CDataStore* msg);
|
2023-02-11 20:46:32 -06:00
|
|
|
void SetSelectedRealm(uint32_t a2, uint32_t a3, uint32_t a4);
|
2023-01-02 13:17:18 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|