-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameRoom.hpp
More file actions
72 lines (62 loc) · 1.41 KB
/
GameRoom.hpp
File metadata and controls
72 lines (62 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#pragma once
#include <vector>
#include <string>
class Player;
#include <filesystem>
#include <iostream>
#include "pugixml.hpp"
#include <string>
#define enumeration enum
enumeration WARFACE_TEAMS : int
{
blackwood = 2,
warface = 1
};
class Client;
class IqClass;
struct GameRoomCustomParams {
bool friendly_fire;
bool enemy_outlines;
bool auto_team_balance;
bool join_in_the_process;
uint32_t max_players;
uint32_t round_limit;
int32_t preround_time;
uint32_t class_restriction;
uint64_t inventory_slot;
bool locked_spectator_camera;
bool high_latency_autokick;
bool overtime_mode;
bool preset_weapon;
};
struct GameRoomCore {
uint32_t room_type;
uint32_t teams_switched;
std::string room_name;
bool isPrivateRoom;
bool can_start;
uint32_t min_ready_players;
bool can_pause;
bool room_closed;
std::string mission;
GameRoomCustomParams* m_pCustomParams;
};
struct GameRoom {
public:
std::string group_id;
std::string Token;
GameRoomCore* m_pGameRoomCore;
uint32_t RoomID;
uint32_t Revision = 0;
int CountPlayers;
void Get();
Player* RoomMaster = NULL;
void Create(Player* Profile, std::string room_name);
void Sync(Client* client, IqClass* iq);
void Leave(Client* client);
pugi::xml_node Serialize(Client* client);
std::vector<Player*> m_GameRoomsPlayers;
};
namespace Roomed {
static std::vector<GameRoom*> m_GameRooms;
}