Exemple #1
0
        public virtual void Deserialize(IDataReader reader)
        {
            fightId   = reader.ReadInt();
            fightType = reader.ReadSByte();
            if (fightType < 0)
            {
                throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
            }
            fightStart = reader.ReadInt();
            if (fightStart < 0)
            {
                throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
            }
            fightSpectatorLocked = reader.ReadBoolean();
            var fightTeams_ = new Types.FightTeamLightInformations[2];

            for (int i = 0; i < 2; i++)
            {
                fightTeams_[i] = new Types.FightTeamLightInformations();
                fightTeams_[i].Deserialize(reader);
            }
            fightTeams = fightTeams_;
            var fightTeamsOptions_ = new Types.FightOptionsInformations[2];

            for (int i = 0; i < 2; i++)
            {
                fightTeamsOptions_[i] = new Types.FightOptionsInformations();
                fightTeamsOptions_[i].Deserialize(reader);
            }
            fightTeamsOptions = fightTeamsOptions_;
        }
        public virtual void Deserialize(IDataReader reader)
        {
            fightId   = reader.ReadVarUhShort();
            fightType = reader.ReadSbyte();
            var limit = (ushort)reader.ReadUShort();

            fightTeams = new Types.FightTeamInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeams[i] = ProtocolTypeManager.GetInstance <Types.FightTeamInformations>(reader.ReadUShort());
                fightTeams[i].Deserialize(reader);
            }
            limit = (ushort)reader.ReadUShort();
            fightTeamsPositions = new uint[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeamsPositions[i] = reader.ReadVarUhShort();
            }
            limit             = (ushort)reader.ReadUShort();
            fightTeamsOptions = new Types.FightOptionsInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeamsOptions[i] = new Types.FightOptionsInformations();
                fightTeamsOptions[i].Deserialize(reader);
            }
        }
        public virtual void Deserialize(BigEndianReader reader)
        {
            fightId   = reader.ReadInt();
            fightType = reader.ReadSByte();
            if (fightType < 0)
            {
                throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
            }
            var limit = reader.ReadUShort();

            fightTeams = new Types.FightTeamInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeams[i] = Types.ProtocolTypeManager.GetInstance <Types.FightTeamInformations>(reader.ReadShort());
                fightTeams[i].Deserialize(reader);
            }
            limit = reader.ReadUShort();
            fightTeamsPositions = new short[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeamsPositions[i] = reader.ReadVarShort();
            }
            limit             = reader.ReadUShort();
            fightTeamsOptions = new Types.FightOptionsInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeamsOptions[i] = new Types.FightOptionsInformations();
                fightTeamsOptions[i].Deserialize(reader);
            }
        }
 public virtual void Deserialize(IDataReader reader)
 {
     fightId = reader.ReadInt();
     fightType = reader.ReadSByte();
     if (fightType < 0)
         throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
     var limit = reader.ReadUShort();
     fightTeams = new Types.FightTeamInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeams[i] = new Types.FightTeamInformations();
          fightTeams[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsPositions = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsPositions[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     fightId = reader.ReadInt();
     fightType = reader.ReadSByte();
     if (fightType < 0)
         throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
     fightStart = reader.ReadInt();
     if (fightStart < 0)
         throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
     fightSpectatorLocked = reader.ReadBoolean();
     var limit = reader.ReadUShort();
     fightTeams = new Types.FightTeamLightInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeams[i] = new Types.FightTeamLightInformations();
          fightTeams[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
Exemple #6
0
        public virtual void Deserialize(IDataReader reader)
        {
            fightId   = reader.ReadInt();
            fightType = reader.ReadSByte();
            if (fightType < 0)
            {
                throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
            }
            var limit       = reader.ReadUShort();
            var fightTeams_ = new Types.FightTeamInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                fightTeams_[i] = new Types.FightTeamInformations();
                fightTeams_[i].Deserialize(reader);
            }
            fightTeams = fightTeams_;
            limit      = reader.ReadUShort();
            var fightTeamsPositions_ = new short[limit];

            for (int i = 0; i < limit; i++)
            {
                fightTeamsPositions_[i] = reader.ReadShort();
            }
            fightTeamsPositions = fightTeamsPositions_;
            limit = reader.ReadUShort();
            var fightTeamsOptions_ = new Types.FightOptionsInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                fightTeamsOptions_[i] = new Types.FightOptionsInformations();
                fightTeamsOptions_[i].Deserialize(reader);
            }
            fightTeamsOptions = fightTeamsOptions_;
        }
 public virtual void Deserialize(IDataReader reader)
 {
     fightId = reader.ReadInt();
     fightStart = reader.ReadInt();
     if (fightStart < 0)
         throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
     fightSpectatorLocked = reader.ReadBoolean();
     fightTeams = new Types.FightTeamLightInformations[2];
     for (int i = 0; i < 2; i++)
     {
          fightTeams[i] = new Types.FightTeamLightInformations();
          fightTeams[i].Deserialize(reader);
     }
     fightTeamsOptions = new Types.FightOptionsInformations[2];
     for (int i = 0; i < 2; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
Exemple #8
0
        public virtual void Deserialize(IDataReader reader)
        {
            fightId              = reader.ReadVarUhShort();
            fightType            = reader.ReadSbyte();
            fightStart           = reader.ReadInt();
            fightSpectatorLocked = reader.ReadBoolean();
            var limit = (ushort)reader.ReadUShort();

            fightTeams = new Types.FightTeamLightInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeams[i] = new Types.FightTeamLightInformations();
                fightTeams[i].Deserialize(reader);
            }
            limit             = (ushort)reader.ReadUShort();
            fightTeamsOptions = new Types.FightOptionsInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fightTeamsOptions[i] = new Types.FightOptionsInformations();
                fightTeamsOptions[i].Deserialize(reader);
            }
        }