DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
BiosSessionService.c
См. документацию.
2{
3 protected int m_GetSessionAttempts;
5
7
16 proto native EBiosError EnterGameplaySessionAsync(string session_address, int session_port);
17
19
30 proto native EBiosError LeaveGameplaySessionAsync(string session_address, int session_port);
31
33
36 proto native void OnSessionPlayerListUpdate(array<string> newPlayers);
37
39
47 void TryGetSession( string join_handle = "" )
48 {
49 if ( join_handle != "" )
50 {
52 m_CurrentHandle = join_handle;
53 }
54
55 if ( m_GetSessionAttempts < 10 )
57 else
58 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_JOIN);
59 }
60
62
70 proto native EBiosError GetSessionAsync(string join_handle);
71
73
82 proto native EBiosError SetGameplayActivityAsync(string session_address, int session_port);
83
85 //proto native EBiosError SetLobbyActivityAsync(...);
86
88
95
97
107 proto native EBiosError ShowInviteToGameplaySessionAsync(string session_address, int session_port);
108
110
120 proto native EBiosError InviteToGameplaySessionAsync(string session_address, int session_port, array<string> invitee_list);
121
123 proto native void SetMultiplayState(bool is_active);
124
126
130 {
132 }
133
135
139 {
140 }
141
143
147 void OnGetGameplaySession(string session_address, int session_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 );
157 if (addr != session_address || port != session_port )
158 {
159 if (found)
160 {
161 OnlineServices.SetInviteServerInfo( session_address, session_port );
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 }
191
193 /*void OnGetLobbySession(...)
194 {
195 }*/
196
198
202 {
205
206 #ifdef PLATFORM_XBOX
208 #endif
209 #ifdef PLATFORM_PS4
210 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_JOIN);
211 #endif
212 }
213
215
220 void OnEnterGameplaySession(string session_address, int session_port, EBiosError error)
221 {
222 if ( !OnlineServices.ErrorCaught( error ) )
223 {
224 SetGameplayActivityAsync( session_address, session_port );
226 InviteToGameplaySessionAsync( session_address, session_port, OnlineServices.GetPendingInviteList() );
227
228 //OnlineServices.GetCurrentServerInfo(session_address, session_port);
229 }
230 }
231
233
237 {
238 }
239
241
248
250
254 {
255
256 }
257
262
264
268 {
269 TStringArray playerList = GetSessionPlayerList();
270 outPlayerList.Copy(playerList);
271 }
272
273};
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
Определения BIOSErrorModule.c:7
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
DayZGame g_Game
Определения DayZGame.c:3868
const int DISCONNECT_SESSION_FLAGS_JOIN
Определения DayZGame.c:14
NotificationType
DEPRECATED (moved into NotificationSystem)
Определения NotificationSystem.c:4
int m_GetSessionAttempts
Определения BiosSessionService.c:3
void OnClearActivity(EBiosError error)
Callback function.
Определения BiosSessionService.c:138
void OnGetGameplaySession(string session_address, int session_port)
Callback function.
Определения BiosSessionService.c:147
void OnSetActivity(EBiosError error)
Callback function.
Определения BiosSessionService.c:129
void OnLeaveGameplaySession(EBiosError error)
Callback function.
Определения BiosSessionService.c:236
void OnInviteToGameplaySession(EBiosError error)
Callback function.
Определения BiosSessionService.c:253
void OnEnterGameplaySession(string session_address, int session_port, EBiosError error)
Callback function.
Определения BiosSessionService.c:220
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.
Определения BiosSessionService.c:47
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 void SetMultiplayState(bool is_active)
Notifiy about interactive multiplayer state.
proto native void OnSessionPlayerListUpdate(array< string > newPlayers)
Alerts engine that players in current session have changed.
string m_CurrentHandle
Определения BiosSessionService.c:4
void OnGetSessionError(EBiosError error)
//! Callback function, not implemented
Определения BiosSessionService.c:201
proto native EBiosError LeaveGameplaySessionAsync(string session_address, int session_port)
Leave a gameplay session.
void GetSessionPlayerListEx(TStringArray outPlayerList)
Native callback function to retrieve the session player list.
Определения BiosSessionService.c:267
proto native EBiosError ShowInviteToGameplaySessionAsync(string session_address, int session_port)
Show system UI to invite friends to current gameplay session.
array< string > GetSessionPlayerList()
Определения BiosSessionService.c:258
proto native EBiosError EnterGameplaySessionAsync(string session_address, int session_port)
Enter a gameplay session.
void OnShowInviteToGameplaySession(EBiosError error)
Callback function.
Определения BiosSessionService.c:244
proto native EBiosError ClearActivityAsync()
not implemented
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
static array< string > GetSimplePlayerList()
Определения ClientData.c:92
Определения ClientData.c:2
const int DEFAULT_TIME_DISPLAYED
Определения NotificationSystem.c:71
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
Определения NotificationSystem.c:192
static array< string > GetPendingInviteList()
Определения OnlineServices.c:596
static bool ErrorCaught(EBiosError error)
Определения OnlineServices.c:82
static void SetInviteServerInfo(string ip, int port)
Определения OnlineServices.c:182
Определения OnlineServices.c:2
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685
const int MENU_INVITE_TIMER
Определения constants.c:206
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8