32 #ifdef PLATFORM_CONSOLE
33 #ifndef PLATFORM_WINDOWS
34 if ( !m_TrialService )
54 return ( m_ClientServices != null );
62 BiosUser selected_user = user_manager.GetSelectedUser();
65 m_ClientServices = selected_user.GetClientServices();
67 #ifdef PLATFORM_WINDOWS
69 user_manager.GetUserList( user_list );
70 if ( user_list.Count() > 0 )
72 m_ClientServices = user_list.Get( 0 ).GetClientServices();
78 Error(
"BiosClientServices Error: Usermanager does not exist." );
99 if ( m_ClientServices )
101 m_ClientServices.GetLobbyService().GetServers( inputValues );
105 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
111 m_ClientServices.GetLobbyService().GetFavoriteServers(favServers);
116 m_ClientServices.GetLobbyService().GetCachedFavoriteServerInfo(favServersInfoCache);
122 if ( m_ClientServices )
126 m_ClientServices.GetLobbyService().AddServerFavorite( ipAddress, port, steamQueryPort );
130 m_ClientServices.GetLobbyService().RemoveServerFavorite( ipAddress, port, steamQueryPort );
135 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
148 inputValues.SetHostIp( ip );
149 inputValues.SetHostPort( port );
150 inputValues.m_Page = 0;
151 inputValues.m_RowsPerPage = 10;
152 inputValues.m_Platform = 1;
155 inputValues.m_Platform = 2;
158 inputValues.m_Platform = 3;
161 if ( m_ClientServices )
163 m_ClientServices.GetLobbyService().GetServers( inputValues );
172 return g_Game.GetHostData();
225 m_ServersAsyncInvoker.Invoke( result_list, error, response );
229 m_ServersAsyncInvoker.Invoke( null, error,
"" );
237 if ( m_ClientServices )
239 m_ClientServices.GetSocialService().GetFriendsAsync();
243 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
250 if ( m_ClientServices )
252 m_ClientServices.GetSocialService().ShowUserProfileAsync( uid );
256 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
269 m_FriendsAsyncInvoker.Invoke( friend_list );
272 for (
int i = 0; i < friend_list.Count(); ++i )
274 string uid = friend_list[i].m_Uid;
282 friends_simple.Insert( newBfi.m_Uid );
289 friends_simple.Insert( newBfi.m_Uid );
304 ClientData.m_LastNewPlayers.m_PlayerList.Clear();
314 if ( m_ClientServices )
319 ErrorCaught( m_ClientServices.GetPrivacyService().GetPermissionsAsync( player_list, perms ) );
323 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
333 for (
int i = 0; i < result_list.Count(); i++ )
336 string uid = result.m_Uid;
339 if ( result_array && result_array2 )
343 new_list.Insert( result );
350 new_list.Insert( result );
353 m_PermissionsAsyncInvoker.Invoke( new_list );
394 #ifdef PLATFORM_CONSOLE
396 if ( m_ClientServices )
400 if (
GetGame().GetHostAddress( addr, port ) )
407 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
414 #ifdef PLATFORM_CONSOLE
416 if ( m_ClientServices )
422 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
432 if ( m_ClientServices )
438 DebugPrint.LogErrorAndTrace(
"BiosClientServices Error: Service reference does not exist." );
450 if (
g_Game.GetGameState() != DayZGameState.MAIN_MENU )
456 g_Game.SetLoadState( DayZLoadState.MAIN_MENU_START );
464 if (
g_Game.GetGameState() == DayZGameState.IN_GAME )
476 if ( m_ClientServices )
485 if ( m_ClientServices )
495 if ( m_ClientServices )
522 is_multiplay = state && (
ClientData.GetSimplePlayerList().
Count() > 1 );
524 if ( m_ClientServices )
532 if (
GetGame().GetHostAddress( addr, port ) )
535 if ( m_ClientServices )
546 if ( m_ClientServices )
550 if ( currentServerInfo )
551 m_ClientServices.GetSessionService().
LeaveGameplaySessionAsync(currentServerInfo.m_HostIp, currentServerInfo.m_HostPort);
567 if (
GetGame().GetHostAddress( addr, port ) )
570 if ( m_ClientServices )
581 if (
GetGame().GetHostAddress( addr, port ) )
584 if ( m_ClientServices )
604 if ( already_on_server.Find( invitee ) == -1 )
606 new_to_server.Insert( invitee );
609 return new_to_server;
630 input.SetOfficial(
true );
631 m_ClientServices.GetLobbyService().GetFirstServerWithEmptySlot( input );
640 if ( results && results.m_Result && results.m_Result.m_Results && results.m_Result.m_Results.Count() > 0 )
644 if ( result_temp.m_FreeSlots > 0 )
646 results_free.Insert( result_temp );
651 return results_free.GetRandomElement();
661 g_Game.ConnectFromServerBrowser( result.m_HostIp, result.m_HostPort );
667 GetGame().GetUIManager().ShowDialog(
"#str_xbox_authentification_fail_title",
"#str_xbox_authentification_fail", 232, DBT_OK, DBB_NONE, DMT_INFO,
GetGame().GetUIManager().GetMenu() );
675 input.SetOfficial(
true );
676 m_ClientServices.GetLobbyService().GetFirstServerWithEmptySlot( input );
680 GetGame().GetUIManager().ShowDialog(
"#str_xbox_authentification_fail_title",
"#xbox_authentification_fail", 232, DBT_OK, DBB_NONE, DMT_INFO,
GetGame().GetUIManager().GetMenu() );
687 if ( m_ClientServices )
689 m_ClientServices.GetLobbyService().GetServerModList( server_id );
697 m_ServerModLoadAsyncInvoker.Invoke( result_list );
704 #ifndef PLATFORM_WINDOWS
705 if ( m_TrialService )
706 return m_TrialService.IsGameTrial( sim );
715 #ifndef PLATFORM_WINDOWS
716 if ( m_TrialService )
717 return m_TrialService.IsGameActive( sim );
726 if ( m_ClientServices )
728 EBiosError error = m_ClientServices.GetPackageService().CheckUpdateAsync();
742 if ( m_ClientServices )
744 m_ClientServices.GetPackageService().PromptUpdateAsync();
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
array< ref BiosPrivacyUidResult > BiosPrivacyUidResultArray
EBiosPrivacyPermission
EBiosPrivacyPermission represents possible privacy permissions.
EBiosPrivacyPrivilege
EBiosPrivacyPrivilege represents possible privacy privileges.
BiosClientServices class provides individual online services.
BiosFriendInfo represents friend information.
BiosPrivacyPermissionResult represents the per permission result of the GetPermissionsAsync reqeust.
BiosPrivacyUidResult represents the per user result of the GetPermissionsAsync request.
proto native EBiosError InviteToGameplaySessionAsync(string session_address, int session_port, array< string > invitee_list)
Send invite to list of users.
void TryGetSession(string join_handle="")
Gets a session from a join handle.
proto native EBiosError SetGameplayActivityAsync(string session_address, int session_port)
Sets the activity to a gameplay session.
proto native void SetMultiplayState(bool is_active)
Notifiy about interactive multiplayer state.
proto native EBiosError LeaveGameplaySessionAsync(string session_address, int session_port)
Leave a gameplay session.
proto native EBiosError ShowInviteToGameplaySessionAsync(string session_address, int session_port)
Show system UI to invite friends to current gameplay session.
proto native EBiosError EnterGameplaySessionAsync(string session_address, int session_port)
Enter a gameplay session.
proto native BiosUserManager GetUserManager()
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
GetServersResult the output structure of the GetServers operation.
GetServersResultRow the output structure of the GetServers operation that represents one game server.
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
static void GetClientServices()
static void PromptUpdate()
static void OnUserProfileAsync(EBiosError error)
static void OnLoadServersAsync(GetServersResult result_list, EBiosError error, string response)
static bool IsPlayerMuted(string id)
static void LoadVoicePrivilege()
static void SetSessionHandle(string handle)
static void LeaveGameplaySession()
static void OnPermissionsAsync(BiosPrivacyUidResultArray result_list, EBiosError error)
static string m_InviteServerIP
static void OnGetServerModList(GetServerModListResult result_list, EBiosError error)
static ref GetServersResultRow m_CurrentServerInfo
static void SetPendingInviteList(array< string > invitees)
static bool GetMultiplayState()
static void AutoConnectToEmptyServer()
static void ShowInviteScreen()
static void LoadFriends()
static bool IsGameActive(bool sim)
static void ShowUserProfile(string uid)
static void GetServerModList(string server_id)
static GetServersResultRow GetCurrentServerInfo()
static int m_InviteServerPort
static BiosUser GetBiosUser()
static int m_AutoConnectTries
static bool CheckUpdate()
static void SetServerFavorited(string ipAddress, int port, int steamQueryPort, bool is_favorited)
static void GetCurrentServerInfo(string ip, int port)
static string GetSessionHandle()
static bool IsGameTrial(bool sim)
static void SetBiosUser(BiosUser user)
static ref map< string, ref BiosPrivacyPermissionResultArray > m_PermissionsList
static ref map< string, bool > m_MuteList
static GetServersResultRow GetRandomFreeResult(GetFirstServerWithEmptySlotResult results)
static void LoadPermissions(array< string > player_list)
static bool IsInitialized()
static void LoadServers(notnull GetServersInput inputValues)
static string m_CurrentServerIP
static map< string, bool > GetMuteList()
static array< string > GetPendingInviteList()
static void EnterGameplaySession()
static ref array< string > m_PendingInvites
static ref map< string, ref BiosFriendInfo > m_FriendsList
static bool m_MultiplayState
static int m_CurrentServerPort
static bool ErrorCaught(EBiosError error)
static void OnLoadVoicePrivilege(EBiosError err)
static void ClearPendingInviteList(array< string > invitees)
static void SetMultiplayState(bool state)
static bool m_FirstFriendsLoad
static void LoadMPPrivilege()
static void OnAutoConnectToEmptyServer(GetFirstServerWithEmptySlotResult result_list, EBiosError error)
static void GetInviteServerInfo(out string ip, out int port)
static void SetGameplayActivity()
static bool MutePlayer(string id, bool mute)
static void OnFriendsAsync(BiosFriendInfoArray friend_list, EBiosError error)
static void OnLoadMPPrivilege(EBiosError err)
static void GetFavoriteServers(TStringArray favServers)
static ref BiosUser m_BiosUser
static void ClearCurrentServerInfo()
static void GetCachedFavServerInfo(array< ref CachedServerInfo > favServersInfoCache)
static void SetInviteServerInfo(string ip, int port)
ScriptInvoker Class provide list of callbacks usage:
TrialService is used to query if the game is trial version or not.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
NotificationType
DEPRECATED (moved into NotificationSystem)