void HandleRoomCustomPropertiesChanged(UpdatePropertyNotification updatePropertyNotification) { var changedProps = CodecUtils.DeserializePlayObject(updatePropertyNotification.Attr); // 房间属性变化 MergeCustomProperties(changedProps); Client.OnRoomCustomPropertiesChanged?.Invoke(changedProps); }
void HandlePlayerCustomPropertiesChanged(UpdatePropertyNotification updatePropertyNotification) { var changedProps = CodecUtils.DeserializePlayObject(updatePropertyNotification.Attr); // 玩家属性变化 var player = GetPlayer(updatePropertyNotification.ActorId); if (player == null) { Logger.Error("No player id: {0} when player properties changed", updatePropertyNotification); return; } player.MergeCustomProperties(changedProps); Client.OnPlayerCustomPropertiesChanged?.Invoke(player, changedProps); }