Ejemplo n.º 1
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(WarptoWorld);
     stream.WriteString(WarptoPlayer);
     stream.WriteInt32((int)WarpAlias);
     stream.WriteBoolean(WarpActionInvalid);
 }
Ejemplo n.º 2
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteString(SectorId);
     stream.WriteString(SectorName);
     stream.WriteDouble(SectorSeed);
     stream.WriteString(SectorPrefix);
     stream.WriteVariant(Parameters);
     stream.WriteVariant(SectorConfig);
 }
Ejemplo n.º 3
0
        public override void Write(IStarboundStream stream)
        {
            stream.WriteUInt8((byte)cm);
            stream.WriteString(ChannelName);
            stream.WriteUInt32(ClientId);
            stream.WriteString(Name);
            stream.WriteString(Message);

            /*
             * stream.WriteString(World);
             */
        }
Ejemplo n.º 4
0
 public void WriteTo(IStarboundStream stream)
 {
     if (Value == null)
     {
         stream.WriteUInt8(1);
     }
     else if (Value is double)
     {
         stream.WriteInt8(2);
         stream.WriteDouble((double)Value);
     }
     else if (Value is bool)
     {
         stream.WriteInt8(3);
         stream.WriteBoolean((bool)Value);
     }
     else if (Value is ulong)
     {
         stream.WriteInt8(4);
         stream.WriteVLQ((ulong)Value);
     }
     else if (Value is string)
     {
         stream.WriteInt8(5);
         stream.WriteString((string)Value);
     }
     else if (Value is Variant[])
     {
         stream.WriteInt8(6);
         var array = (Variant[])Value;
         stream.WriteVLQ((ulong)array.Length);
         for (int i = 0; i < array.Length; i++)
         {
             array[i].WriteTo(stream);
         }
     }
     else if (Value is VariantDict)
     {
         stream.WriteInt8(7);
         var dict = (VariantDict)Value;
         stream.WriteVLQ((ulong)dict.Count);
         foreach (var kvp in dict)
         {
             stream.WriteString(kvp.Key);
             kvp.Value.WriteTo(stream);
         }
     }
 }
Ejemplo n.º 5
0
 public void WriteTo(IStarboundStream stream)
 {
     if (Value == null)
     {
         stream.WriteUInt8(0);
     }
     else if (Value is float)
     {
         stream.WriteInt8(1);
         stream.WriteSingle((float)Value);
     }
     else if (Value is bool)
     {
         stream.WriteInt8(2);
         stream.WriteBoolean((bool)Value);
     }
     else if (Value is int)
     {
         stream.WriteInt8(3);
         stream.WriteInt32((int)Value);
     }
     else if (Value is string)
     {
         stream.WriteInt8(4);
         stream.WriteString((string)Value);
     }
     else if (Value is Json[])
     {
         stream.WriteInt8(5);
         var array = (Json[])Value;
         stream.WriteVLQ((ulong)array.Length);
         for (var i = 0; i < array.Length; i++)
         {
             array[i].WriteTo(stream);
         }
     }
     else if (Value is JsonDict)
     {
         stream.WriteInt8(7);
         var dict = (JsonDict)Value;
         stream.WriteVLQ((ulong)dict.Count);
         foreach (var kvp in dict)
         {
             stream.WriteString(kvp.Key);
             kvp.Value.WriteTo(stream);
         }
     }
 }
Ejemplo n.º 6
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteString(Sector);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
 }
Ejemplo n.º 7
0
        public override void Write(IStarboundStream stream)
        {
            stream.WriteBoolean(Success);
            stream.WriteVLQ(ClientId);
            stream.WriteString(RejectionReason);
            stream.WriteVLQ((ulong)CelestialInfos.Count);

            foreach (CelestialInfo cInfo in CelestialInfos)
            {
                cInfo.WriteTo(stream);
            }
        }
 public override void Write(IStarboundStream stream)
 {
     stream.WriteUInt8(NumPairs);
     stream.WriteString(PropertyName);
     stream.WriteVariant(PropertyValue);
 }
Ejemplo n.º 9
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(Status);
 }
Ejemplo n.º 10
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteUInt32((uint)WarpType);
     stream.WriteWorldCoordinate(Coordinates);
     stream.WriteString(Player);
 }
Ejemplo n.º 11
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(Claim);
     stream.WriteString(Salt);
     stream.WriteInt32(Rounds);
 }
Ejemplo n.º 12
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteString(name);
     stream.WriteVLQ(count);
     parameters.WriteTo(stream);
 }
Ejemplo n.º 13
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(Message);
     stream.WriteUInt8(Channel);
 }
Ejemplo n.º 14
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteString(damSourceKind);
     position.WriteTo(stream);
 }
Ejemplo n.º 15
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(Text);
     stream.WriteUInt8((byte)cm);
 }
Ejemplo n.º 16
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(RejectionReason);
 }
Ejemplo n.º 17
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(ClaimMessage);
     stream.WriteString(PasswordHash);
 }