using System.Collections.Generic; using AppGame; using Google.Protobuf; using JNGame.Sync.Entity; using JNGame.Sync.State.Tile.Entity; using JNGame.Sync.System.Data; using Plugins.JNGame.Network.Action; namespace Game.JNGState.Logic.Data { public abstract class DStateDataSystem : STileDataSystem where T : ISTileData,new() where E : JNTileEntity, new() { protected DStateDataSystem(SStateDataEnum type) : base(type) { } public override void OnSendUBytes(Dictionary bytes) { JNStateItemData data = new JNStateItemData(); data.NetID = NetID; foreach (var byteItem in bytes) { data.Messages.Add(byteItem.Key,new JNStateData() { Data = ByteString.CopyFrom(byteItem.Value) }); } App.Server.AllSend((int)NActionEnum.NSyncStateDataUpdate,data); } } }