DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
BiosUserManager.c
См. документацию.
1
7
9{
10 proto native owned string GetName();
11 proto native owned string GetUid();
13 proto native bool IsOnline();
14};
15
17{
19
23
25
33
36
38
43 proto native EBiosError PickUserAsync();
44
45
47
56 proto native EBiosError ParseJoinAsync(string join_data);
57
59
68 proto native EBiosError ParsePartyAsync(string party_data);
69
71
76 proto native bool SelectUser(BiosUser user);
77
79
82 proto native BiosUser GetSelectedUser();
83
85
89
91 {
92 bool success = false;
93
94 BiosUser selectedUser = GetSelectedUser();
95 if (selectedUser && selectedUser != user && g_Game.GetGameState() != DayZGameState.MAIN_MENU)
96 {
97 success = SelectUser(user);
98 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE & ~DisconnectSessionFlags.SELECT_USER);
99 }
100 else
101 success = SelectUser(user);
102
103 if (!success)
104 {
106 }
107
108 return success;
109 }
110
112
116 void OnUserDatabaseId(string dbID, EBiosError error)
117 {
118 if ( !OnlineServices.ErrorCaught( error ) )
119 {
120 g_Game.SetDatabaseID( dbID );
121 }
122 }
123
125
129 {
130 if ( OnlineServices.ErrorCaught( error ) )
131 {
133 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE);
134 }
135 }
136
138
143 {
144 if ( !user )
145 {
147 g_Game.GamepadCheck();
148 }
149 else if ( !OnlineServices.ErrorCaught( error ) )
150 {
151 if (SelectUserEx( user ))
152 {
153 if ( GetGame().GetMission() )
155 OnGameNameChanged( user );
156 g_Game.SelectUser(GetGame().GetInput().GetUserGamepad(user));
157 }
158 }
159 }
160
163 {
164 if ( user && GetSelectedUser() == user )
165 g_Game.SelectUser(GetGame().GetInput().GetUserGamepad(user));
166 }
167
170 {
171 OnSignedOut( user );
172 }
173
175
181 {
182
183 }
184
186
192 {
193 if ( user == GetSelectedUser() )
194 {
195 SelectUserEx( null );
197 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE & ~DisconnectSessionFlags.SELECT_USER);
198 }
199 }
200
202
211 void OnJoin(EBiosJoinType type, BiosUser joiner, string handle, string joinee, EBiosError error)
212 {
213 if ( !OnlineServices.ErrorCaught( error ) )
214 {
215 OnlineServices.SetBiosUser( joiner );
216
217 SelectUserEx( joiner );
219
220 if ( g_Game.GetGameState() == DayZGameState.IN_GAME )
221 {
222 g_Game.SetLoadState( DayZLoadState.JOIN_START );
224 }
225 else
226 {
227 if ( GetGame().GetUIManager() && GetGame().GetInput().IsActiveGamepadSelected() )
228 {
231 }
232 g_Game.SetLoadState( DayZLoadState.JOIN_START );
233 g_Game.GamepadCheck();
234 }
235 }
236 else
237 {
238 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_JOIN);
239 }
240 }
241
243
250 void OnPartyHost(BiosUser host, array<string> invitee_list, EBiosError error)
251 {
252 #ifdef PLATFORM_PS4
253 if (host)
254 #endif
255 {
256 SelectUserEx(host);
257
258 #ifdef PLATFORM_PS4
259 if (!host.IsOnline())
260 {
261 LogOnUserAsync( host );
262 }
263 #endif
264 }
265
266
267 if (GetGame().GetUIManager())
268 {
270 }
271
272 OnlineServices.SetPendingInviteList( invitee_list );
273 if (g_Game.GetGameState() != DayZGameState.IN_GAME && g_Game.GetGameState() != DayZGameState.CONNECTING)
274 {
275 if (!GetGame().GetUIManager().GetMenu() || GetGame().GetUIManager().GetMenu().GetID() != MENU_MAIN)
276 {
277 GetGame().GetUIManager().EnterScriptedMenu(MENU_MAIN, GetGame().GetUIManager().GetMenu());
278 }
279 g_Game.SetGameState( DayZGameState.PARTY );
280 g_Game.SetLoadState( DayZLoadState.PARTY_START );
281 g_Game.GamepadCheck();
282 }
283 }
284
286
292 {
293 if ( user == GetSelectedUser() )
294 {
295 g_Game.SetPlayerName( user.GetName() );
296 #ifdef PLATFORM_CONSOLE
297 g_Game.SetPlayerGameName( user.GetName() );
298 #endif
299 if ( GetGame().GetUIManager().GetMenu() )
300 {
302 }
303 }
304 }
305
306 BiosUser GetUser( string user_id )
307 {
309 GetUserList( user_list );
310 foreach ( BiosUser user : user_list )
311 {
312 if ( user.GetUid() == user_id )
313 {
314 return user;
315 }
316 }
317 return null;
318 }
319};
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
Определения BIOSErrorModule.c:7
EBiosJoinType
Определения BiosUserManager.c:3
@ ACTIVITY
Определения BiosUserManager.c:5
@ INVITE
Определения BiosUserManager.c:4
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
DayZGame g_Game
Определения DayZGame.c:3868
DisconnectSessionFlags
Определения DayZGame.c:2
const int DISCONNECT_SESSION_FLAGS_JOIN
Определения DayZGame.c:14
int GetID()
Get the ID registered in SEffectManager.
Определения Effect.c:536
NotificationType
DEPRECATED (moved into NotificationSystem)
Определения NotificationSystem.c:4
BiosClientServices class provides individual online services.
Определения BiosClientServices.c:10
proto native BiosClientServices GetClientServices()
proto native owned string GetName()
proto native bool IsOnline()
proto native owned string GetUid()
Определения BiosUserManager.c:9
void OnUserPicked(BiosUser user, EBiosError error)
Callback function.
Определения BiosUserManager.c:142
void OnLoggedOn(BiosUser user)
Callback function.
Определения BiosUserManager.c:162
void OnSignedOut(BiosUser user)
Callback function.
Определения BiosUserManager.c:191
void OnJoin(EBiosJoinType type, BiosUser joiner, string handle, string joinee, EBiosError error)
Callback function.
Определения BiosUserManager.c:211
proto native EBiosError GetUserDatabaseIdAsync()
Call async function to get database ID.
proto native bool SelectUser(BiosUser user)
Informs the engine about the current selected user.
void OnGameNameChanged(BiosUser user)
Callback function.
Определения BiosUserManager.c:291
void OnLoggedOff(BiosUser user)
Callback function.
Определения BiosUserManager.c:169
proto native EBiosError GetUserList(array< ref BiosUser > user_list)
Gets the currently present list of users.
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
void OnUserDatabaseId(string dbID, EBiosError error)
Callback function.
Определения BiosUserManager.c:116
proto native EBiosError ParseJoinAsync(string join_data)
Parse the join data from from command line parameters.
void OnSignedIn(BiosUser user)
Callback function.
Определения BiosUserManager.c:180
void OnUserLoggedOn(EBiosError error)
Callback function.
Определения BiosUserManager.c:128
proto native EBiosError PickUserAsync()
Display a system dependant account picket.
void OnPartyHost(BiosUser host, array< string > invitee_list, EBiosError error)
Callback function.
Определения BiosUserManager.c:250
BiosUser GetUser(string user_id)
Определения BiosUserManager.c:306
proto native EBiosError ParsePartyAsync(string party_data)
Parse the party data from from command line parameters.
proto native BiosUser GetTitleInitiator()
Gets the initiatior of the title.
proto native EBiosError LogOnUserAsync(BiosUser user)
Display a system dependant ui for log-on.
bool SelectUserEx(BiosUser user)
Определения BiosUserManager.c:90
proto native UIManager GetUIManager()
proto native Input GetInput()
proto native Mission GetMission()
proto native void ResetActiveGamepad()
clears active gamepad
proto native void IdentifyGamepad(GamepadButton button)
the on OnGamepadIdentification callback will return the first gamepad where the button was pressed
void Reset()
Определения gameplay.c:717
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 void SetSessionHandle(string handle)
Определения OnlineServices.c:473
static void SetPendingInviteList(array< string > invitees)
Определения OnlineServices.c:577
static void GetSession()
Определения OnlineServices.c:492
static void SetBiosUser(BiosUser user)
Определения OnlineServices.c:506
static bool ErrorCaught(EBiosError error)
Определения OnlineServices.c:82
Определения OnlineServices.c:2
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
bool CloseMenu(int id)
Close menu with specific ID (see MenuID)
Определения UIManager.c:117
proto native UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
override void Refresh()
Определения ChatInputMenu.c:70
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
GamepadButton
Определения EnSystem.c:341
const int MENU_TITLE_SCREEN
Определения constants.c:196
const int MENU_MAIN
Определения constants.c:182