Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс BiosSessionService

Защищенные члены

proto native EBiosError EnterGameplaySessionAsync (string session_address, int session_port)
 Enter a gameplay session.
 
proto native EBiosError LeaveGameplaySessionAsync (string session_address, int session_port)
 Leave a gameplay session.
 
proto native void OnSessionPlayerListUpdate (array< string > newPlayers)
 Alerts engine that players in current session have changed.
 
void TryGetSession (string join_handle="")
 Gets a session from a join handle.
 
proto native EBiosError GetSessionAsync (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 EBiosError ClearActivityAsync ()
 not implemented
 
proto native EBiosError ShowInviteToGameplaySessionAsync (string session_address, int session_port)
 Show system UI to invite friends to current gameplay session.
 
proto native EBiosError InviteToGameplaySessionAsync (string session_address, int session_port, array< string > invitee_list)
 Send invite to list of users.
 
proto native void SetMultiplayState (bool is_active)
 Notifiy about interactive multiplayer state.
 
void OnSetActivity (EBiosError error)
 Callback function.
 
void OnClearActivity (EBiosError error)
 Callback function.
 
void OnGetGameplaySession (string session_address, int session_port)
 Callback function.
 
void OnGetSessionError (EBiosError error)
 //! Callback function, not implemented
 
void OnEnterGameplaySession (string session_address, int session_port, EBiosError error)
 Callback function.
 
void OnLeaveGameplaySession (EBiosError error)
 Callback function.
 
void OnShowInviteToGameplaySession (EBiosError error)
 Callback function.
 
void OnInviteToGameplaySession (EBiosError error)
 Callback function.
 
array< stringGetSessionPlayerList ()
 

Защищенные данные

int m_GetSessionAttempts
 
string m_CurrentHandle
 

Подробное описание

Методы

◆ ClearActivityAsync()

proto native EBiosError ClearActivityAsync ( )
protected

not implemented

Clears the current activity

The async result is returned in the OnClearActivity callback. Expected errors:

Возвращает
EBiosError indicating if the async operation is pending.

◆ EnterGameplaySessionAsync()

proto native EBiosError EnterGameplaySessionAsync ( string session_address,
int session_port )
protected

Enter a gameplay session.

The async result is returned in the OnEnterGameplaySession callback. Expected errors: LOGICAL - if the user is currently in an active gameplay session.

Аргументы
session_addressserver IP address.
session_portserver port.
Возвращает
EBiosError indicating if the async operation is pending.

◆ GetSessionAsync()

proto native EBiosError GetSessionAsync ( string join_handle)
protected

Gets a session from a join handle.

The async result is returned in the OnGetGameplaySession, OnGetLobbySession or OnGetSessionError callback, dependinng on the type of session, or error. Expected errors:

Аргументы
join_handlethe parsed join handle.
Возвращает
EBiosError indicating if the async operation is pending.

Используется в TryGetSession().

◆ GetSessionPlayerList()

array< string > GetSessionPlayerList ( )
inlineprotected
259 {
261 }
Definition ClientData.c:2
static array< string > GetSimplePlayerList()
Definition ClientData.c:92

Перекрестные ссылки ClientData::GetSimplePlayerList().

◆ InviteToGameplaySessionAsync()

proto native EBiosError InviteToGameplaySessionAsync ( string session_address,
int session_port,
array< string > invitee_list )
protected

Send invite to list of users.

The async result is returned in the OnInviteToGameplaySession callback. The user must be inside the session. That means, OnEnterGameplaySession must be called with no errors.

Аргументы
session_addressserver IP address.
session_portserver port.
invitee_listlist of users to invite
Возвращает
EBiosError indicating if the async operation is pending.

Используется в OnEnterGameplaySession().

◆ LeaveGameplaySessionAsync()

proto native EBiosError LeaveGameplaySessionAsync ( string session_address,
int session_port )
protected

Leave a gameplay session.

The async result is returned in the OnLeaveGameplaySession callback. If there is an unexpected error the state is cleared. Expected errors: ERR_NOT_FOUND - when attempting to leave a gameplay session the user is not part of. ERR_LOGICAL - when the user is not in a gameplay session.

Аргументы
session_addressserver IP address.
session_portserver port.
Возвращает
EBiosError indicating if the async operation is pending.

◆ OnClearActivity()

void OnClearActivity ( EBiosError error)
inlineprotected

Callback function.

Аргументы
errorerror indicating success or fail of the async operation.
139 {
140 }

◆ OnEnterGameplaySession()

void OnEnterGameplaySession ( string session_address,
int session_port,
EBiosError error )
inlineprotected

Callback function.

Аргументы
session_addressserver IP address. Empty if failed.
session_portserver port. 0 if failed.
errorerror indicating success or fail of the async operation.
221 {
223 {
227
228 //OnlineServices.GetCurrentServerInfo(session_address, session_port);
229 }
230 }
proto native EBiosError InviteToGameplaySessionAsync(string session_address, int session_port, array< string > invitee_list)
Send invite to list of users.
proto native EBiosError SetGameplayActivityAsync(string session_address, int session_port)
Sets the activity to a gameplay session.
Definition OnlineServices.c:2
static array< string > GetPendingInviteList()
Definition OnlineServices.c:596
static bool ErrorCaught(EBiosError error)
Definition OnlineServices.c:82
Definition EntityAI.c:95

Перекрестные ссылки OnlineServices::ErrorCaught(), OnlineServices::GetPendingInviteList(), InviteToGameplaySessionAsync() и SetGameplayActivityAsync().

◆ OnGetGameplaySession()

void OnGetGameplaySession ( string session_address,
int session_port )
inlineprotected

Callback function.

Аргументы
session_addressserver IP address.
session_portserver port.
148 {
150 switch (g_Game.GetGameState())
151 {
152 case DayZGameState.IN_GAME:
153 {
154 string addr;
155 int port;
156 bool found = GetGame().GetHostAddress( addr, port );
158 {
159 if (found)
160 {
162 g_Game.GetUIManager().CloseAll();
163 if (!g_Game.GetUIManager().EnterScriptedMenu( MENU_INVITE_TIMER, null ))
164 {
166 }
167 }
168 else
169 {
171 }
172 }
173 else
174 {
175 NotificationSystem.AddNotification( NotificationType.INVITE_FAIL_SAME_SERVER, NotificationSystem.DEFAULT_TIME_DISPLAYED, "#ps4_already_in_session" );
176 }
177 break;
178 }
179 case DayZGameState.CONNECTING:
180 {
181 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE);
182 // Intentionally no break, fall through to connecting
183 }
184 default:
185 {
186 g_Game.ConnectFromJoin( session_address, session_port );
187 break;
188 }
189 }
190 }
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
DayZGame g_Game
Definition DayZGame.c:3746
NotificationType
DEPRECATED (moved into NotificationSystem)
Definition NotificationSystem.c:4
int m_GetSessionAttempts
Definition BiosSessionService.c:3
Definition NotificationSystem.c:70
const int DEFAULT_TIME_DISPLAYED
Definition NotificationSystem.c:71
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
Definition NotificationSystem.c:192
static void SetInviteServerInfo(string ip, int port)
Definition OnlineServices.c:182
proto native CGame GetGame()
const int MENU_INVITE_TIMER
Definition constants.c:196

Перекрестные ссылки NotificationSystem::AddNotification(), NotificationSystem::DEFAULT_TIME_DISPLAYED, DISCONNECT_SESSION_FLAGS_FORCE, g_Game, GetGame(), m_GetSessionAttempts, MENU_INVITE_TIMER и OnlineServices::SetInviteServerInfo().

◆ OnGetSessionError()

void OnGetSessionError ( EBiosError error)
inlineprotected

//! Callback function, not implemented

Callback function

Аргументы
errorerror indicating fail of the async operation. Cannot be OK.
202 {
205
206 #ifdef PLATFORM_XBOX
207 GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( TryGetSession, 100, false, "" );
208 #endif
209 #ifdef PLATFORM_PS4
210 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_JOIN);
211 #endif
212 }
const int DISCONNECT_SESSION_FLAGS_JOIN
Definition DayZGame.c:14
void TryGetSession(string join_handle="")
Gets a session from a join handle.
Definition BiosSessionService.c:47
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, DISCONNECT_SESSION_FLAGS_JOIN, OnlineServices::ErrorCaught(), g_Game, GetGame(), m_GetSessionAttempts и TryGetSession().

◆ OnInviteToGameplaySession()

void OnInviteToGameplaySession ( EBiosError error)
inlineprotected

Callback function.

Аргументы
errorindicating success or fail of the async operation.
254 {
255
256 }

◆ OnLeaveGameplaySession()

void OnLeaveGameplaySession ( EBiosError error)
inlineprotected

Callback function.

Аргументы
errorerror indicating success or fail of the async operation.
237 {
238 }

◆ OnSessionPlayerListUpdate()

proto native void OnSessionPlayerListUpdate ( array< string > newPlayers)
protected

Alerts engine that players in current session have changed.

Аргументы
newPlayersplayers that have just joined the server. When player joins a server, ALL players already on server count as new players.

◆ OnSetActivity()

void OnSetActivity ( EBiosError error)
inlineprotected

Callback function.

Аргументы
errorerror indicating success or fail of the async operation.
130 {
132 }

Перекрестные ссылки OnlineServices::ErrorCaught().

◆ OnShowInviteToGameplaySession()

void OnShowInviteToGameplaySession ( EBiosError error)
inlineprotected

Callback function.

Аргументы
errorindicating success or fail of the async operation.
245 {
247 }

Перекрестные ссылки OnlineServices::ErrorCaught().

◆ SetGameplayActivityAsync()

proto native EBiosError SetGameplayActivityAsync ( string session_address,
int session_port )
protected

Sets the activity to a gameplay session.

The async result is returned in the OnSetActivity callback. Expected errors: ERR_NOT_FOUND - when attempting to set a gameplay session activity the user is not part of.

Аргументы
session_addressserver IP address.
session_portserver port.
Возвращает
EBiosError indicating if the async operation is pending.

Используется в OnEnterGameplaySession().

◆ SetMultiplayState()

proto native void SetMultiplayState ( bool is_active)
protected

Notifiy about interactive multiplayer state.

◆ ShowInviteToGameplaySessionAsync()

proto native EBiosError ShowInviteToGameplaySessionAsync ( string session_address,
int session_port )
protected

Show system UI to invite friends to current gameplay session.

The async result is returned in the OnShowInviteToGameplaySession callback. On Xbox, if session with session_address and session_port does not exist, then xbox show message "We could not send the invite".

Аргументы
session_addressserver IP address.
session_portserver port.
Возвращает
EBiosError indicating if the async operation is pending.

◆ TryGetSession()

void TryGetSession ( string join_handle = "")
inlineprotected

Gets a session from a join handle.

The async result is returned in the OnGetGameplaySession, OnGetLobbySession or OnGetSessionError callback, dependinng on the type of session, or error. Expected errors:

Аргументы
join_handlethe parsed join handle.
Возвращает
EBiosError indicating if the async operation is pending.
48 {
49 if ( join_handle != "" )
50 {
53 }
54
55 if ( m_GetSessionAttempts < 10 )
57 else
58 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_JOIN);
59 }
string m_CurrentHandle
Definition BiosSessionService.c:4
proto native EBiosError GetSessionAsync(string join_handle)
Gets a session from a join handle.

Перекрестные ссылки DISCONNECT_SESSION_FLAGS_JOIN, g_Game, GetSessionAsync(), m_CurrentHandle и m_GetSessionAttempts.

Используется в OnGetSessionError().

Поля

◆ m_CurrentHandle

string m_CurrentHandle
protected

Используется в TryGetSession().

◆ m_GetSessionAttempts

int m_GetSessionAttempts
protected

Объявления и описания членов класса находятся в файле: