> ## 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 多人游戏大厅中服务器所拥有状态的请求结构，包括属性和搜索数据。

对客户端拥有的大厅的关联服务器状态进行更新的请求。

## 语法

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

### 成员

**`newServer`**   const [PFEntityKey](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/pfentitykey_clientsdk)\*\
*may be nullptr*

要与客户端拥有的大厅关联的可选新服务器。

如果指定，此实体必须是 game\_server 实体。<br /><br /> 在任何给定时间，一个大厅只能关联一个服务器。在此处设置新服务器将替换大厅中当前关联的服务器。

**`serverPropertyCount`**   uint32\_t

要更新的服务器属性数量。

在任何给定时间，最多只能有 `PFLobbyMaxServerPropertyCount` 个并发属性。因此，在此更新中最多可以指定该数量两倍的唯一属性（如果其中一半属性正在被删除）。<br /><br /> 如果违反属性限制，整个更新操作将失败。

**`serverPropertyKeys`**   const char\* const\*\
*大小为 `serverPropertyCount` 的数组*

要更新的服务器属性的键。

<br /><br /> 仅会更新此键列表中指定的属性。如果键尚不存在，则将创建该属性。如果新属性值为 nullptr，则将删除该属性。此列表中未包含的任何现有属性将保持不变。

**`serverPropertyValues`**   const char\* const\*\
*大小为 `serverPropertyCount` 的数组*

要更新的服务器属性的值。

<br /><br /> 若要删除某值，请将其新值设为 nullptr。

## 要求

**头文件：** PFLobby.h

## 另请参阅

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


## Related topics

- [PFLobbyServerPostUpdateAsServer](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdateasserver.md)
- [PFMultiplayer C/C++ API 概览 - PFLobby.h](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [LobbyServerDataUpdate method](/zh-CN/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyServerDataUpdate/LobbyServerDataUpdate.md)
- [LobbyServerDataUpdate class](/zh-CN/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyServerDataUpdate/overview.md)
- [LobbyServerDataUpdate.NewServer](/zh-CN/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyServerDataUpdate/NewServer.md)
