3 protected int m_GetSessionAttempts;
4 string m_CurrentHandle;
16 proto native
EBiosError EnterGameplaySessionAsync(
string session_address,
int session_port);
30 proto native
EBiosError LeaveGameplaySessionAsync(
string session_address,
int session_port);
36 proto native
void OnSessionPlayerListUpdate(
array<string> newPlayers);
47 void TryGetSession(
string join_handle =
"" )
49 if ( join_handle !=
"" )
51 m_GetSessionAttempts = 0;
52 m_CurrentHandle = join_handle;
55 if ( m_GetSessionAttempts < 10 )
56 GetSessionAsync( m_CurrentHandle );
70 proto native
EBiosError GetSessionAsync(
string join_handle);
82 proto native
EBiosError SetGameplayActivityAsync(
string session_address,
int session_port);
107 proto native
EBiosError ShowInviteToGameplaySessionAsync(
string session_address,
int session_port);
120 proto native
EBiosError InviteToGameplaySessionAsync(
string session_address,
int session_port,
array<string> invitee_list);
123 proto native
void SetMultiplayState(
bool is_active);
147 void OnGetGameplaySession(
string session_address,
int session_port)
149 m_GetSessionAttempts = 0;
150 switch (
g_Game.GetGameState())
152 case DayZGameState.IN_GAME:
156 bool found =
GetGame().GetHostAddress( addr, port );
157 if (addr != session_address || port != session_port )
161 OnlineServices.SetInviteServerInfo( session_address, session_port );
162 g_Game.GetUIManager().CloseAll();
179 case DayZGameState.CONNECTING:
186 g_Game.ConnectFromJoin( session_address, session_port );
204 m_GetSessionAttempts++;
220 void OnEnterGameplaySession(
string session_address,
int session_port,
EBiosError error)
224 SetGameplayActivityAsync( session_address, session_port );
226 InviteToGameplaySessionAsync( session_address, session_port,
OnlineServices.GetPendingInviteList() );
244 void OnShowInviteToGameplaySession(
EBiosError error)
253 void OnInviteToGameplaySession(
EBiosError error)