DayZ 1.24
Loading...
Searching...
No Matches
BiosLobbyService.c
Go to the documentation of this file.
1// ip, name, connection port, queryPort
3
4// Script File
5
17
23
25{
26 string m_Id; // server id (IP:Port)
28}
29
32{
33 string m_Id; // PC is IP:Port
34 int m_Priority; // PC something is working -> 667223046
35 string m_Name; // PC is name of server
36 string m_Description; // PC not work
37 string m_HostIp; // PC not work
38 int m_HostPort; // PC is works
41 string m_MapNameToRun; // PC not work always 0
42 bool m_Modded; // PC not work always 0
43 int m_ModeId; // identifies if third person is allowed on a CONSOLE server. On PC always 0
45 int m_RegionId; // PC not work always 0
47 int m_MaxPlayers; // PC - max players
48 int m_FreeSlots; // PC - max players
51 string m_GameVersion; // PC not work alway ""
52 bool m_IsPasswordProtected; // PC work
57 bool m_IsDLC;
58
59 //Scripted
64
65 //characters alive
67 //steam friends - list of names separated by comma
69
70 int m_Ping;
73 int m_Disable3rdPerson; //1 for disabled, ie. hardcore
78 string m_ShardId;
80
82
83 string GetIpPort()
84 {
85#ifdef PLATFORM_WINDOWS
86 return m_Id;
87#else
88 return GetIP() + ":" + m_HostPort;
89#endif
90 }
91
92 string GetIP()
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 }
103
105 {
106 return m_IsSelected;
107 }
108
110 {
111 switch (sort_type)
112 {
113 case ESortType.HOST:
114 {
115 return m_Name;
116 }
117 }
118
119 return "";
120 }
121
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 }
149
150 // Returns 0 if values are equal,
151 // a positive number if this entry is "greater than" other,
152 // and a negative number if this entry is "less than" other
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 }
181};
182
183
185
190
193{
197
201
203 {
205 m_UseOfficial = true;
206 }
207
209 {
211 m_UseGameVersion = true;
212 }
213
215 {
217 m_UseRegionId = true;
218 }
219};
220
230
233{
236 string m_SortBy; //na of property
238 string m_Name;
240 int m_Platform; // 1 - PC, 2 - xbox, 3 - PSN
241 int m_ModeId; // identifies if third person is allowed on a CONSOLE server. On PC always 0
248 int m_MinPlayers; // minimum 1
249 int m_MaxPlayers; // maximum 99
251 int m_RegionId; // 1 - Americas, 2 - Europe, 3 - Asia
255 string m_HostIp;
261
284
286 {
288 m_UseAntiCheat = true;
289 }
290
291 void SetNameFilter(string name)
292 {
293 m_Name = name;
294 m_UseName = true;
295 }
296
298 {
300 m_UseGameType = true;
301 }
302
304 {
306 m_UseModeId = true;
307 }
308
314
316 {
318 m_UseOfficial = true;
319 }
320
322 {
324 m_UseJoinable = true;
325 }
326
328 {
330 m_UseMapNameToRun = true;
331 }
332
334 {
336 m_UseIsModded = true;
337 }
338
344
350
356
358 {
360 m_UseRegionId = true;
361 }
362
364 {
366 m_UsePriority = true;
367 }
368
374
380
381 void SetHostIp(string hostIp)
382 {
384 m_UseHostIp = true;
385 }
386
388 {
390 m_UseHostPort = true;
391 }
392
398
399 void SetFavorited(bool show)
400 {
401 m_SortBy += "F";
402 AddShow(show);
403
404 }
405
406 void SetFriendsPlaying(bool show)
407 {
408 m_SortBy += "P";
409 AddShow(show);
410 }
411
412 void SetPreviouslyPlayed(bool show)
413 {
414 m_SortBy += "R";
415 AddShow(show);
416 }
417
418 void SetProperVersionMatch(bool show)
419 {
420 m_SortBy += "V";
421 AddShow(show);
422 }
423
424 void SetFullServer(bool show)
425 {
426 m_SortBy += "S";
427 AddShow(show);
428 }
429
430 void SetThirdPerson(bool show)
431 {
432 m_SortBy += "3";
433 AddShow(show);
434 }
435
436 void SetPublic(bool show)
437 {
438 m_SortBy += "L";
439 AddShow(show);
440 }
441
442 void SetAcceleratedTime(bool show)
443 {
444 m_SortBy += "A";
445 AddShow(show);
446 }
447
449 {
450 m_SortBy += "7";
451 AddShow(show);
452 }
453
454 void SetLAN()
455 {
456 m_SortBy += "N";
457 }
458
460 {
461 m_SortBy += "M" + pingMaxValue + ";";
462 }
463
464 void SetBattleyeProtection(bool show)
465 {
466 m_SortBy += "B";
467 AddShow(show);
468 }
469
470 void SetPassworded(bool show)
471 {
472 m_SortBy += "C";
473 AddShow(show);
474 }
475
476 void AddShow(bool show)
477 {
478 if (show)
479 m_SortBy += "+";
480 else
481 m_SortBy += "-";
482 }
483
484 void AddFavourite(string ip, int port)
485 {
486 m_FavoriteServers += ip + ";" + port + ";";
487 }
488
497
498 void SetIsDLC(bool isDLC)
499 {
500 m_IsDLC = isDLC;
501 m_UseIsDLC = true;
502
503 m_SortBy += "D";
504 AddShow(isDLC);
505 }
506};
507
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
string m_TimeOfDay
class GetServerModListResult m_Id
GetServersResultRow the output structure of the GetServers operation that represents one game server.
bool m_WhitelistEnabled
string GetIpPort()
bool m_AllowedFilePatching
int m_SortTime
ESortOrder
@ ASCENDING
@ DESCENDING
string m_CreatedAt
string m_Name
int m_Priority
ESortType
@ QUEUE
@ HOST
@ PASSWORDED
@ SLOTS
@ POPULATION
@ TIME
@ FAVORITE
bool m_IsPasswordProtected
int m_FreeSlots
string m_ShardId
bool m_Official
bool m_IsDLC
int m_SortName
string m_UpdatedAt
bool m_MouseAndKeyboardEnabled
bool m_Modded
bool m_AntiCheat
bool m_Favorite
int m_Disable3rdPerson
disable3rdPerson servers for mode regular/hardcore
string GetIP()
int m_RegionId
string m_GameVersion
array< ref GetServersResultRow > GetServersResultRowArray
int m_PlayersInQueue
int m_Ping
bool m_Invisible
bool IsSelected()
Param4< string, string, int, int > CachedServerInfo
int m_ModeId
float m_EnvironmentNightTimeMul
bool m_IsSelected
int m_HostPort
int m_SteamQueryPort
int m_MinPlayers
int GetValueInt(ESortType sort_type)
float m_EnvironmentTimeMul
time multiplier of environment
string m_CharactersAlive
string m_MapNameToRun
int m_MaxPlayers
int m_CurrentNumberPlayers
int CompareTo(GetServersResultRow other, ESortType sortType)
bool m_IsExpanded
string m_HostIp
string m_SteamFriends
string GetValueStr(ESortType sort_type)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
@ PING
proto native EBiosError GetFirstServerWithEmptySlot(GetFirstServerWithEmptySlotInput inputValues)
First 1st free server.
proto native void RemoveServerFavorite(string ipAddress, int port, int steamQueryPort)
proto native void GetFavoriteServers(TStringArray favServers)
proto native EBiosError GetServers(GetServersInput inputValues)
Query game servers.
proto native void AddServerFavorite(string ipAddress, int port, int steamQueryPort)
void OnDoneAsync(GetServersResult result_list, EBiosError error, string response)
Async callback for GetServers.
void OnGetFirstServerWithEmptySlot(GetFirstServerWithEmptySlotResult result_list, EBiosError error)
proto native EBiosError GetServerModList(string serverId)
proto native void GetCachedFavoriteServerInfo(array< ref CachedServerInfo > favServersInfoCache)
Get cached info about favorited servers (ONLY ON WINDOWS)
void OnServerModList(GetServerModListResult result_list, EBiosError error)
Async callback for GetServerModList.
GetServersInput the input structure of the GetServers operation.
void SetGameVersion(string GameVersion)
GetServersInput the input structure of the GetServers operation.
void SetHostIp(string hostIp)
void SetModeIdFilter(int mode_id)
void SetPriorityFilter(int priority)
void SetThirdPerson(bool show)
void SetBattleyeProtection(bool show)
void SetMaxPlayersFilter(int max_players)
void SetPreviouslyPlayed(bool show)
void SetIsModdedFilter(bool is_modded)
void SetFreeSlotsMin(int freeSlotsMin)
void SetPassworded(bool show)
void SetNameFilter(string name)
void SetOfficialFilter(bool official)
void SetMapNameToRun(string mapNameToRun)
void SetProperVersionMatch(bool show)
void AddShow(bool show)
void SetGameTypeFilter(string game_type)
void SetAcceleratedTime(bool show)
void SetGameVersionFilter(string game_version)
void SetAntiCheatFilter(bool anti_cheat)
void SetJoinableFilter(bool joinable)
void SetFavorited(bool show)
void SetPublic(bool show)
void SetIsDLC(bool isDLC)
void SetFullServer(bool show)
void SetMinPlayersFilter(int min_players)
void SetPingFilter(int pingMaxValue)
void SetFreeSlotsMax(int freeSlotsMax)
void SetFriendsPlaying(bool show)
void SetMouseAndKeyboardEnabled(bool enabledMouseAndKeyboard)
void SetAllowedFilePatching(bool show)
void SetRegionIdFilter(int region)
void SetWhitelistEnabled(bool whitelistEnabled)
void AddFavourite(string ip, int port)
void SetHostPort(int hostPort)
void SetIsPasswordProtectedFilter(bool password_protected)
GetServersResult the output structure of the GetServers operation.
ref GetServersResultRowArray m_Results
static void OnLoadServersAsync(GetServersResult result_list, EBiosError error, string response)
static void OnGetServerModList(GetServerModListResult result_list, EBiosError error)
static void OnAutoConnectToEmptyServer(GetFirstServerWithEmptySlotResult result_list, EBiosError error)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
string m_Description
class purpose description
Definition EnEntity.c:842