Пример #1
0
        public TournamentMatch(int index, int team, TimeSpan delay, TimeSpan duration)
        {
            Index    = index;
            Team     = team;
            Delay    = delay;
            Duration = duration;

            Records = new TournamentRecords();

            Players = new PlayerMobile[2];
            Dead    = new bool[Players.Length];

            Statistics = new int[Players.Length][];
            Statistics.SetAll(i => new int[2]);             // Damage, Healing

            DateStart = DateTime.MinValue;
            DateEnd   = DateTime.MaxValue;
        }
Пример #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            reader.GetVersion();

            Index = reader.ReadInt();
            Team  = reader.ReadInt();

            Players    = reader.ReadArray(r => r.ReadMobile <PlayerMobile>(), Players);
            Dead       = reader.ReadArray(r => r.ReadBool(), Dead);
            Statistics = reader.ReadArray(r => r.ReadArray(r1 => r1.ReadInt()), Statistics);

            Delay    = reader.ReadTimeSpan();
            Duration = reader.ReadTimeSpan();

            DateStart = reader.ReadDateTime();
            DateEnd   = reader.ReadDateTime();

            Winner = reader.ReadMobile <PlayerMobile>();

            Records = new TournamentRecords(reader);
        }