public static ProtocolHeader Deserialize(NetBuffer buffer) { ProtocolHeader head = new ProtocolHeader(); head.pid = buffer.ReadUInt(); head.index = buffer.ReadUInt(); head.dataSize = buffer.ReadInt(); head.checksum = buffer.ReadUShort(); return(head); }
public sealed override void ReadFromBuffer(NetBuffer buffer, SyncContext context) { if (Revision < context.Revision) { value = (int)(buffer.ReadInt() - context.ConnectionTimestampOffset); Synchronised = false; } else { SkipFromBuffer(buffer); } }
public bool Deserialize(NetBuffer buffer) { if (buffer.BytesAvailable >= Length) { ProtocolHead head = this; head.sid = buffer.ReadUInt(); head.token = buffer.ReadUInt(); head.cmd = buffer.ReadUInt(); head.index = buffer.ReadUInt(); head.player = buffer.ReadULong(); head.zone = buffer.ReadInt(); head.runner = buffer.ReadULong(); head.dataSize = buffer.ReadUInt(); head.checksum = buffer.ReadUInt(); return(true); } return(false); }
public override void ReadFromBuffer(NetBuffer buffer) { value = buffer.ReadInt(); }