//public RoundInfo(MemoryStream stream, bool isAttacker) //{ // Attacker = isAttacker ? (byte)1 : (byte)0; // if (!isAttacker) stream.Position += 1; // Team = stream.Read1Byte(); // if (isAttacker) // { // stream.Position += 1; // Tickets = stream.ReadUInt16(ByteConverter.Big); // TicketsMax = stream.ReadUInt16(ByteConverter.Big); // } // else // { // stream.Position += 4; // Bases = stream.Read1Byte(); // BasesMax = stream.Read1Byte(); // } //} public RoundInfo(RoundInfo rInfo) { this.Team = rInfo.Team; this.Bases = rInfo.Bases; this.BasesMax = rInfo.BasesMax; this.Attacker = rInfo.Attacker; this.Tickets = rInfo.Tickets; this.TicketsMax = rInfo.TicketsMax; this.FlagsMax = rInfo.FlagsMax; this.RoundTimeMax = rInfo.RoundTimeMax; this.Flags = rInfo.Flags; this.Kills = rInfo.Kills; this.KillsMax = rInfo.KillsMax; this.DestroyedCrates = rInfo.DestroyedCrates; this.CarrierHealth = rInfo.CarrierHealth; }
//public Rush(MemoryStream stream) //{ // var pos = stream.Position; // Attackers = new RoundInfo(stream, true); // stream.Position = pos; // Defenders = new RoundInfo(stream, false); //} public Rush(Rush rush) { this.Defenders = (rush.Defenders == null) ? null : new RoundInfo(rush.Defenders); this.Attackers = (rush.Attackers == null) ? null : new RoundInfo(rush.Attackers); }