2017-01-20 08:36:52 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Party : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Party();
|
|
|
|
~Party();
|
|
|
|
|
|
|
|
static Network::Address Target();
|
|
|
|
static void Connect(Network::Address target);
|
|
|
|
static const char* GetLobbyInfo(SteamID lobby, std::string key);
|
|
|
|
static void RemoveLobby(SteamID lobby);
|
|
|
|
|
|
|
|
static bool PlaylistAwaiting();
|
|
|
|
static void PlaylistContinue();
|
|
|
|
static void PlaylistError(std::string error);
|
|
|
|
|
|
|
|
static void ConnectError(std::string message);
|
|
|
|
|
2017-07-12 13:36:18 -04:00
|
|
|
static bool IsInUserMapLobby();
|
|
|
|
static bool IsInLobby();
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
static std::string GetMotd();
|
|
|
|
|
|
|
|
private:
|
|
|
|
class JoinContainer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Network::Address target;
|
|
|
|
std::string challenge;
|
|
|
|
std::string motd;
|
|
|
|
DWORD joinTime;
|
|
|
|
bool valid;
|
|
|
|
int matchType;
|
|
|
|
|
|
|
|
Utils::InfoString info;
|
|
|
|
|
|
|
|
// Party-specific stuff
|
|
|
|
DWORD requestTime;
|
|
|
|
bool awaitingPlaylist;
|
|
|
|
};
|
|
|
|
|
|
|
|
static JoinContainer Container;
|
|
|
|
static std::map<uint64_t, Network::Address> LobbyMap;
|
|
|
|
|
|
|
|
static SteamID GenerateLobbyId();
|
|
|
|
|
|
|
|
static Game::dvar_t* RegisterMinPlayers(const char* name, int value, int min, int max, Game::dvar_flag flag, const char* description);
|
|
|
|
|
|
|
|
static DWORD UIDvarIntStub(char* dvar);
|
|
|
|
};
|
|
|
|
}
|