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

Закрытые члены

proto native BiosUser GetTitleInitiator ()
 Gets the initiatior of the title.
 
proto native EBiosError GetUserList (array< ref BiosUser > user_list)
 Gets the currently present list of users.
 
proto native EBiosError LogOnUserAsync (BiosUser user)
 Display a system dependant ui for log-on.
 
proto native EBiosError PickUserAsync ()
 Display a system dependant account picket.
 
proto native EBiosError ParseJoinAsync (string join_data)
 Parse the join data from from command line parameters.
 
proto native EBiosError ParsePartyAsync (string party_data)
 Parse the party data from from command line parameters.
 
proto native bool SelectUser (BiosUser user)
 Informs the engine about the current selected user.
 
proto native BiosUser GetSelectedUser ()
 Returns the currently selected user.
 
proto native EBiosError GetUserDatabaseIdAsync ()
 Call async function to get database ID.
 
bool SelectUserEx (BiosUser user)
 
void OnUserDatabaseId (string dbID, EBiosError error)
 Callback function.
 
void OnUserLoggedOn (EBiosError error)
 Callback function.
 
void OnUserPicked (BiosUser user, EBiosError error)
 Callback function.
 
void OnLoggedOn (BiosUser user)
 Callback function.
 
void OnLoggedOff (BiosUser user)
 Callback function.
 
void OnSignedIn (BiosUser user)
 Callback function.
 
void OnSignedOut (BiosUser user)
 Callback function.
 
void OnJoin (EBiosJoinType type, BiosUser joiner, string handle, string joinee, EBiosError error)
 Callback function.
 
void OnPartyHost (BiosUser host, array< string > invitee_list, EBiosError error)
 Callback function.
 
void OnGameNameChanged (BiosUser user)
 Callback function.
 
BiosUser GetUser (string user_id)
 

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

Методы

◆ GetSelectedUser()

proto native BiosUser GetSelectedUser ( )
private

Returns the currently selected user.

Возвращает
BiosUser the selected user. May be NULL.

Используется в OnGameNameChanged(), OnLoggedOn(), OnSignedOut() и SelectUserEx().

◆ GetTitleInitiator()

proto native BiosUser GetTitleInitiator ( )
private

Gets the initiatior of the title.

Возвращает
BiosUser the initiator. May be NULL.

◆ GetUser()

BiosUser GetUser ( string user_id)
inlineprivate
307 {
310 foreach ( BiosUser user : user_list )
311 {
312 if ( user.GetUid() == user_id )
313 {
314 return user;
315 }
316 }
317 return null;
318 }
Definition BiosUserManager.c:9
proto native EBiosError GetUserList(array< ref BiosUser > user_list)
Gets the currently present list of users.
Definition EntityAI.c:95

Перекрестные ссылки GetUserList().

◆ GetUserDatabaseIdAsync()

proto native EBiosError GetUserDatabaseIdAsync ( )
private

Call async function to get database ID.

Возвращает
EBiosError indicating if the async operation is pending. If active user is not set, then return NOT_FOUND

◆ GetUserList()

proto native EBiosError GetUserList ( array< ref BiosUser > user_list)
private

Gets the currently present list of users.

Fills in the array. Expected errors: BAD_PARAMETER - user_list is NULL,

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

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

◆ LogOnUserAsync()

proto native EBiosError LogOnUserAsync ( BiosUser user)
private

Display a system dependant ui for log-on.

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

◆ OnGameNameChanged()

void OnGameNameChanged ( BiosUser user)
inlineprivate

Callback function.

Called when display info of a signed in user changed.

Аргументы
userthe user affected by the change.
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 {
301 GetGame().GetUIManager().GetMenu().Refresh();
302 }
303 }
304 }
DayZGame g_Game
Definition DayZGame.c:3746
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
proto native CGame GetGame()

Перекрестные ссылки g_Game, GetGame() и GetSelectedUser().

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

◆ OnJoin()

void OnJoin ( EBiosJoinType type,
BiosUser joiner,
string handle,
string joinee,
EBiosError error )
inlineprivate

Callback function.

Called when a join is parsed or when a runtime join is accepted from the system UI.

Аргументы
typethe type of join. Undefined on error.
joinerthe user that is joining. NULL on error.
handlejoin handle for a session. Empty on error.
joineeuid of the user that is being joined. Empty on error.
errorindicating if parsing failed. OK if not a result of ParseJoinAsync.
212 {
214 {
216
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 {
229 GetGame().GetUIManager().CloseMenu( MENU_TITLE_SCREEN );
230 GetGame().GetInput().IdentifyGamepad( GamepadButton.BUTTON_NONE );
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 }
ActionInput GetInput()
Definition ActionBase.c:1066
const int DISCONNECT_SESSION_FLAGS_JOIN
Definition DayZGame.c:14
bool SelectUserEx(BiosUser user)
Definition BiosUserManager.c:90
Definition OnlineServices.c:2
static void SetSessionHandle(string handle)
Definition OnlineServices.c:473
static void GetSession()
Definition OnlineServices.c:492
static void SetBiosUser(BiosUser user)
Definition OnlineServices.c:506
static bool ErrorCaught(EBiosError error)
Definition OnlineServices.c:82
GamepadButton
Definition EnSystem.c:341
const int MENU_TITLE_SCREEN
Definition constants.c:186

Перекрестные ссылки DISCONNECT_SESSION_FLAGS_JOIN, OnlineServices::ErrorCaught(), g_Game, GetGame(), GetInput(), OnlineServices::GetSession(), MENU_TITLE_SCREEN, SelectUserEx(), OnlineServices::SetBiosUser() и OnlineServices::SetSessionHandle().

◆ OnLoggedOff()

void OnLoggedOff ( BiosUser user)
inlineprivate

Callback function.

170 {
171 OnSignedOut( user );
172 }
void OnSignedOut(BiosUser user)
Callback function.
Definition BiosUserManager.c:191

Перекрестные ссылки OnSignedOut().

◆ OnLoggedOn()

void OnLoggedOn ( BiosUser user)
inlineprivate

Callback function.

163 {
164 if ( user && GetSelectedUser() == user )
165 g_Game.SelectUser(GetGame().GetInput().GetUserGamepad(user));
166 }

Перекрестные ссылки g_Game, GetGame(), GetInput() и GetSelectedUser().

◆ OnPartyHost()

void OnPartyHost ( BiosUser host,
array< string > invitee_list,
EBiosError error )
inlineprivate

Callback function.

Called when a party is parsed or when a party is hosted from the system UI.

Аргументы
hostthe user that is hosting the party. NULL on error.
invitee_listlist of party members.
errorindicating if parsing failed. OK if not a result of ParsePartyAsync.
251 {
252 #ifdef PLATFORM_PS4
253 if (host)
254 #endif
255 {
257
258 #ifdef PLATFORM_PS4
259 if (!host.IsOnline())
260 {
262 }
263 #endif
264 }
265
266
267 if (GetGame().GetUIManager())
268 {
269 GetGame().GetUIManager().CloseMenu(MENU_TITLE_SCREEN);
270 }
271
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 }
int GetID()
Get the ID registered in SEffectManager.
Definition Effect.c:534
proto native EBiosError LogOnUserAsync(BiosUser user)
Display a system dependant ui for log-on.
static void SetPendingInviteList(array< string > invitees)
Definition OnlineServices.c:577
const int MENU_MAIN
Definition constants.c:172

Перекрестные ссылки g_Game, GetGame(), GetID(), LogOnUserAsync(), MENU_MAIN, MENU_TITLE_SCREEN, SelectUserEx() и OnlineServices::SetPendingInviteList().

◆ OnSignedIn()

void OnSignedIn ( BiosUser user)
inlineprivate

Callback function.

Called when a new user signed in

Аргументы
userthe user that signed in. Cannot be NULL.
181 {
182
183 }

◆ OnSignedOut()

void OnSignedOut ( BiosUser user)
inlineprivate

Callback function.

Called when a new user signed out

Аргументы
userthe user that signed out. Cannot be NULL.
192 {
193 if ( user == GetSelectedUser() )
194 {
196 GetGame().GetInput().ResetActiveGamepad();
197 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE & ~DisconnectSessionFlags.SELECT_USER);
198 }
199 }
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
DisconnectSessionFlags
Definition DayZGame.c:2

Перекрестные ссылки DISCONNECT_SESSION_FLAGS_FORCE, g_Game, GetGame(), GetSelectedUser() и SelectUserEx().

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

◆ OnUserDatabaseId()

void OnUserDatabaseId ( string dbID,
EBiosError error )
inlineprivate

Callback function.

Аргументы
dbIDuser database ID. If something went wrong, then it is empty string.
errorindicating correct state.
117 {
119 {
120 g_Game.SetDatabaseID( dbID );
121 }
122 }

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

◆ OnUserLoggedOn()

void OnUserLoggedOn ( EBiosError error)
inlineprivate

Callback function.

Аргументы
errorerror indicating success or fail of the async operation.
129 {
131 {
132 GetGame().GetInput().ResetActiveGamepad();
133 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE);
134 }
135 }

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

◆ OnUserPicked()

void OnUserPicked ( BiosUser user,
EBiosError error )
inlineprivate

Callback function.

Аргументы
userpicked user. NULL on fail.
errorerror indicating success or fail of the async operation.
143 {
144 if ( !user )
145 {
146 GetGame().GetInput().ResetActiveGamepad();
147 g_Game.GamepadCheck();
148 }
149 else if ( !OnlineServices.ErrorCaught( error ) )
150 {
151 if (SelectUserEx( user ))
152 {
153 if ( GetGame().GetMission() )
154 GetGame().GetMission().Reset();
156 g_Game.SelectUser(GetGame().GetInput().GetUserGamepad(user));
157 }
158 }
159 }
void OnGameNameChanged(BiosUser user)
Callback function.
Definition BiosUserManager.c:291

Перекрестные ссылки OnlineServices::ErrorCaught(), g_Game, GetGame(), GetInput(), OnGameNameChanged() и SelectUserEx().

◆ ParseJoinAsync()

proto native EBiosError ParseJoinAsync ( string join_data)
private

Parse the join data from from command line parameters.

The async result is returned in the OnJoin callback. The OnJoin callback is called also during runtime when a join is accepted. Expected errors: BAD_PARAMETER - join_data could not be parsed,

Аргументы
join_datathe startup join data from command line parameters.
Возвращает
EBiosError indicating if the async operation is pending.

◆ ParsePartyAsync()

proto native EBiosError ParsePartyAsync ( string party_data)
private

Parse the party data from from command line parameters.

The async result is returned in the OnPartyHost callback. The OnPartyHost callback is called also during runtime when a player hosts a game for the party. Expected errors: BAD_PARAMETER - join_data could not be parsed,

Аргументы
party_datathe startup party data from command line parameters.
Возвращает
EBiosError indicating if the async operation is pending.

◆ PickUserAsync()

proto native EBiosError PickUserAsync ( )
private

Display a system dependant account picket.

Xbox: The async result is returned in the OnUserPicked callback.

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

◆ SelectUser()

proto native bool SelectUser ( BiosUser user)
private

Informs the engine about the current selected user.

Must be called to ensure proper authentication etc.

Аргументы
userthe user to select.

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

◆ SelectUserEx()

bool SelectUserEx ( BiosUser user)
inlineprivate
91 {
92 bool success = false;
93
95 if (selectedUser && selectedUser != user && g_Game.GetGameState() != DayZGameState.MAIN_MENU)
96 {
98 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE & ~DisconnectSessionFlags.SELECT_USER);
99 }
100 else
102
103 if (!success)
104 {
106 }
107
108 return success;
109 }
NotificationType
DEPRECATED (moved into NotificationSystem)
Definition NotificationSystem.c:4
proto native bool SelectUser(BiosUser user)
Informs the engine about the current selected user.
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

Перекрестные ссылки NotificationSystem::AddNotification(), NotificationSystem::DEFAULT_TIME_DISPLAYED, DISCONNECT_SESSION_FLAGS_FORCE, g_Game, GetSelectedUser() и SelectUser().

Используется в OnJoin(), OnPartyHost(), OnSignedOut() и OnUserPicked().


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