跳轉到主要內容
取得大廳目前關於是否只有大廳擁有者可以傳送加入大廳邀請的原則。

語法

參數

lobby   PFLobbyHandle 大廳的控制代碼。 restrictInvitesToLobbyOwner   bool*
輸出
輸出值,表示目前的原則是否只有大廳擁有者可以傳送加入大廳的邀請。

傳回值

類型:HRESULT 如果呼叫成功,則為 S_OK;否則為錯誤碼。可透過 PFMultiplayerGetErrorMessage() 擷取錯誤碼的人類可讀形式。

備註

為 true 時,只有大廳擁有者可以傳送邀請。為 false 時,任何成員都可以傳送邀請。只有用戶端擁有的大廳才能為 true。

如果此大廳物件是透過呼叫 PFMultiplayerJoinLobby() 建立的,則在 PFMultiplayerStartProcessingLobbyStateChanges() 提供 PFLobbyUpdatedStateChange::restrictInvitesToLobbyOwnerUpdated 設定為 true 的 PFLobbyUpdatedStateChange 之前,此方法會傳回錯誤。 如果加入大廳成功,保證在 PFMultiplayerStartProcessingLobbyStateChanges() 提供 PFLobbyJoinLobbyCompletedStateChange 時已填入此欄位。

如果此大廳物件是透過呼叫 PFMultiplayerClaimServerLobby() 建立的,則在 PFMultiplayerStartProcessingLobbyStateChanges() 提供 PFLobbyUpdatedStateChange::restrictInvitesToLobbyOwnerUpdated 設定為 true 的 PFLobbyUpdatedStateChange 之前,此方法會傳回錯誤。 如果宣告大廳成功,保證在 PFMultiplayerStartProcessingLobbyStateChanges() 提供 PFLobbyClaimServerLobbyCompletedStateChange 時已填入此欄位。

需求

標頭: PFLobby.h

另請參閱

PFLobby 成員
最後修改於 2026年10月8日