DayZ 1.24
Loading...
Searching...
No Matches
BiosLobbyService.c File Reference

Go to the source code of this file.

Classes

class  GetServerModListResult
 
class  GetFirstServerWithEmptySlotResult
 
class  GetFirstServerWithEmptySlotInput
 GetServersInput the input structure of the GetServers operation. More...
 
class  GetServersResult
 GetServersResult the output structure of the GetServers operation. More...
 
class  GetServersInput
 GetServersInput the input structure of the GetServers operation. More...
 
class  BiosLobbyService
 

Typedefs

typedef Param4< string, string, int, intCachedServerInfo
 
typedef array< ref GetServersResultRowGetServersResultRowArray
 

Enumerations

enum  ESortType {
  HOST , TIME , POPULATION , SLOTS ,
  FAVORITE , PASSWORDED , QUEUE
}
 
enum  ESortOrder { ASCENDING , DESCENDING }
 

Functions

string GetIpPort ()
 
string GetIP ()
 
bool IsSelected ()
 
string GetValueStr (ESortType sort_type)
 
int GetValueInt (ESortType sort_type)
 
int CompareTo (GetServersResultRow other, ESortType sortType)
 

Variables

class GetServerModListResult m_Id
 GetServersResultRow the output structure of the GetServers operation that represents one game server.
 
int m_Priority
 
string m_Name
 
string m_Description
 
string m_HostIp
 
int m_HostPort
 
bool m_Invisible
 
bool m_Official
 
string m_MapNameToRun
 
bool m_Modded
 
int m_ModeId
 
bool m_AntiCheat
 
int m_RegionId
 
int m_MinPlayers
 
int m_MaxPlayers
 
int m_FreeSlots
 
int m_CurrentNumberPlayers
 
int m_PlayersInQueue
 
string m_GameVersion
 
bool m_IsPasswordProtected
 
string m_CreatedAt
 
string m_UpdatedAt
 
bool m_MouseAndKeyboardEnabled
 
bool m_WhitelistEnabled
 
bool m_IsDLC
 
bool m_IsExpanded
 
int m_SortName
 
int m_SortTime
 
bool m_IsSelected
 
string m_CharactersAlive
 
string m_SteamFriends
 
int m_Ping
 
string m_TimeOfDay
 
int m_Disable3rdPerson
 disable3rdPerson servers for mode regular/hardcore
 
float m_EnvironmentTimeMul
 time multiplier of environment
 
float m_EnvironmentNightTimeMul
 
bool m_AllowedFilePatching
 
string m_ShardId
 
int m_SteamQueryPort
 
bool m_Favorite
 

Typedef Documentation

◆ CachedServerInfo

Definition at line 2 of file BiosLobbyService.c.

◆ GetServersResultRowArray

Enumeration Type Documentation

◆ ESortOrder

Enumerator
ASCENDING 
DESCENDING 

Definition at line 18 of file BiosLobbyService.c.

19{
22};
@ ASCENDING
@ DESCENDING

◆ ESortType

Enumerator
HOST 
TIME 
POPULATION 
SLOTS 
FAVORITE 
PASSWORDED 
QUEUE 

Definition at line 6 of file BiosLobbyService.c.

7{
8 HOST,
9 TIME,
11 SLOTS,
12 PING
15 QUEUE
16};
@ QUEUE
@ HOST
@ PASSWORDED
@ SLOTS
@ POPULATION
@ TIME
@ FAVORITE
@ PING

Function Documentation

◆ CompareTo()

int CompareTo ( GetServersResultRow other,
ESortType sortType )

Definition at line 153 of file BiosLobbyService.c.

154 {
155 // string comparison
156 if (sortType == ESortType.HOST)
157 {
158 string val1 = this.GetValueStr(ESortType.HOST);
159 string val2 = other.GetValueStr(ESortType.HOST);
160
161 if (val1 == val2)
162 return 0;
163
164 if (val1 < val2)
165 return 1;
166
167 return -1;
168 }
169
170 // int comparison
171 int comparisonResult = other.GetValueInt(sortType) - this.GetValueInt(sortType);
172 if (comparisonResult == 0)
173 {
174 // if sorting by POPULATION, break ties using QUEUE size
175 if (sortType == ESortType.POPULATION)
176 comparisonResult = this.CompareTo(other, ESortType.QUEUE);
177 }
178
179 return comparisonResult;
180 }
ESortType
int GetValueInt(ESortType sort_type)
int CompareTo(GetServersResultRow other, ESortType sortType)
string GetValueStr(ESortType sort_type)

References CompareTo(), GetValueInt(), and GetValueStr().

Referenced by CompareTo().

◆ GetIP()

string GetIP ( )

Definition at line 92 of file BiosLobbyService.c.

93 {
94#ifdef PLATFORM_WINDOWS
95 // Hack - In new Serverborwser on PC has bad m_HostIp but ID contains correct IP
97 m_Id.Split(":", parts);
98 return parts[0];
99#else
100 return m_HostIp;
101#endif
102 }
class GetServerModListResult m_Id
GetServersResultRow the output structure of the GetServers operation that represents one game server.
string m_HostIp

References m_HostIp, and m_Id.

Referenced by GetIpPort().

◆ GetIpPort()

string GetIpPort ( )

Definition at line 83 of file BiosLobbyService.c.

84 {
85#ifdef PLATFORM_WINDOWS
86 return m_Id;
87#else
88 return GetIP() + ":" + m_HostPort;
89#endif
90 }
string GetIP()
int m_HostPort

References GetIP(), m_HostPort, and m_Id.

◆ GetValueInt()

int GetValueInt ( ESortType sort_type)

Definition at line 122 of file BiosLobbyService.c.

123 {
124 switch (sort_type)
125 {
126 case ESortType.TIME:
127 {
128 return m_SortTime;
129 }
130 case ESortType.POPULATION:
131 {
133 }
134 case ESortType.SLOTS:
135 {
136 return m_MaxPlayers;
137 }
138 case ESortType.PING:
139 {
140 return m_Ping;
141 }
142 case ESortType.QUEUE:
143 {
144 return m_PlayersInQueue;
145 }
146 }
147 return 0;
148 }
int m_SortTime
int m_PlayersInQueue
int m_Ping
int m_MaxPlayers
int m_CurrentNumberPlayers

References m_CurrentNumberPlayers, m_MaxPlayers, m_Ping, m_PlayersInQueue, and m_SortTime.

Referenced by CompareTo(), ServerBrowserTab::SortedInsertAsc(), and ServerBrowserTab::SortedInsertDesc().

◆ GetValueStr()

string GetValueStr ( ESortType sort_type)

Definition at line 109 of file BiosLobbyService.c.

110 {
111 switch (sort_type)
112 {
113 case ESortType.HOST:
114 {
115 return m_Name;
116 }
117 }
118
119 return "";
120 }
string m_Name

References m_Name.

Referenced by CompareTo(), ServerBrowserTab::SortedInsertAsc(), and ServerBrowserTab::SortedInsertDesc().

◆ IsSelected()

bool IsSelected ( )

Definition at line 104 of file BiosLobbyService.c.

105 {
106 return m_IsSelected;
107 }
bool m_IsSelected

References m_IsSelected.

Variable Documentation

◆ m_AllowedFilePatching

bool m_AllowedFilePatching

Definition at line 77 of file BiosLobbyService.c.

◆ m_AntiCheat

bool m_AntiCheat

Definition at line 44 of file BiosLobbyService.c.

◆ m_CharactersAlive

string m_CharactersAlive

Definition at line 66 of file BiosLobbyService.c.

◆ m_CreatedAt

string m_CreatedAt

Definition at line 53 of file BiosLobbyService.c.

◆ m_CurrentNumberPlayers

int m_CurrentNumberPlayers

Definition at line 49 of file BiosLobbyService.c.

Referenced by GetValueInt().

◆ m_Description

string m_Description

Definition at line 36 of file BiosLobbyService.c.

◆ m_Disable3rdPerson

int m_Disable3rdPerson

disable3rdPerson servers for mode regular/hardcore

Definition at line 73 of file BiosLobbyService.c.

◆ m_EnvironmentNightTimeMul

float m_EnvironmentNightTimeMul

Definition at line 76 of file BiosLobbyService.c.

◆ m_EnvironmentTimeMul

float m_EnvironmentTimeMul

time multiplier of environment

Definition at line 75 of file BiosLobbyService.c.

◆ m_Favorite

◆ m_FreeSlots

int m_FreeSlots

Definition at line 48 of file BiosLobbyService.c.

◆ m_GameVersion

string m_GameVersion

Definition at line 51 of file BiosLobbyService.c.

◆ m_HostIp

string m_HostIp

Definition at line 37 of file BiosLobbyService.c.

Referenced by GetIP().

◆ m_HostPort

int m_HostPort

Definition at line 38 of file BiosLobbyService.c.

Referenced by GetIpPort().

◆ m_Id

GetServersResultRow the output structure of the GetServers operation that represents one game server.

Referenced by GetId(), GetIP(), GetIpPort(), SoundHandlerBase::Init(), PluginBase::PluginVariables(), RadialQuickbarItem(), UIScriptedMenu::RegisterTab(), and PluginBase::RegisterVariable().

◆ m_Invisible

bool m_Invisible

Definition at line 39 of file BiosLobbyService.c.

◆ m_IsDLC

bool m_IsDLC

Definition at line 57 of file BiosLobbyService.c.

◆ m_IsExpanded

◆ m_IsPasswordProtected

bool m_IsPasswordProtected

Definition at line 52 of file BiosLobbyService.c.

◆ m_IsSelected

bool m_IsSelected

Definition at line 63 of file BiosLobbyService.c.

Referenced by IsSelected().

◆ m_MapNameToRun

string m_MapNameToRun

Definition at line 41 of file BiosLobbyService.c.

◆ m_MaxPlayers

int m_MaxPlayers

Definition at line 47 of file BiosLobbyService.c.

Referenced by GetValueInt().

◆ m_MinPlayers

int m_MinPlayers

Definition at line 46 of file BiosLobbyService.c.

◆ m_Modded

bool m_Modded

Definition at line 42 of file BiosLobbyService.c.

◆ m_ModeId

int m_ModeId

Definition at line 43 of file BiosLobbyService.c.

◆ m_MouseAndKeyboardEnabled

bool m_MouseAndKeyboardEnabled

Definition at line 55 of file BiosLobbyService.c.

◆ m_Name

◆ m_Official

bool m_Official

Definition at line 40 of file BiosLobbyService.c.

◆ m_Ping

int m_Ping

Definition at line 70 of file BiosLobbyService.c.

Referenced by GetValueInt().

◆ m_PlayersInQueue

int m_PlayersInQueue

Definition at line 50 of file BiosLobbyService.c.

Referenced by GetValueInt().

◆ m_Priority

◆ m_RegionId

int m_RegionId

Definition at line 45 of file BiosLobbyService.c.

◆ m_ShardId

string m_ShardId

Definition at line 78 of file BiosLobbyService.c.

◆ m_SortName

int m_SortName

Definition at line 61 of file BiosLobbyService.c.

◆ m_SortTime

int m_SortTime

Definition at line 62 of file BiosLobbyService.c.

Referenced by GetValueInt().

◆ m_SteamFriends

string m_SteamFriends

Definition at line 68 of file BiosLobbyService.c.

◆ m_SteamQueryPort

int m_SteamQueryPort

Definition at line 79 of file BiosLobbyService.c.

◆ m_TimeOfDay

string m_TimeOfDay

Definition at line 71 of file BiosLobbyService.c.

◆ m_UpdatedAt

string m_UpdatedAt

Definition at line 54 of file BiosLobbyService.c.

◆ m_WhitelistEnabled

bool m_WhitelistEnabled

Definition at line 56 of file BiosLobbyService.c.