Esempio n. 1
0
        public void CopyFrom(grandprix_rank_unit from)
        {
            if (from == this)
            {
                return;
            }

            Clear();
            MergeFrom(from);
        }
Esempio n. 2
0
        public void MergeFrom(grandprix_rank_unit from)
        {
            if (from == this)
            {
                return;
            }

            // playerNo
            SetPlayerNo(from.GetPlayerNo());
            // rank
            SetRank(from.GetRank());
            // nationCode
            SetNationCode(from.GetNationCode());
            // nick
            SetNick(from.GetNick());
            // level
            SetLevel(from.GetLevel());
            // gpPoint
            SetGpPoint(from.GetGpPoint());
        }
Esempio n. 3
0
        public void RemoveInfos(grandprix_rank_unit infos)
        {
            int i = 0;

            for (; i < infos_.Length; ++i)
            {
                if (infos_[i] == infos)
                {
                    break;
                }
            }
            if (i == infos_.Length)
            {
                return;
            }
            for (; i < infos_.Length - 1; ++i)
            {
                infos_[i] = infos_[i + 1];
            }
            Array.Resize(ref infos_, infos_.Length - 1);
        }
Esempio n. 4
0
        public bool Deserialize(Stream stream)
        {
            BinaryReader input = new BinaryReader(stream);

            // result
            if (Yippee.Net.Internal.Deserialize(input, out result_) == false)
            {
                return(false);
            }
            // rankType
            {
                int value = 0;
                if (Yippee.Net.Internal.Deserialize(input, out value) == false)
                {
                    return(false);
                }
                rankType_ = (grandprix_rank_type)value;
            }
            // infos
            uint infosLength = 0;

            if (Yippee.Net.Internal.Deserialize(input, out infosLength) == false)
            {
                return(false);
            }
            Array.Resize(ref infos_, (int)infosLength);
            for (uint i = 0; i < infosLength; ++i)
            {
                grandprix_rank_unit newInfos = new grandprix_rank_unit();
                if (newInfos.Deserialize(stream) == false)
                {
                    return(false);
                }
                infos_[i] = newInfos;
            }

            return(true);
        }
Esempio n. 5
0
 public grandprix_rank_unit(grandprix_rank_unit from)
 {
     MergeFrom(from);
 }
Esempio n. 6
0
 public void AddInfos(grandprix_rank_unit infos)
 {
     Array.Resize(ref infos_, infos_.Length + 1);
     infos_[infos_.Length - 1] = infos;
 }