using Tiger.Communication.Messages.Interfaces; using Tiger.Communication.Messages.Types; using Tiger.Game.Navigator.Nodes; namespace Tiger.Communication.Messages.Outgoing.Navigator; public class UserFlatCatsComposer : IMessageComposer { private readonly ICollection _flatCats; public UserFlatCatsComposer(ICollection flatCats) { _flatCats = flatCats; } public OutgoingHeaders Header => OutgoingHeaders.UserFlatCats; public void Compose(ServerMessage message) { message.AppendWire(_flatCats.Count); foreach (var flatCat in _flatCats) { message.AppendWire(flatCat.Id); message.AppendString(flatCat.Name); } } }