> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFLobbyServerDataUpdate

> 遊戲伺服器用於更新用戶端擁有之 PlayFab Multiplayer 大廳中伺服器擁有狀態的要求結構，包括屬性和搜尋資料。

對用戶端擁有之大廳的相關伺服器狀態進行更新的要求。

## 語法

```cpp theme={null}
struct PFLobbyServerDataUpdate {  
    const PFEntityKey* newServer;  
    uint32_t serverPropertyCount;  
    const char* const* serverPropertyKeys;  
    const char* const* serverPropertyValues;  
}  
```

### 成員

**`newServer`**   const [PFEntityKey](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/pfentitykey_clientsdk)\*\
*可能為 nullptr*

選用的新伺服器，將與用戶端擁有的大廳建立關聯。

如果指定，此實體必須是 game\_server 實體。\
\
&#x20;一個大廳一次只能與一部伺服器建立關聯。在此設定新伺服器會取代大廳中目前相關聯的伺服器。

**`serverPropertyCount`**   uint32\_t

要更新的伺服器屬性數目。

在任何指定時間，最多只能有 `PFLobbyMaxServerPropertyCount` 個並行屬性。因此，如果其中一半的屬性正在被刪除，此更新中最多可以指定兩倍數量的唯一屬性。 \
\
&#x20;如果違反屬性限制，整個更新作業都會失敗。

**`serverPropertyKeys`**   const char\* const\*\
*大小為 `serverPropertyCount` 的陣列*

要更新之伺服器屬性的索引鍵。

\
\
&#x20;只有此索引鍵清單中指定的屬性會被更新。如果索引鍵尚不存在，則會建立該屬性。如果新的屬性值為 nullptr，則會刪除該屬性。此清單中省略的任何現有屬性將保持不變。

**`serverPropertyValues`**   const char\* const\*\
*大小為 `serverPropertyCount` 的陣列*

要更新之伺服器屬性的值。

\
\
&#x20;若要刪除值，請提供 nullptr 作為其新值。

## 需求

**標頭：** PFLobby.h

## 另請參閱

[PFLobby 成員](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)


## Related topics

- [PFLobbyServerPostUpdateAsServer](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdateasserver.md)
- [Update Lobby As Server](/api-reference/lobby/update-lobby-as-server.md)
- [LobbyServerDataUpdate 方法](/zh-TW/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyServerDataUpdate/LobbyServerDataUpdate.md)
- [LobbyServerDataUpdate.NewServer](/zh-TW/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyServerDataUpdate/NewServer.md)
- [LobbyServerDataUpdate.SearchProperties](/zh-TW/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyServerDataUpdate/SearchProperties.md)
