示例#1
0
文件: Data.cs 项目: 0ver-flow/PKHeX
        public Evolutions(byte[] data)
        {
            int Count = data.Length / 4;

            if (data.Length < 4 || data.Length % 4 != 0)
            {
                return;
            }
            Evos = new DexLevel[Count];
            for (int i = 0; i < data.Length; i += 4)
            {
                Evos[i / 4] = new DexLevel
                {
                    Species = BitConverter.ToUInt16(data, i),
                    Level   = BitConverter.ToUInt16(data, i + 2)
                };
            }
        }
示例#2
0
文件: Data.cs 项目: goofwear/PKHeX
 public Evolutions(byte[] data)
 {
     int Count = data.Length / 4;
     if (data.Length < 4 || data.Length % 4 != 0) return;
     Evos = new DexLevel[Count];
     for (int i = 0; i < data.Length; i += 4)
     {
         Evos[i/4] = new DexLevel
         {
             Species = BitConverter.ToUInt16(data, i),
             Level = BitConverter.ToUInt16(data, i + 2)
         };
     }
 }