예제 #1
0
 public override void Serialize(ICustomDataOutput writer)
 {
     writer.WriteUShort((ushort)alliances.Length);
     foreach (var entry in alliances)
     {
         entry.Serialize(writer);
     }
     writer.WriteUShort((ushort)allianceNbMembers.Length);
     foreach (var entry in allianceNbMembers)
     {
         writer.WriteVarUhShort(entry);
     }
     writer.WriteUShort((ushort)allianceRoundWeigth.Length);
     foreach (var entry in allianceRoundWeigth)
     {
         writer.WriteVarUhInt(entry);
     }
     writer.WriteUShort((ushort)allianceMatchScore.Length);
     foreach (var entry in allianceMatchScore)
     {
         writer.WriteSByte(entry);
     }
     allianceMapWinner.Serialize(writer);
     writer.WriteVarUhInt(allianceMapWinnerScore);
     writer.WriteVarUhInt(allianceMapMyAllianceScore);
     writer.WriteDouble(nextTickTime);
 }
예제 #2
0
 public override void Serialize(IWriter writer)
 {
     writer.WriteShort((short)alliances.Count());
     foreach (var entry in alliances)
     {
         entry.Serialize(writer);
     }
     writer.WriteShort((short)allianceNbMembers.Count());
     foreach (var entry in allianceNbMembers)
     {
         writer.WriteVarShort((int)entry);
     }
     writer.WriteShort((short)allianceRoundWeigth.Count());
     foreach (var entry in allianceRoundWeigth)
     {
         writer.WriteVarInt((int)entry);
     }
     writer.WriteShort((short)allianceMatchScore.Count());
     foreach (var entry in allianceMatchScore)
     {
         writer.WriteSByte(entry);
     }
     allianceMapWinner.Serialize(writer);
     writer.WriteVarInt((int)allianceMapWinnerScore);
     writer.WriteVarInt((int)allianceMapMyAllianceScore);
     writer.WriteDouble(nextTickTime);
 }
예제 #3
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort)alliances.Length);
     foreach (var entry in alliances)
     {
         entry.Serialize(writer);
     }
     writer.WriteUShort((ushort)allianceNbMembers.Length);
     foreach (var entry in allianceNbMembers)
     {
         writer.WriteShort(entry);
     }
     writer.WriteUShort((ushort)allianceRoundWeigth.Length);
     foreach (var entry in allianceRoundWeigth)
     {
         writer.WriteInt(entry);
     }
     writer.WriteUShort((ushort)allianceMatchScore.Length);
     foreach (var entry in allianceMatchScore)
     {
         writer.WriteSByte(entry);
     }
     allianceMapWinner.Serialize(writer);
     writer.WriteInt(allianceMapWinnerScore);
     writer.WriteInt(allianceMapMyAllianceScore);
 }
예제 #4
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     allianceInfos.Serialize(writer);
 }
예제 #5
0
 public override void Serialize(IDataWriter writer)
 {
     base.Serialize(writer);
     allianceInfos.Serialize(writer);
 }
예제 #6
0
 public override void Serialize(ICustomDataOutput writer)
 {
     base.Serialize(writer);
     allianceInfos.Serialize(writer);
 }
예제 #7
0
        public override void Serialize(IDataWriter writer)
        {
            var alliances_before = writer.Position;
            var alliances_count  = 0;

            writer.WriteShort(0);
            foreach (var entry in alliances)
            {
                entry.Serialize(writer);
                alliances_count++;
            }
            var alliances_after = writer.Position;

            writer.Seek((int)alliances_before);
            writer.WriteShort((short)alliances_count);
            writer.Seek((int)alliances_after);

            var allianceNbMembers_before = writer.Position;
            var allianceNbMembers_count  = 0;

            writer.WriteShort(0);
            foreach (var entry in allianceNbMembers)
            {
                writer.WriteVarShort(entry);
                allianceNbMembers_count++;
            }
            var allianceNbMembers_after = writer.Position;

            writer.Seek((int)allianceNbMembers_before);
            writer.WriteShort((short)allianceNbMembers_count);
            writer.Seek((int)allianceNbMembers_after);

            var allianceRoundWeigth_before = writer.Position;
            var allianceRoundWeigth_count  = 0;

            writer.WriteShort(0);
            foreach (var entry in allianceRoundWeigth)
            {
                writer.WriteVarInt(entry);
                allianceRoundWeigth_count++;
            }
            var allianceRoundWeigth_after = writer.Position;

            writer.Seek((int)allianceRoundWeigth_before);
            writer.WriteShort((short)allianceRoundWeigth_count);
            writer.Seek((int)allianceRoundWeigth_after);

            var allianceMatchScore_before = writer.Position;
            var allianceMatchScore_count  = 0;

            writer.WriteShort(0);
            foreach (var entry in allianceMatchScore)
            {
                writer.WriteSByte(entry);
                allianceMatchScore_count++;
            }
            var allianceMatchScore_after = writer.Position;

            writer.Seek((int)allianceMatchScore_before);
            writer.WriteShort((short)allianceMatchScore_count);
            writer.Seek((int)allianceMatchScore_after);

            allianceMapWinner.Serialize(writer);
            writer.WriteVarInt(allianceMapWinnerScore);
            writer.WriteVarInt(allianceMapMyAllianceScore);
            writer.WriteDouble(nextTickTime);
        }
예제 #8
0
 public override void Serialize(IWriter writer)
 {
     base.Serialize(writer);
     alliance.Serialize(writer);
 }