public override void write()
 {
     writeH(3371);
     writeC((byte)_r.rodada);
     writeD(_r.getInBattleTimeLeft());
     writeH(AllUtils.getSlotsFlag(_r, true, false));
 }
Example #2
0
 public override void write()
 {
     this.writeH((short)3371);
     this.writeC((byte)this._r.rodada);
     this.writeD(this._r.getInBattleTimeLeft());
     this.writeH(AllUtils.getSlotsFlag(this._r, true, false));
 }
 public override void write()
 {
     this.writeH((short)3351);
     this.writeH(AllUtils.getSlotsFlag(this._r, false, false));
     if (this._r.room_type == (byte)8)
     {
         this.writeB(new byte[10]
         {
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue
         });
     }
     else if (this.isBotMode)
     {
         this.writeB(new byte[10]);
     }
     else if (this._r.room_type == (byte)7 || this._r.room_type == (byte)12)
     {
         int num1 = this._dinos.Count == 1 || this._r.room_type == (byte)12 ? (int)byte.MaxValue : this._r.TRex;
         this.writeC((byte)num1);
         foreach (int dino in this._dinos)
         {
             if (dino != this._r.TRex && this._r.room_type == (byte)7 || this._r.room_type == (byte)12)
             {
                 this.writeC((byte)dino);
             }
         }
         int num2 = 8 - this._dinos.Count - (num1 == (int)byte.MaxValue ? 1 : 0);
         for (int index = 0; index < num2; ++index)
         {
             this.writeC(byte.MaxValue);
         }
         this.writeC(byte.MaxValue);
         this.writeC(byte.MaxValue);
     }
     else
     {
         this.writeB(new byte[10]
         {
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue
         });
     }
 }
Example #4
0
 public override void write()
 {
     writeH(3334);
     writeD(isBattle);
     if (isBattle == 1)
     {
         writeD(slot._id);
         writeC((byte)type);
         writeH(AllUtils.getSlotsFlag(room,false,false));
         if (room.room_type == 2 || room.room_type == 3 || room.room_type == 4 || room.room_type == 5) //2-Destruição || 3-Sabotagem || 4-Supressão || 5-Defesa
         {
             writeH((ushort)room.red_rounds);
             writeH((ushort)room.blue_rounds);
             if (room.room_type != 3 && room.room_type != 5)
             {
                 writeH(AllUtils.getSlotsFlag(room,true,false));
             }
             else
             {
                 writeH((ushort)room.Bar1);
                 writeH((ushort)room.Bar2);
                 for (int i = 0; i < 16; i++)
                 {
                     writeH(room._slots[i].damageBar1);
                 }
                 if (room.room_type == 5)
                 {
                     for (int i = 0; i < 16; i++)
                     {
                         writeH(room._slots[i].damageBar2);
                     }
                 }
             }
         }
         else if (room.room_type == 7 || room.room_type == 12)
         {
             writeH((ushort)(room.room_type == 12 ? room._redKills : room.red_dino));
             writeH((ushort)(room.room_type == 12 ? room._blueKills : room.blue_dino));
             writeC((byte)room.rodada);
             writeH(AllUtils.getSlotsFlag(room,false,false)); //usa primeira lógica de slots EF AF (eu entrando 16 pessoas)
             int TRex = dinos.Count == 1 || room.room_type == 12 ? 255 : room.TRex;
             writeC((byte)TRex);                              //T-Rex || 255 (não tem t-rex)
             foreach (int slotId in dinos)
             {
                 if (slotId != room.TRex && room.room_type == 7 || room.room_type == 12)
                 {
                     writeC((byte)slotId);
                 }
             }
             int falta = 8 - dinos.Count - (TRex == 255 ? 1 : 0);
             for (int i = 0; i < falta; i++)
             {
                 writeC(255);
             }
             writeC(255);
             writeC(255);
             writeC(37); //89
         }
     }
 }
Example #5
0
 public override void write()
 {
     writeH(3351);
     writeH(AllUtils.getSlotsFlag(_r, false, false));
     if (_r.room_type == 8)
     {
         writeB(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF });
     }
     else if (isBotMode)
     {
         writeB(new byte[10]);
     }
     else if (_r.room_type == 7 || _r.room_type == 12)
     {
         int TRex = _dinos.Count == 1 || _r.room_type == 12 ? 255 : _r.TRex;
         writeC((byte)TRex); //T-Rex || 255 (não tem t-rex)
         foreach (int slot in _dinos)
         {
             if (slot != _r.TRex && _r.room_type == 7 || _r.room_type == 12)
             {
                 writeC((byte)slot);
             }
         }
         int falta = 8 - _dinos.Count - (TRex == 255 ? 1 : 0);
         for (int i = 0; i < falta; i++)
         {
             writeC(255);
         }
         writeC(255);
         writeC(255);
     }
     else
     {
         writeB(new byte[] { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 });//writeB(new byte[] { 255, 1, 255, 255, 255, 255, 255, 255, 255, 255 });
     }
 }
Example #6
0
 public override void write()
 {
     this.writeH((short)3334);
     this.writeD(this.isBattle);
     if (this.isBattle != 1)
     {
         return;
     }
     this.writeD(this.slot._id);
     this.writeC((byte)this.type);
     this.writeH(AllUtils.getSlotsFlag(this.room,false,false));
     if (this.room.room_type == (byte)2 || this.room.room_type == (byte)3 || (this.room.room_type == (byte)4 || this.room.room_type == (byte)5))
     {
         this.writeH((ushort)this.room.red_rounds);
         this.writeH((ushort)this.room.blue_rounds);
         if (this.room.room_type != (byte)3 && this.room.room_type != (byte)5)
         {
             this.writeH(AllUtils.getSlotsFlag(this.room,true,false));
         }
         else
         {
             this.writeH((ushort)this.room.Bar1);
             this.writeH((ushort)this.room.Bar2);
             for (int index = 0; index < 16; ++index)
             {
                 this.writeH(this.room._slots[index].damageBar1);
             }
             if (this.room.room_type != (byte)5)
             {
                 return;
             }
             for (int index = 0; index < 16; ++index)
             {
                 this.writeH(this.room._slots[index].damageBar2);
             }
         }
     }
     else
     {
         if (this.room.room_type != (byte)7 && this.room.room_type != (byte)12)
         {
             return;
         }
         this.writeH(this.room.room_type == (byte)12 ? (ushort)this.room._redKills : (ushort)this.room.red_dino);
         this.writeH(this.room.room_type == (byte)12 ? (ushort)this.room._blueKills : (ushort)this.room.blue_dino);
         this.writeC((byte)this.room.rodada);
         this.writeH(AllUtils.getSlotsFlag(this.room,false,false));
         int num1 = this.dinos.Count == 1 || this.room.room_type == (byte)12 ? (int)byte.MaxValue : this.room.TRex;
         this.writeC((byte)num1);
         foreach (int dino in this.dinos)
         {
             if (dino != this.room.TRex && this.room.room_type == (byte)7 || this.room.room_type == (byte)12)
             {
                 this.writeC((byte)dino);
             }
         }
         int num2 = 8 - this.dinos.Count - (num1 == (int)byte.MaxValue ? 1 : 0);
         for (int index = 0; index < num2; ++index)
         {
             this.writeC(byte.MaxValue);
         }
         this.writeC(byte.MaxValue);
         this.writeC(byte.MaxValue);
         this.writeC((byte)37);
     }
 }