Exemple #1
0
        public void CopyFrom(ability from)
        {
            if (from == this)
            {
                return;
            }

            Clear();
            MergeFrom(from);
        }
Exemple #2
0
        public void MergeFrom(ability from)
        {
            if (from == this)
            {
                return;
            }

            // abilityId
            SetAbilityId(from.GetAbilityId());
            // level
            SetLevel(from.GetLevel());
        }
Exemple #3
0
        public void RemoveInfos(ability 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);
        }
Exemple #4
0
        public bool Deserialize(Stream stream)
        {
            BinaryReader input = new BinaryReader(stream);
            // 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)
            {
                ability newInfos = new ability();
                if (newInfos.Deserialize(stream) == false)
                {
                    return(false);
                }
                infos_[i] = newInfos;
            }

            return(true);
        }
Exemple #5
0
 public void AddInfos(ability infos)
 {
     Array.Resize(ref infos_, infos_.Length + 1);
     infos_[infos_.Length - 1] = infos;
 }
Exemple #6
0
 public ability(ability from)
 {
     MergeFrom(from);
 }
Exemple #7
0
 public void SetUpdatedAbility(ability value)
 {
     updatedAbility_ = value;
 }