/// <summary> /// Handles synchronizing the paper-doll information to a single client. /// </summary> /// <param name="client">The client to send the information to</param> internal void SynchronizeBodyLayersTo(INetworkSender client) { // Get the values to send var bodiesToSend = _bodies.Where(x => x != null); if (bodiesToSend.Count() == 0) { return; } // Send the paper-doll information using (var pw = ServerPacket.SetCharacterPaperDoll(_character.MapEntityIndex, bodiesToSend)) { client.Send(pw, ServerMessageType.MapDynamicEntityProperty); } }
/// <summary> /// Handles synchronizing the paper-doll information to other clients. /// </summary> void SynchronizeBodyLayers() { // Get the map var map = _character.Map; if (map == null) { return; } // Send the list of set paper-doll values using (var pw = ServerPacket.SetCharacterPaperDoll(_character.MapEntityIndex, _bodies.Where(x => x != null))) { _character.Map.Send(pw, ServerMessageType.MapDynamicEntityProperty); } }